Go to the first, previous, next, last section, table of contents.


CNObject -- Root of the CNCL Hierarchy

SYNOPSIS

#include <CNCL/Object.h>

TYPE

CN_OBJECT

BASE CLASSES

CNCL

DERIVED CLASSES

CNClass, CNParam, ...

RELATED CLASSES

CNClass, CNParam

DESCRIPTION

CNObject is the actual base of the CNCL inheritance tree. It must be supported by all derived classes.

virtual CNClassDesc class_desc() const;
Returns the class description (pointer to instance of CNClass) for runtime type information.
virtual bool is_a(CNClassDesc desc) const;
Returns TRUE if the queried object is of type desc, else FALSE.
virtual void print(ostream &strm = cout) const = 0;
Output object to stream.
virtual void dump(ostream &strm = cout) const = 0;
Output object to stream for debug purpose.
virtual int store_on(CNPstream &);
virtual int storer(CNPstream &);
These functions are support functions for persistent objects, so they are not implemented in all derived classes. They are yielding a warning if they are called for a non-persistent object.

UTILITIES

Object.h defines the following operators for easily writing objects to streams:

ostream &operator << (ostream &strm, const CNObject &obj);
ostream &operator << (ostream &strm, const CNObject *obj);
Write object to stream using the print() member function. It is safe to output a null pointer obj, in this case "(NIL)" is printed.


Go to the first, previous, next, last section, table of contents.