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

BaseAgent Class Reference

Inheritance diagram for BaseAgent:

Inheritance graph
[legend]
Collaboration diagram for BaseAgent:

Collaboration graph
[legend]

Detailed Description

Ancestor for all agents.

Definition at line 15 of file BaseAgent.h.

Public Member Functions

 BaseAgent ()
virtual ~BaseAgent ()
bool isInitialized ()
void init ()
void update ()
 
Exceptions:
LogicException when agent is not initialized.

void shutdown ()

Protected Member Functions

virtual void own_init ()
virtual void own_update ()
virtual void own_shutdown ()


Constructor & Destructor Documentation

BaseAgent::BaseAgent  ) 
 

Definition at line 15 of file BaseAgent.cpp.

00016 {
00017     m_initialized = false;
00018 }

virtual BaseAgent::~BaseAgent  )  [inline, virtual]
 

Definition at line 24 of file BaseAgent.h.

00024 {}


Member Function Documentation

void BaseAgent::init  ) 
 

Definition at line 21 of file BaseAgent.cpp.

00022 {
00023     LOG_DEBUG(ExInfo("init").addInfo("name", getName()));
00024     //NOTE: agent can call oneself in init()
00025     m_initialized = true;
00026     own_init();
00027 }

bool BaseAgent::isInitialized  )  [inline]
 

Definition at line 25 of file BaseAgent.h.

00025 { return m_initialized; }

virtual void BaseAgent::own_init  )  [inline, protected, virtual]
 

Reimplemented in GameAgent, InputAgent, OptionAgent, ScriptAgent, SDLSoundAgent, SoundAgent, TimerAgent, VideoAgent, and SubTitleAgent.

Definition at line 19 of file BaseAgent.h.

00019 {}

virtual void BaseAgent::own_shutdown  )  [inline, protected, virtual]
 

Reimplemented in GameAgent, InputAgent, OptionAgent, ScriptAgent, SDLSoundAgent, VideoAgent, and SubTitleAgent.

Definition at line 21 of file BaseAgent.h.

00021 {}

virtual void BaseAgent::own_update  )  [inline, protected, virtual]
 

Reimplemented in GameAgent, InputAgent, TimerAgent, VideoAgent, and SubTitleAgent.

Definition at line 20 of file BaseAgent.h.

00020 {}

void BaseAgent::shutdown  ) 
 

Definition at line 44 of file BaseAgent.cpp.

00045 {
00046     LOG_DEBUG(ExInfo("shutdown").addInfo("name", getName()));
00047     own_shutdown();
00048     m_initialized = false;
00049 }

void BaseAgent::update  ) 
 

Exceptions:
LogicException when agent is not initialized.

Definition at line 33 of file BaseAgent.cpp.

00034 {
00035     if (!m_initialized) {
00036         throw LogicException(ExInfo("agent is not ready")
00037             .addInfo("name", getName()));
00038     }
00039 
00040     own_update();
00041 }


The documentation for this class was generated from the following files:
Generated on Wed Jun 1 09:54:38 2005 for Fish Fillets - Next Generation by  doxygen 1.4.2