cProperties Class Reference
[Internal classes]

Stores properties. More...

#include <cproperties.h>

Inheritance diagram for cProperties:
cObject

List of all members.

Public Member Functions

Constructors, destructor, assignment.

 cProperties ()
 cProperties (const cProperties &other)
virtual ~cProperties ()
cPropertiesoperator= (const cProperties &other)
Redefined cObject functions

virtual cPropertiesdup () const
virtual const char * getName () const
virtual std::string info () const
virtual void parsimPack (cCommBuffer *buffer)
virtual void parsimUnpack (cCommBuffer *buffer)
Properties

virtual int getNumProperties () const
virtual const std::vector
< const char * > 
getNames () const
virtual cPropertyget (int k) const
virtual cPropertyget (const char *name, const char *index=NULL) const
virtual bool getAsBool (const char *name, const char *index=NULL) const
virtual std::vector< const char * > getIndicesFor (const char *name) const
virtual void add (cProperty *p)
virtual void remove (int k)

Detailed Description

Stores properties.


Member Function Documentation

virtual cProperty* cProperties::get ( const char *  name,
const char *  index = NULL 
) const [virtual]

Returns the given property, or NULL if it does not exist.

Name and index correspond to the the NED syntax @propertyname[index](keys-and-values), where "[index]" is optional.

virtual bool cProperties::getAsBool ( const char *  name,
const char *  index = NULL 
) 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 (!)

virtual std::vector<const char *> cProperties::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.

virtual const std::vector<const char *> cProperties::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.


The documentation for this class was generated from the following file:
Generated on Tue Dec 2 11:16:30 2014 for OMNeT++ Simulation Library by  doxygen 1.6.3