InFact
Interpreter and factory for easily creating C++ objects at run-time
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Classes | Namespaces | Macros
example.h File Reference

Provides various example class headers. More...

#include <string>
#include "factory.h"

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...
 

Detailed Description

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.

Author
dbike.nosp@m.l@go.nosp@m.ogle..nosp@m.com (Dan Bikel)

Definition in file example.h.

Macro Definition Documentation

#define REGISTER_ANIMAL (   TYPE)    REGISTER_NAMED(TYPE,TYPE,Animal)

Registers the Animal with the specified subtype TYPE and NAME with the Animal Factory.

Definition at line 175 of file example.h.

#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.

Definition at line 68 of file example.h.

#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.

Definition at line 122 of file example.h.

#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.

Definition at line 273 of file example.h.