Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

IDEA::AgentImpl Class Reference
[Agent implementation base classes]

Implementation of the Agent class. More...

#include <AgentImpl.hh>

Inheritance diagram for IDEA::AgentImpl:

IDEA::PlasmaAgentImpl List of all members.

Public Methods

 AgentImpl ()
virtual ~AgentImpl ()
const std::string & getXIDDLFileName () const
 Returns the XIDDL file which has been retrieved from the command line options.

const Trace::OutputLevelgetOutputLevel () const
 Returns the output level for the invoking agent which has been retrieved from the command line options.

const std::string & getInitialStateFileName () const
 Returns the initial state file which has been retrieved from the command line options.

const std::string & getOutputFilterFileName () const
 Returns the output filter file which has been retrieved from the command line options.

AgentTimingServicegetAgentTimingService () const
 Returns the AgentTimingService instance associated with the invoking agent.

AgentRelaygetAgentRelay () const
 Returns the AgentRelay instance associated with the invoking agent.

PslDatabasegetDatabase () const
 returns the PslDatabase instance associated with the invoking agent.

PslModelManagergetModelManager () const
 returns the PslModelManager instance associated with the invoking agent.

void start ()
 Initializes the invoking agent and start the invoking agent.

void stop ()
 Stops the agent if it has been started.

bool initialize ()
 Initializes the factory class-instances to use. Factory classes are responsible for creating all the class-instances.

bool isInitialized () const
 Returns true if the invoking agent has been initialized, otherwise returns false.


Protected Methods

void deleteInstances ()
 Stops the agent relay and deletes all the instances created in createInstances.


Protected Attributes

AgentRelaym_AgentRelay
PslDatabasem_Database
PslModelManagerm_ModelManager
AgentTimingServicem_AgentTimingService

Private Types

typedef ACE_Thread_Mutex MutexLock
typedef ACE_Thread_Condition<
MutexLock
ConditionVariable

Private Methods

void createInstances ()
void wait ()
 A block call untill the agent is considered done.

virtual bool loadInitialState ()
virtual bool loadModel ()
bool loadPostInitModules ()
 Loads the modules passed to the command-line argument as modules which need to be loaded after initialization.

virtual bool preInitialize ()
 Hook on the start of the initialization.

virtual bool postInitialize ()
 Hook on the end of the initialization.


Private Attributes

bool m_Initialized
 Boolean indicating if the agent-runner has been initialized successfully.

std::string m_XIDDLFileName
Trace::OutputLevel m_OutputLevel
std::string m_InitialStateFileName
std::string m_OutputFilterFileName
bool m_OutputFilterFileNamePassed
std::string m_PoolName
std::string m_Name
MutexLock m_Mutex
ConditionVariablem_ConditionVariable

Friends

class Agent

Detailed Description

Implementation of the Agent class.

Author:
David Rijsman rijsman@email.arc.nasa.gov


Member Typedef Documentation

typedef ACE_Thread_Condition< MutexLock > IDEA::AgentImpl::ConditionVariable [private]
 

typedef ACE_Thread_Mutex IDEA::AgentImpl::MutexLock [private]
 


Constructor & Destructor Documentation

IDEA::AgentImpl::AgentImpl  
 

IDEA::AgentImpl::~AgentImpl   [virtual]
 


Member Function Documentation

void IDEA::AgentImpl::createInstances   [private]
 

void IDEA::AgentImpl::deleteInstances   [protected]
 

Stops the agent relay and deletes all the instances created in createInstances.

AgentRelay * IDEA::AgentImpl::getAgentRelay  
 

Returns the AgentRelay instance associated with the invoking agent.

AgentTimingService * IDEA::AgentImpl::getAgentTimingService  
 

Returns the AgentTimingService instance associated with the invoking agent.

PslDatabase * IDEA::AgentImpl::getDatabase  
 

returns the PslDatabase instance associated with the invoking agent.

const std::string & IDEA::AgentImpl::getInitialStateFileName  
 

Returns the initial state file which has been retrieved from the command line options.

The agent constructor will use the AgentCommandLineParser to parse the initial state filename from the command line options passed to the executable which invokes this API. See AgentCommandLineParser to see which command line option needs to be used to pass the initial state filename.

PslModelManager * IDEA::AgentImpl::getModelManager  
 

returns the PslModelManager instance associated with the invoking agent.

