InFact
Interpreter and factory for easily creating C++ objects at run-time
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
infact::Animal Class Referenceabstract

A very simple class to represent an animal. More...

#include <example.h>

Inheritance diagram for infact::Animal:
infact::FactoryConstructible infact::Cow infact::Sheep

Public Member Functions

 Animal ()
 Constructs a generic animal. More...
 
virtual ~Animal ()
 Destroys this animal. More...
 
virtual const string & name () const =0
 Returns the name of this animal. More...
 
virtual int age () const =0
 Returns the age of this animal. More...
 
- Public Member Functions inherited from infact::FactoryConstructible
virtual ~FactoryConstructible ()
 Destroys this instance. More...
 
virtual void RegisterInitializers (Initializers &initializers)
 Registers data members of this class for initialization when an instance is constructed via the Factory::CreateOrDie method. More...
 
virtual void PostInit (const Environment *env, const string &init_str)
 Does any additional initialization after an instance of this class has been constructed, crucially giving access to the Environment that was in use and modified during construction by the Factory::CreateOrDie method. More...
 

Detailed Description

A very simple class to represent an animal.

Definition at line 157 of file example.h.

Constructor & Destructor Documentation

infact::Animal::Animal ( )
inline

Constructs a generic animal.

Definition at line 160 of file example.h.

virtual infact::Animal::~Animal ( )
inlinevirtual

Destroys this animal.

Definition at line 162 of file example.h.

Member Function Documentation

virtual int infact::Animal::age ( ) const
pure virtual

Returns the age of this animal.

Implemented in infact::Sheep, and infact::Cow.

virtual const string& infact::Animal::name ( ) const
pure virtual

Returns the name of this animal.

Implemented in infact::Sheep, and infact::Cow.


The documentation for this class was generated from the following file: