Michael Uleysky 9 years ago
parent
commit
106fbe1612
  1. 2
      src/object.cpp
  2. 8
      src/object.h

2
src/object.cpp

@ -30,6 +30,6 @@ inline ObjectBase* OFunc::Evaluate(bool* err)
if(ret!=0) return ret;
}
*err=true;
COUT(ERROR)<<"Function(s) "<<name<< "can't evaluate expression "<<args->Dump()<<std::endl;
COUT(ERROR)<<"Function "<<name<<" can't evaluate expression "<<args->Dump()<<std::endl;
return 0;
}

8
src/object.h

@ -146,7 +146,7 @@ public:
{
if(!Exist()) return false;
COUT(NORMAL)<<std::endl<<"Object type: "<<Type()<<std::endl;
COUT(NORMAL)<<"Value: "<<val<<std::endl;
COUT(NORMAL)<<"Name is: "<<Name()<<std::endl;
COUT(NORMAL)<<"Value type: "<<val->Type()<<std::endl;
return true;
}
@ -201,7 +201,7 @@ public:
ObjectList() {vals.reset(new ListValues, [](ListValues* p){for(auto& i: *p) delete i; delete p;});}
ObjectList(ObjectBase* o) {vals.reset(new ListValues, [](ListValues* p){for(auto& i: *p) delete i; delete p;}); PushBack(o);}
~ObjectList() {}
bool Exist() const {return 0==vals->size();}
bool Exist() const {return 0!=vals->size();}
bool Print() const override
{
@ -268,9 +268,9 @@ public:
for(auto& i: *vals)
{
p=0;
if(IS_OTYPEI(i,ObjectPair)) p=dynamic_cast<const ObjectPair*>(i)->Get(gname);
if(IS_OTYPE(i,ObjectPair)) p=dynamic_cast<const ObjectPair*>(i)->Get(gname);
if(0!=p) return p;
if(IS_OTYPEI(i,ObjectList)) p=dynamic_cast<const ObjectList*>(i)->Get(gname);
if(IS_OTYPE(i,ObjectList)) p=dynamic_cast<const ObjectList*>(i)->Get(gname);
if(0!=p) return p;
}
return 0;

Loading…
Cancel
Save