#include <expr.h>
Inherits Smart< ExpData >, and BorgIv::Key.
Inherited by BorgIv::WriteExp.
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) |
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.
BorgIv::Exp::Exp | ( | ExpData & | scratch | ) |
BorgIv::Exp::operator const TargetType | ( | ) | const [inline] |
void BorgIv::Exp::operator= | ( | ExpData * | data | ) | [inline] |