DataClass Class Reference
[Data]

#include <data.h>

Inherited by Array< D, T >, Array< 1, Data >, Array< SM, T >, FloatClass< T, C >, IntegerClass< T, S, C >, Null, String, Symbol, and Token.

List of all members.

Public Member Functions

 DataClass ()
 DataClass (const DataClass &)
DataClassoperator= (const DataClass &)
 DataClass (const Data &d)
virtual ~DataClass ()

Protected Member Functions

virtual DataClassshallow_copy () const =0
virtual QString type_name () const =0
virtual Data getField (QString ref)
virtual void setField (QString, Data v)
virtual void visit (DataVisitor &v)=0

Friends

class Data
class DataVisitor


Detailed Description

This is were the magic happens. All types in Om inherit from the DataClass. This class includes an allocation_count, which remembers how many time the object is supposed to be on the heap. This is similar to a reference counter. However, the first bump from zero allocation count to 1 is performed by making an explicit shallow copy towards the heap and returning that as value.

Definition at line 112 of file data.h.


Constructor & Destructor Documentation

DataClass::DataClass (  )  [inline]

The constructors are overwritten to ensure a proper allocation_count.

Definition at line 160 of file data.h.

DataClass::DataClass ( const DataClass  )  [inline]

Definition at line 164 of file data.h.

DataClass::DataClass ( const Data d  ) 

virtual DataClass::~DataClass (  )  [inline, virtual]

Definition at line 174 of file data.h.


Member Function Documentation

Data DataClass::getField ( QString  ref  )  [protected, virtual]

setting and getting of subtrees and values

Reimplemented in Array< D, T >, Token, Array< 1, Data >, and Array< SM, T >.

Definition at line 65 of file data.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 168 of file data.h.

void DataClass::setField ( QString  ,
Data  v 
) [protected, virtual]

Reimplemented in Token.

Definition at line 73 of file data.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

virtual DataClass* DataClass::shallow_copy (  )  const [protected, pure virtual]

The shallow_copy function should be overridden to return a shallow copy of the own object, but allocated with new.

Implemented in Array< D, T >, String, Token, Null, IntegerClass< T, S, C >, FloatClass< T, C >, Symbol, Array< 1, Data >, and Array< SM, T >.

virtual QString DataClass::type_name (  )  const [protected, pure virtual]

Implemented in Array< D, T >, String, Token, Null, IntegerClass< T, S, C >, FloatClass< T, C >, Symbol, Array< 1, Data >, and Array< SM, T >.

Here is the caller graph for this function:

virtual void DataClass::visit ( DataVisitor v  )  [protected, pure virtual]

Implemented in Array< D, T >, String, Token, Null, IntegerClass< T, S, C >, FloatClass< T, C >, Symbol, Array< 1, Data >, and Array< SM, T >.

Here is the caller graph for this function:


Friends And Related Function Documentation

friend class Data [friend]

Definition at line 115 of file data.h.

friend class DataVisitor [friend]

Definition at line 177 of file data.h.


The documentation for this class was generated from the following files:

Generated on Sat Feb 20 19:04:27 2010 for Data Objects by  doxygen 1.5.9