DataClass Class Reference
[Data]

#include <data.h>

Inheritance diagram for DataClass:
Inheritance graph
[legend]

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.


Constructor & Destructor Documentation

DataClass::DataClass (  )  [inline]

The constructors are overwritten to ensure a proper allocation_count.

DataClass::DataClass ( const DataClass  )  [inline]
DataClass::DataClass ( const Data d  ) 
virtual DataClass::~DataClass (  )  [inline, virtual]

References assert().


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 >.

References assert(), printf(), and type_name().

Referenced by Data::getField().

DataClass& DataClass::operator= ( const DataClass  )  [inline]
void DataClass::setField ( QString  ,
Data  v 
) [protected, virtual]

Reimplemented in Token.

References printf(), and type_name().

Referenced by Data::setField().

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]
virtual void DataClass::visit ( DataVisitor v  )  [protected, pure virtual]

Friends And Related Function Documentation

friend class Data [friend]
friend class DataVisitor [friend]

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated by  doxygen 1.6.2