BorgIv::Exp Class Reference
[Data]

Functional expressions in C++. More...

#include <expr.h>

Inherits Smart< ExpData >, and BorgIv::Key.

Inherited by BorgIv::WriteExp.

Collaboration diagram for BorgIv::Exp:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 Exp ()
 Exp (ExpData *d)
 Exp (ExpData &scratch)
Indexing expressions
Indexing in expression always results in read only data. This avoids a destructive programming style. To modify data, create a new expression containing a specific set of tokens (in whatever native type that is available) and cast it to an expression itself. Another way to create new expressions in a destructive way is to use ExpCreator, which will not return read only values but assignable expressions.

Exp operator[] (Key *key) const
template<class TargetType >
 operator const TargetType () const
void operator= (ExpData *data)


Detailed Description

Functional expressions in C++.

Expressions are split in two parts. The first part are the Exp and WriteExp objects, which represent the main access point to read only and writable expressions. The second side of expressions is the logic behind it, which is hidden away in the ExpContent. All expressions can be indexed (if they are array like, otherwise an error can be thrown or nothing returned. Depending on the writability the returned value can be written to.

To use the Exp, ReadExp and WriteExp objects with the memory architecture we need to provide first the basic ExpContents which are in our case the Map and File objects. Aside from this do we need the standard value_id'ed object. Normally every exp will contain such a ValueIdContent. If we make a map writable then we convert it to a writable object in which

Definition at line 50 of file expr.h.


Constructor & Destructor Documentation

BorgIv::Exp::Exp (  ) 

Definition at line 129 of file expr.h.

BorgIv::Exp::Exp ( ExpData d  ) 

Definition at line 115 of file expr.h.

BorgIv::Exp::Exp ( ExpData scratch  ) 

Will make a copy of the input expression

Definition at line 120 of file expr.h.


Member Function Documentation

template<class TargetType >
BorgIv::Exp::operator const TargetType (  )  const [inline]

type conversion to our expected target type.

Definition at line 72 of file expr.h.

void BorgIv::Exp::operator= ( ExpData data  )  [inline]

assignment

Definition at line 80 of file expr.h.

Exp BorgIv::Exp::operator[] ( Key key  )  const

Definition at line 124 of file expr.h.


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

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