cDefaultList Class Reference
[Container classes]

#include <cdefaultlist.h>

Inheritance diagram for cDefaultList:

cObject cPolymorphic cModule cCompoundModule cSimpleModule List of all members.

Detailed Description

Internal class, used as a base class for cModule.

cDefaultList acts as a "soft owner" (see object ownership discussion in cObject documentation). Do not subclass your own classes from cDefaultList.


Public Member Functions

Constructors, destructor, assignment.
 cDefaultList (const cDefaultList &list)
 cDefaultList (const char *name=NULL)
virtual ~cDefaultList ()
cDefaultListoperator= (const cDefaultList &list)
Redefined cObject member functions
virtual cPolymorphicdup () const
virtual bool isSoftOwner ()
virtual std::string info () const
virtual void forEachChild (cVisitor *v)
virtual void netPack (cCommBuffer *buffer)
virtual void netUnpack (cCommBuffer *buffer)
Container functions.
int defaultListItems () const
cObjectdefaultListGet (int k)
bool defaultListContains (cObject *obj) const

Protected Member Functions

Redefined cObject member functions
void take (cObject *obj)
void drop (cObject *obj)

Friends

class cObject


Constructor & Destructor Documentation

cDefaultList::cDefaultList const cDefaultList list  ) 
 

Copy constructor.

Throws exception.

cDefaultList::cDefaultList const char *  name = NULL  )  [explicit]
 

Constructor.

virtual cDefaultList::~cDefaultList  )  [virtual]
 

Destructor.

The contained objects will be deleted.


Member Function Documentation

bool cDefaultList::defaultListContains cObject obj  )  const
 

Returns true if the set contains the given object, false otherwise.

cObject* cDefaultList::defaultListGet int  k  ) 
 

Get the element at the given position.

k must be between 0 and items()-1 (inclusive). Note that elements may move as the result of add() and remove() operations. If the index is out of bounds, NULL is returned.

int cDefaultList::defaultListItems  )  const [inline]
 

Returns the number of elements stored.

void cDefaultList::drop cObject obj  )  [protected, virtual]
 

Redefined.

Reimplemented from cObject.

virtual cPolymorphic* cDefaultList::dup  )  const [inline, virtual]
 

Duplication.

Throws exception.

Reimplemented from cObject.

Reimplemented in cCompoundModule, and cSimpleModule.

virtual void cDefaultList::forEachChild cVisitor v  )  [virtual]
 

Calls v->visit(this) for each contained object.

See cObject for more details.

Reimplemented from cObject.

Reimplemented in cModule, and cSimpleModule.

virtual std::string cDefaultList::info  )  const [virtual]
 

Produces a one-line description of object contents into the buffer passed as argument.

See cObject for more details.

Reimplemented from cPolymorphic.

Reimplemented in cCompoundModule, and cSimpleModule.

virtual bool cDefaultList::isSoftOwner  )  [inline, virtual]
 

Returns true.

Reimplemented from cObject.

virtual void cDefaultList::netPack cCommBuffer buffer  )  [virtual]
 

Packing and unpacking cannot be supported with this class.

This method raises an error.

Reimplemented from cObject.

virtual void cDefaultList::netUnpack cCommBuffer buffer  )  [virtual]
 

Packing and unpacking cannot be supported with this class.

This method raises an error.

Reimplemented from cObject.

cDefaultList& cDefaultList::operator= const cDefaultList list  ) 
 

Assignment operator.

Throws exception.

void cDefaultList::take cObject obj  )  [protected, virtual]
 

Redefined.

Reimplemented from cObject.


The documentation for this class was generated from the following file:
Generated on Sat Oct 21 17:47:56 2006 for OMNeT++/OMNEST Simulation Library by  doxygen 1.4.6