InFact
Interpreter and factory for easily creating C++ objects at run-time
|
Provides various example class headers. More...
Go to the source code of this file.
Classes | |
class | infact::Date |
An interface to represent a date. More... | |
class | infact::DateImpl |
An implementation of the Date interface that can be constructed by a Factory (because of the REGISTER_DATE(DateImpl) declaration in example.cc ). More... | |
class | infact::Person |
An interface representing a person. More... | |
class | infact::PersonImpl |
A concrete implementation of the Person interface that can be constructed by a Factory (because of the REGISTER_PERSON(PersonImpl) declaration in example.cc ). More... | |
class | infact::Animal |
A very simple class to represent an animal. More... | |
class | infact::Cow |
A class to represent a cow. More... | |
class | infact::Sheep |
A sheep. More... | |
class | infact::PetOwner |
An owner of a pet. More... | |
class | infact::HumanPetOwner |
A concrete type of PetOwner that can be constructed by a Factory<PetOwner> instance. More... | |
Namespaces | |
infact | |
The namespace for the entire InFact library. | |
Macros | |
#define | REGISTER_DATE(TYPE) REGISTER_NAMED(TYPE,TYPE,Date) |
The macro by which Date implementations may register themselves with the Factory that can construct Date instances. More... | |
#define | REGISTER_PERSON(TYPE) REGISTER_NAMED(TYPE,TYPE,Person) |
The macro by which Person implementations may register themselves with the Factory that can construct Person instances. More... | |
#define | REGISTER_ANIMAL(TYPE) REGISTER_NAMED(TYPE,TYPE,Animal) |
Registers the Animal with the specified subtype TYPE and NAME with the Animal Factory. More... | |
#define | REGISTER_PET_OWNER(TYPE) REGISTER_NAMED(TYPE,TYPE,PetOwner) |
The macro by which PetOwner implementations may register themselves with the Factory that can construct PetOwner instances. More... | |
Provides various example class headers.
Please note the presence of the various REGISTER_*
macros sprinkled throughout this file. The convention is for a REGISTER
_type macro to be placed just below the declaration of the type interface declaration.
Definition in file example.h.
#define REGISTER_ANIMAL | ( | TYPE | ) | REGISTER_NAMED(TYPE,TYPE,Animal) |
#define REGISTER_DATE | ( | TYPE | ) | REGISTER_NAMED(TYPE,TYPE,Date) |
#define REGISTER_PERSON | ( | TYPE | ) | REGISTER_NAMED(TYPE,TYPE,Person) |