Go to the source code of this file.
Defines | |
#define | AGENT(TYPE, NAME) |
Example: AGENT(VideoAgent, Name::VIDEO_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); } Enables to obtain typed pointer static VideoAgent *VideoAgent::agent(); Definition at line 38 of file BaseAgent.h. |