Main Page | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

BaseAgent.h File Reference

Go to the source code of this file.

Defines

#define AGENT(TYPE, NAME)
 Example: AGENT(VideoAgent, Name::VIDEO_NAME).


Define Documentation

#define AGENT TYPE,
NAME   ) 
 

Value:

public: \
virtual const char *getName() const { return (NAME); } \
static TYPE *agent() \
{ \
    TYPE *result = dynamic_cast<TYPE *>(AgentPack::getAgent(sName())); \
    if (NULL == result) { \
        throw NameException(ExInfo("cannot cast agent") \
                .addInfo("name", sName())); \
    } \
    return result; \
} \
private: \
static const char *sName() { return (NAME); }
Example: AGENT(VideoAgent, Name::VIDEO_NAME).

Enables to obtain typed pointer static VideoAgent *VideoAgent::agent();

Definition at line 38 of file BaseAgent.h.


Generated on Wed Jun 1 09:54:32 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2