Main Page | Modules | Class Hierarchy | Class List | File List | Class Members | Related Pages

cOutVector Class Reference
[Statistical data collection]

#include <coutvect.h>

Inheritance diagram for cOutVector:

cObject cPolymorphic List of all members.

Detailed Description

Responsible for recording vector simuotation results (an output vector).

A cOutVector object can write doubles to the output vector file (or any another device determined by the current cOutputVectorManager).


Public Member Functions

Constructors, destructor, assignment
 cOutVector (const char *name=NULL, int tuple=1)
 cOutVector (const cOutVector &r)
virtual ~cOutVector ()
cOutVector & operator= (const cOutVector &)
Redefined cObject member functions.
virtual void setName (const char *name)
virtual cObject * dup () const
virtual std::string info () const
virtual void netPack (cCommBuffer *buffer)
virtual void netUnpack (cCommBuffer *buffer)
Configuring and writing to output vectors.
virtual bool record (double value)
virtual bool record (double value1, double value2)
virtual void enable ()
virtual void disable ()
virtual bool isEnabled ()
long valuesReceived ()
long valuesStored ()
int tuple ()


Constructor & Destructor Documentation

cOutVector::cOutVector (  const char *  name = NULL,
int  tuple = 1
)  [explicit]
 

Constructor.

Accepts the object name. The second argument can be 1 or 2.

cOutVector::cOutVector (  const cOutVector &  r  )  [inline]
 

Copy constructor.

virtual cOutVector::~cOutVector (   )  [virtual]
 

Destructor.


Member Function Documentation

virtual void cOutVector::disable (   )  [inline, virtual]
 

Disables recording data via this object.

record() methods will return false without doing anything.

virtual cObject* cOutVector::dup (   )  const [inline, virtual]
 

Dupping is not implemented for cOutVector.

This function gives an error (throws cRuntimeError) when called.

Reimplemented from cObject.

virtual void cOutVector::enable (   )  [inline, virtual]
 

Enables recording data via this object.

(It is enabled by default.)

virtual std::string cOutVector::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.

virtual bool cOutVector::isEnabled (   )  [inline, virtual]
 

Returns true if recording the data is enabled, false otherwise.

virtual void cOutVector::netPack (  cCommBuffer *  buffer  )  [virtual]
 

Packing and unpacking cannot be supported with this class.

This methods raises an error.

Reimplemented from cObject.

virtual void cOutVector::netUnpack (  cCommBuffer *  buffer  )  [virtual]
 

Packing and unpacking cannot be supported with this class.

This methods raises an error.

Reimplemented from cObject.

cOutVector& cOutVector::operator= (  const cOutVector &   )  [inline]
 

Assignment is not supported by this class: this method throws a cRuntimeError when called.

virtual bool cOutVector::record (  double  value1,
double  value2
)  [virtual]
 

Records two values with the current simulation time as timestamp.

It can be used only in the case if the instance of cOutVector was created with tuple=2, otherwise it throws cRuntimeError.

The return value is true if the data was actually recorded, and false if it was not recorded (because of filtering, etc.)

virtual bool cOutVector::record (  double  value  )  [virtual]
 

Records the value with the current simulation time as timestamp.

It can be used only in the case if the instance of cOutVector was created with tuple=1, otherwise it throws cRuntimeError.

The return value is true if the data was actually recorded, and false if it was not recorded (because of filtering, etc.)

virtual void cOutVector::setName (  const char *  name  )  [virtual]
 

Sets the name of the object.

It is not possible to call this method after the first call to record().

Reimplemented from cObject.

int cOutVector::tuple (   )  [inline]
 

Returns the tuple parameter passed to the constructor.

long cOutVector::valuesReceived (   )  [inline]
 

Returns the total number of values passed to the record() method of this output vector object.

This includes the values passed while the object was disabled (see disable()).

long cOutVector::valuesStored (   )  [inline]
 

Returns the number of values actually stored by this output vector object.

The values passed while the object was disabled (via disable(), environment configuration, filtering, etc.) do not count.


The documentation for this class was generated from the following file:
Generated on Fri Apr 1 12:25:34 2005 for OMNeT++/OMNEST Simulation Library by  doxygen 1.3.9.1