const std::string & IDEA::AgentImpl::getOutputFilterFileName  
 

Returns the output filter file which has been retrieved from the command line options.

The agent constructor will use the AgentCommandLineParser to parse the output filter filename from the command line options passed to the executable which invokes this API. See AgentCommandLineParser to see which command line option needs to be used to pass the initial state filename.

const Trace::OutputLevel & IDEA::AgentImpl::getOutputLevel  
 

Returns the output level for the invoking agent which has been retrieved from the command line options.

The agent constructor will use the AgentCommandLineParser to parse the output level from the command line options passed to the executable which invokes this API. See AgentCommandLineParser to see which command line option needs to be used to set the output level.

const std::string & IDEA::AgentImpl::getXIDDLFileName  
 

Returns the XIDDL file which has been retrieved from the command line options.

The agent constructor will use the AgentCommandLineParser to parse the XIDDL filename from the command line options passed to the executable which invokes this API. See AgentCommandLineParser to see which command line option needs to be used to pass the XIDDL filename.

bool IDEA::AgentImpl::initialize  
 

Initializes the factory class-instances to use. Factory classes are responsible for creating all the class-instances.

Initializes which instance of PslModelManager to use, by default this will be the one by the name 'EUROPA2'. One can overload this by setting the environment variable 'IDEA_PLAN_DB' with a value of the name of the manager you want to use. Obiously one has to create a specialization of the class PlsModelManagerFactory with the name you set then environment variable to and one must assure to load the object-file before initialize get's invoked.

Initializes which instance of PslModelLoader to use, by default this will be the one by the name 'XERCES'. One can overload this by setting the environment variable 'IDEA_XML_PARSER' with a value of the name of the loader you want to use. Obiously one has to create a specialization of the class PlsModelLoaderFactory with the name you set then environment variable to and one must assure to load the object-file before initialize get's invoked.

bool IDEA::AgentImpl::isInitialized  
 

Returns true if the invoking agent has been initialized, otherwise returns false.

virtual bool IDEA::AgentImpl::loadInitialState   [inline, private, virtual]
 

Reimplemented in IDEA::PlasmaAgentImpl.

virtual bool IDEA::AgentImpl::loadModel   [inline, private, virtual]
 

Reimplemented in IDEA::PlasmaAgentImpl.

bool IDEA::AgentImpl::loadPostInitModules   [private]
 

Loads the modules passed to the command-line argument as modules which need to be loaded after initialization.

virtual bool IDEA::AgentImpl::postInitialize   [inline, private, virtual]
 

Hook on the end of the initialization.

virtual bool IDEA::AgentImpl::preInitialize   [inline, private, virtual]
 

Hook on the start of the initialization.

Reimplemented in IDEA::PlasmaAgentImpl.

void IDEA::AgentImpl::start  
 

Initializes the invoking agent and start the invoking agent.

void IDEA::AgentImpl::stop  
 

Stops the agent if it has been started.

void IDEA::AgentImpl::wait   [private]
 

A block call untill the agent is considered done.


Friends And Related Function Documentation

friend class Agent [friend]
 


Member Data Documentation

AgentRelay* IDEA::AgentImpl::m_AgentRelay [protected]
 

AgentTimingService* IDEA::AgentImpl::m_AgentTimingService [protected]
 

ConditionVariable* IDEA::AgentImpl::m_ConditionVariable [private]
 

PslDatabase* IDEA::AgentImpl::m_Database [protected]
 

bool IDEA::AgentImpl::m_Initialized [private]
 

Boolean indicating if the agent-runner has been initialized successfully.

std::string IDEA::AgentImpl::m_InitialStateFileName [private]
 

PslModelManager* IDEA::AgentImpl::m_ModelManager [protected]
 

MutexLock IDEA::AgentImpl::m_Mutex [private]
 

std::string IDEA::AgentImpl::m_Name [private]
 

std::string IDEA::AgentImpl::m_OutputFilterFileName [private]
 

bool IDEA::AgentImpl::m_OutputFilterFileNamePassed [private]
 

Trace::OutputLevel IDEA::AgentImpl::m_OutputLevel [private]
 

std::string IDEA::AgentImpl::m_PoolName [private]
 

std::string IDEA::AgentImpl::m_XIDDLFileName [private]
 


Contact information
© IDEA
Generated on Fri Feb 3 17:09:44 2006 for IDEA.