|
Reranker Framework (ReFr)
Reranking framework for structure prediction and discriminative language modeling
|
A base class for a mapping from variables of a specific type to their values. More...
#include <environment.H>
Public Member Functions | |
| VarMapBase (const string &name, Environment *env, bool is_primitive) | |
| Constructs a base class for a concrete implementation providing a mapping from variables of a particular type to their values. More... | |
| virtual | ~VarMapBase () |
| virtual bool | IsPrimitive () const |
| Returns whether this instance contains primitive or primtive vector variables. More... | |
| virtual const string & | Name () const |
| Returns the type name of the variables of this instance. More... | |
| virtual bool | Defined (const string &varname) const =0 |
| Returns whether the specified variable has a definition in this environment. More... | |
| virtual void | ReadAndSet (const string &varname, StreamTokenizer &st)=0 |
| Reads the next value (primitive or spec for constructing a Factory-constructible object) from the specified stream tokenizer and sets the specified variable to that value. More... | |
| virtual void | Print (ostream &os) const =0 |
| Prints out a human-readable string to the specified output stream containing the variables, their type and, if primitive, their values. More... | |
| virtual VarMapBase * | Copy (Environment *env) const =0 |
| Returns a newly constructed copy of this VarMap. More... | |
Protected Member Functions | |
| void | SetMembers (const string &name, Environment *env, bool is_primitive) |
| To allow proper implementation of Copy in VarMapBase implementation, since we don't get copying of base class' members for free. More... | |
Protected Attributes | |
| string | name_ |
| The type name of this VarMap. More... | |
| Environment * | env_ |
| The Environment that holds this VarMap instance. More... | |
| bool | is_primitive_ |
| Whether this VarMap instance holds variables of primitive type or vector of primitives. More... | |
A base class for a mapping from variables of a specific type to their values.
Definition at line 65 of file environment.H.
|
inline |
Constructs a base class for a concrete implementation providing a mapping from variables of a particular type to their values.
| name | the type name of the variables in this instance |
| env | the Environment that wraps this VarMapBase instance |
| is_primitive | whether this instance contains primitive or primitive vector variables |
Definition at line 75 of file environment.H.
|
inlinevirtual |
Definition at line 78 of file environment.H.
|
pure virtual |
Returns a newly constructed copy of this VarMap.
Implemented in reranker::VarMap< T >.
|
pure virtual |
Returns whether the specified variable has a definition in this environment.
Implemented in reranker::VarMap< T >.
|
inlinevirtual |
Returns whether this instance contains primitive or primtive vector variables.
Definition at line 82 of file environment.H.
|
inlinevirtual |
Returns the type name of the variables of this instance.
Definition at line 85 of file environment.H.
|
pure virtual |
Prints out a human-readable string to the specified output stream containing the variables, their type and, if primitive, their values.
Implemented in reranker::VarMap< T >.
|
pure virtual |
Reads the next value (primitive or spec for constructing a Factory-constructible object) from the specified stream tokenizer and sets the specified variable to that value.
Implemented in reranker::VarMap< T >.
|
inlineprotected |
To allow proper implementation of Copy in VarMapBase implementation, since we don't get copying of base class' members for free.
Definition at line 108 of file environment.H.
|
protected |
The Environment that holds this VarMap instance.
Definition at line 117 of file environment.H.
|
protected |
Whether this VarMap instance holds variables of primitive type or vector of primitives.
Definition at line 120 of file environment.H.
|
protected |
The type name of this VarMap.
Definition at line 115 of file environment.H.
1.8.6