iso::flock::EnvBehavior Class Reference

#include <iso_flock_env_behavior.h>

Inherits iso::flock::Behavior.

Inherited by iso::flock::EnvAgentInteractBehavior, iso::flock::EnvClampBehavior, iso::flock::EnvDecayBehavior, iso::flock::EnvDiffusionBehavior, iso::flock::EnvGiererMeinhardtBehavior, and iso::flock::EnvGrayScottBehavior.

Inheritance diagram for iso::flock::EnvBehavior:

Inheritance graph
[legend]
Collaboration diagram for iso::flock::EnvBehavior:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 EnvBehavior (const base::String &pInputParameterString, const base::String &pOutputParameterString)
 create environment behavior
 EnvBehavior (Env *pEnv, const base::String &pBehaviorName, const base::String &pInputParameterString, const base::String &pOutputParameterString)
 create environment behavior
virtual ~EnvBehavior ()
 destructor
virtual void act ()=0
 perform behavior
virtual base::String info (int pPropagationLevel=0) const
 print behavior information

Protected Member Functions

 EnvBehavior ()
 default constructor
virtual void createInputParameters () throw (FlockException)
 create input behavior parameters
Exceptions:
FlockException failed to create input parameters

virtual void createOutputParameters () throw (FlockException)
 create output behavior parameters
Exceptions:
FlockException failed to create output parameters


Protected Attributes

EnvmEnv
 create internal behavior parameter
QHash< base::String, base::String > mInputAgentParameterNames
 environment this behavior belongs to
QHash< base::String, base::String > mOutputAgentParameterNames

Friends

std::ostream & operator<< (std::ostream &pOstream, const EnvBehavior &pBehavior)
 retrieve textual behavior info

Constructor & Destructor Documentation

EnvBehavior::EnvBehavior ( const base::String &  pInputParameterString,
const base::String &  pOutputParameterString 
)

create environment behavior

Parameters:
pInputParameterString input parameter string (parameters are space separated)
pOutputParameterString output parameter string (paramaters are space separated)

EnvBehavior::EnvBehavior ( Env pEnv,
const base::String &  pBehaviorName,
const base::String &  pInputParameterString,
const base::String &  pOutputParameterString 
)

create environment behavior

Parameters:
pEnv reference to environment to which this behavior is added
pBehaviorName behavior name
pInputParameterString input parameter string (parameters are space separated)
pOutputParameterString output parameter string (paramaters are space separated)

EnvBehavior::~EnvBehavior (  )  [virtual]

destructor

EnvBehavior::EnvBehavior (  )  [protected]

default constructor


Member Function Documentation

virtual void iso::flock::EnvBehavior::act (  )  [pure virtual]

perform behavior

Implements iso::flock::Behavior.

Implemented in iso::flock::EnvAgentInteractBehavior, iso::flock::EnvClampBehavior, iso::flock::EnvDecayBehavior, iso::flock::EnvDiffusionBehavior, iso::flock::EnvGiererMeinhardtBehavior, and iso::flock::EnvGrayScottBehavior.

base::String EnvBehavior::info ( int  pPropagationLevel = 0  )  const [virtual]

print behavior information

Parameters:
pPropagationLevel how far the propagation method proceeds through composite classes (-1: unlimited, 0: no proceeding, >0: limited proceeding)

Reimplemented from iso::flock::Behavior.

void EnvBehavior::createInputParameters (  )  throw (FlockException) [protected, virtual]

create input behavior parameters

Exceptions:
FlockException failed to create input parameters

Reimplemented from iso::flock::Behavior.

void EnvBehavior::createOutputParameters (  )  throw (FlockException) [protected, virtual]

create output behavior parameters

Exceptions:
FlockException failed to create output parameters

Reimplemented from iso::flock::Behavior.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  pOstream,
const EnvBehavior pBehavior 
) [friend]

retrieve textual behavior info

Parameters:
pOstream output text stream
pBehavior behavior


Member Data Documentation

Env* iso::flock::EnvBehavior::mEnv [protected]

create internal behavior parameter

Parameters:
pParameterName name of parameter
pValues values of parameter
Returns:
parameter
creates an internal behavior parameter which is visible at the level of the agent (i.e. other behaviors can access it).
the name of the parameter is constructed as follows: behaviorName_parameterName.

QHash< base::String, base::String > iso::flock::EnvBehavior::mInputAgentParameterNames [protected]

environment this behavior belongs to

QHash< base::String, base::String > iso::flock::EnvBehavior::mOutputAgentParameterNames [protected]


The documentation for this class was generated from the following files:
Generated on Fri Feb 25 15:28:03 2011 for iso_flock by  doxygen 1.5.1