|
InFact
Interpreter and factory for easily creating C++ objects at run-time
|
A concrete, typed implementation of the MemberInitializer base class. More...
#include <factory.h>
Public Member Functions | |
| TypedMemberInitializer (const string &name, T *member, bool required=false) | |
| A concrete implementation of the MemberInitializer base class, holding a pointer to a typed member that needs to be initialized. More... | |
| virtual | ~TypedMemberInitializer () |
| virtual void | Init (StreamTokenizer &st, Environment *env) |
| Initializes this instance based on the following tokens obtained from the specified StreamTokenizer. More... | |
Public Member Functions inherited from infact::MemberInitializer | |
| MemberInitializer (const string &name, bool required) | |
| Initializes this base class. More... | |
| virtual | ~MemberInitializer () |
| Destroys this instance. More... | |
| virtual string | Name () |
| Returns the name of the member initialized by this instance, as it should appear in a spec string parsed by Factory::CreateOrDie. More... | |
| virtual int | Initialized () const |
| Returns the number of times this member initializer’s Init method has been invoked. More... | |
| virtual bool | Required () const |
| Whether this member is required to be initialized in a spec string. More... | |
Protected Attributes | |
| T * | member_ |
Protected Attributes inherited from infact::MemberInitializer | |
| string | name_ |
| The name of this member. More... | |
| int | initialized_ |
| The number of times this member initializer’s Init method has been invoked. More... | |
| bool | required_ |
| Whether this member is required to be initialized. More... | |
A concrete, typed implementation of the MemberInitializer base class.
This class holds a pointer to a particular type of data member from some Factory-constructible class that it can initialize from a StreamTokenizer instance.
| T | a type of data member from a Factory-constructible class that this class can initialize by reading tokens from a StreamTokenizer instance |
|
inline |
A concrete implementation of the MemberInitializer base class, holding a pointer to a typed member that needs to be initialized.
| name | the name of the member to be initialized, as it should Factory::CreateOrDie method |
| member | a pointer to a data member of a C++ class to be initialized, or nullptr if this initializer should only modify the Environment (providing a mapping between a name a value that might be used by a class’ Init method |
| required | whether this member is required to be initialized in a spec string |
|
inlinevirtual |
|
inlinevirtual |
Initializes this instance based on the following tokens obtained from the specified StreamTokenizer.
| st | the stream tokenizer whose next tokens contain the information to initialize this data member |
| env | the current environment, to be modified by this member’s initialization |
Implements infact::MemberInitializer.
|
protected |
1.8.6