A collection of properties (cProperty).
◆ cProperties() [1/2]
◆ cProperties() [2/2]
◆ ~cProperties()
◆ operator=()
◆ dup()
Creates and returns an exact copy of this object.
Reimplemented from cObject.
◆ getName()
virtual const char* getName |
( |
| ) |
const |
|
inlineoverridevirtual |
Returns object name.
Reimplemented from cObject.
◆ str()
virtual std::string str |
( |
| ) |
const |
|
overridevirtual |
Produces a one-line description of the object's contents.
Reimplemented from cObject.
◆ parsimPack()
Serializes the object into a buffer.
Reimplemented from cObject.
◆ parsimUnpack()
Deserializes the object from a buffer.
Reimplemented from cObject.
◆ getNumProperties()
virtual int getNumProperties |
( |
| ) |
const |
|
inlinevirtual |
Returns the number of properties.
◆ getNames()
virtual const std::vector<const char *> getNames |
( |
| ) |
const |
|
virtual |
Returns the names of cProperty object stored in this object. The strings in the returned array do not need to be deallocated and must not be modified.
◆ get() [1/2]
◆ get() [2/2]
virtual cProperty* get |
( |
const char * |
name, |
|
|
const char * |
index = nullptr |
|
) |
| const |
|
virtual |
Returns the given property, or nullptr if it does not exist. Name and index correspond to the the NED syntax @propertyname[index](keys-and-values)
, where "[index]" is optional.
◆ getAsBool()
virtual bool getAsBool |
( |
const char * |
name, |
|
|
const char * |
index = nullptr |
|
) |
| const |
|
virtual |
Returns the property as a boolean. If the property is missing, this method returns false; otherwise, only the first value in the default key ("") is examined. If it is "false", this method returns false; in all other cases (missing, empty, some other value) it returns true.
Examples: @foo
: true, @foo()
: true, @foo(false)
: false, @foo(true)
: true, @foo(any)
: true, @foo(a=x,b=y,c=z)
: true; @foo(somekey=false)
: true (!)
◆ getIndicesFor()
virtual std::vector<const char *> getIndicesFor |
( |
const char * |
name | ) |
const |
|
virtual |
Returns unique indices for a property. Name and index correspond to the NED syntax @propertyname[index](keys-and-values)
. The strings in the returned array do not need to be deallocated and must not be modified.
◆ add()
Adds the given property to this object.
◆ remove()
virtual void remove |
( |
int |
k | ) |
|
|
virtual |
Removes the given property from this object, and deletes it.
The documentation for this class was generated from the following file: