Changeset 276 for cpp


Ignore:
Timestamp:
12/22/14 23:19:25 (10 years ago)
Author:
Maciej Komosinski
Message:

Empty stock objects for convenience

File:
1 edited

Legend:

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

    r257 r276  
    6161void setEmpty() {decref();subtype=0;param=NULL;object=NULL;}
    6262int isEmpty() const {return !param;}
     63static const ExtObject& empty() { static const ExtObject& e((ParamInterface*)NULL); return e; }
    6364ExtObject(const ExtObject& src)      {src.incref();copyFrom(src);}
    6465void operator=(const ExtObject& src) {src.incref();decref();copyFrom(src);}
     
    128129ExtValue(const ExtObject &srco) {seto(srco);}
    129130static ExtValue invalid() {ExtValue v; v.setInvalid(); return v;}
     131static const ExtValue& empty() { static const ExtValue v; return v; }
    130132int compare(const ExtValue& src) const;
    131133int operator==(const ExtValue& src) const;
Note: See TracChangeset for help on using the changeset viewer.