Changeset 1158 for cpp/frams/util
- Timestamp:
- 10/01/21 23:40:49 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/util/extvalue.h
r1130 r1158 43 43 class ExtObject 44 44 { 45 int subtype; //< 0/1=Generic/DPC Object, 0/2=Standalone/Shared Param 45 int subtype; //< 0/1=Generic/DPC Object, 0/2=Standalone/Shared Param, 0/4=RW/Readonly 46 46 void incref() const; 47 47 void decref() const; … … 73 73 void setEmpty() { decref(); subtype = 0; param = NULL; object = NULL; } 74 74 int isEmpty() const { return !param; } 75 bool isReadonly() const {return (subtype&4)!=0;} 76 void setReadonly(bool ro) {subtype=(subtype&~4)|(ro?4:0);} 75 77 static const ExtObject& empty() { static const ExtObject e((ParamInterface*)NULL); return e; } 76 78 ExtObject(const ExtObject& src) { DEBUG_EXTOBJECT("(const&)"); src.incref(); copyFrom(src); } … … 188 190 void setInvalid() { setEmpty(); type = TInvalid; } 189 191 void setError(const SString& msg); 192 bool isReadonly() const {return (type==TObj) && odata().isReadonly();} 193 void setReadonly(bool ro) {if (type==TObj) odata().setReadonly(ro);} 190 194 bool makeUnique() { return (type == TObj) && odata().makeUnique(); } //< @return false if nothing has changed 191 195 ExtPType getType() const { return type; }
Note: See TracChangeset
for help on using the changeset viewer.