Ignore:
Timestamp:
03/13/14 01:00:33 (10 years ago)
Author:
sz
Message:

getObjectTarget is now the recommended way to retrieve object from ExtValue?, can post the standard warning message about missing object

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/util/extvalue.h

    r144 r171  
    5858bool matchesInterfaceName(ParamInterface* pi) const {return !strcmp(interfaceName(),pi->getName());}
    5959void* getTarget() const {return (subtype&1)?dbobject:object;}
    60 void* getTarget(const char* classname, bool through_barrier=true) const;
     60void* getTarget(const char* classname, bool through_barrier=true, bool warn=true) const;
    6161void setEmpty() {decref();subtype=0;param=NULL;object=NULL;}
    6262int isEmpty() const {return !param;}
     
    142142bool makeUnique() {return (type==TObj) && odata().makeUnique();} //< @return false if nothing has changed
    143143ExtPType getType() {return type;}
    144 void *getObjectTarget(const char* classname) {return (type==TObj)?getObject().getTarget(classname):0;}
     144void *getObjectTarget(const char* classname,bool warn=true) const;
    145145void setInt(long v) {if (type!=TInt) setri(v); else idata()=v;}
    146146void setDouble(double v) {if (type!=TDouble) setrd(v); else ddata()=v;}
Note: See TracChangeset for help on using the changeset viewer.