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

IDEA::PlasmaDatabaseImpl Class Reference

#include <PlasmaDatabaseImpl.hh>

Inheritance diagram for IDEA::PlasmaDatabaseImpl:

IDEA::PslDatabaseImpl List of all members.

Public Methods

 PlasmaDatabaseImpl (const PslModelManager *modelManager, const std::string &agentName, const std::string &name)
 ~PlasmaDatabaseImpl ()
void archive (const Time &t)
const PslVariablecreateVariable (const PslDatabase *db, const EUROPA::ConstrainedVariableId &variableId)
const PslVariablecreateVariable (const PslDatabase *db, const EUROPA::AbstractDomain &baseDomain, const std::string &name)
 Constructs a PLASMA variable with the specified base domain and name, and a PslVariable to represent it.

const PslTokencreateToken (const PslDatabase *db, const EUROPA::TokenId &token)
EUROPA::PlanDatabaseId getPlanDatabase () const
EUROPA::RulesEngineId getRulesEngine () const
const EUROPA::ConstraintEngineId & getConstraintEngine () const
bool isConsistent ()
void setActiveUpdate ()
 Set active update enables the database to be populated with plan-server datastructures in real time they show up in the underlying database.

void setPassiveUpdate ()
 Set active update disables the database to be populated with plan-server datastructures in real time they show up in the underlying database.

void print (std::ostream &os)
 Prints the content of the invoking database to os.

void resetContent ()
const std::string & getAgentName () const
void setAgentName (const std::string &name)
const PslTokencreateToken (const PslDatabase *database, const PslTimeline *timeline, const PslPredicate *predicate, const Time &earliestStart, const Time &latestStart, const Time &earliestEnd, const Time &latestEnd, unsigned int externalTokenId, const TokenLocation &source, const std::string &comRelayName)
const PslTokengetToken (int uid)
void removeToken (const PslTokenImpl *token)
void removeVariable (const PslVariable *var)
PslConstantcreateConstant (const std::string &name, double value, const PslConstantType &type)
 Will create a constant by the name name with value value of type type. If a constant by the name name already exists with a different value and/or type this will raise an error. Will return the pointer to the (created) PslConstant.

PslObjectcreateObject (const PslDatabase *database, const PslObjectClass *objectClass, const std::string &objectName)
 Will create an instance of the object-class objectClass by the name objectName and return a pointer to this instance. Will return the existing instance of PslObject if it already exists by the name objectName.

const PslVariablecreateVariable (const PslDatabase *database, int lb, int ub, const std::string &name)
 Will create an instance of PslVariable of type int with lowerbound lb and upperbound ub.

const PslVariablecreateVariable (const PslDatabase *database, int value, const std::string &name)
const PslVariablecreateVariable (const PslDatabase *database, const PslDataType &type, const std::string &name)
const PslVariablecreateVariable (const PslDatabase *database, double lb, double ub, const std::string &name)
const PslVariablecreateVariable (const PslDatabase *database, double value, const std::string &name)
const PslVariablecreateVariable (const PslDatabase *database, const PslLabelSet *ls, const std::string &name)
const PslVariablecreateBoolVariable (const PslDatabase *database, const std::string &name)
const PslVariablegetVariable (int key)
 Will return the PslVariable instance whose key-value is equal to key if such an instance exists, otherwise returns a null-pointer.

PslConstantgetConstant (const std::string &name)
 Returns the PslConstant instance by the name name if it exists otherwise returns a null-pointer.

const PslModelManagergetModelManager ()
 Returns the PslModelManager instance associated with the invoking database.

const std::string & getName () const
 Returns the name of the invoking database.

PslObjectgetObject (const std::string &name)
 Returns the PslObject instance by the name name if it exists otherwise returns a null-pointer.

const PslObjectList getObjects ()
 Returns all the PslObject instances associated with the invoking database.

const PslVariablegetTimeVariable ()
 Returns the time-variable of the invoking database.

void setTime (const Time &time)
 Sets the time of the invoking database to time.

void setPendingMessages (bool value)
 Sets the variable indicating if there are pending-messages in a reactor (typically the reactive-planner) to value.

const PslTrueFalseVariablegetPendingMessageVariable () const
const Time getTime ()
 Returns the current time of the invoking database.

void lock (const std::string &location)
void unLock (const std::string &location)
void setPrintFilter (PslOutputFilter *filter, bool deleteInstance)
virtual int externalize (const PslToken *token)
const PslTokengetExternalizedToken (int id)

Protected Methods

void initializeExtended (const PslDatabase *db)
const PslTokenaddToken (PslTokenImpl *impl)
 Creates a PslToken with implementation impl and adds the token into the token-container using the PslToken::getId as a key.

const PslVariableaddVariable (PslVariableImpl *impl)

Private Methods

const Time getTimeExtended ()
 Returns the current time of the invoking database.


Private Attributes

EUROPA::ConstraintEngineId m_ConstraintEngine
EUROPA::PlanDatabaseId m_PlanDatabase
EUROPA::RulesEngineId m_RulesEngine
PlasmaPlanDatabaseListenerm_PlanDatabaseListener
PlasmaConstraintEngineListenerm_ConstraintEngineListener

Constructor & Destructor Documentation

IDEA::PlasmaDatabaseImpl::PlasmaDatabaseImpl const PslModelManager   modelManager,
const std::string &    agentName,
const std::string &    name
 

IDEA::PlasmaDatabaseImpl::~PlasmaDatabaseImpl  
 


Member Function Documentation

const PslToken * IDEA::PslDatabaseImpl::addToken PslTokenImpl   impl [protected, inherited]
 

Creates a PslToken with implementation impl and adds the token into the token-container using the PslToken::getId as a key.

Warning:
Overrides any token using the same key

const PslVariable * IDEA::PslDatabaseImpl::addVariable PslVariableImpl   impl [protected, inherited]
 

void IDEA::PlasmaDatabaseImpl::archive const Time   t [virtual]
 

Implements IDEA::PslDatabaseImpl.

const PslVariable * IDEA::PslDatabaseImpl::createBoolVariable const PslDatabase   database,
const std::string &    name
[inherited]
 

PslConstant * IDEA::PslDatabaseImpl::createConstant const std::string &    name,
double    value,
const PslConstantType   type
[inherited]
 

Will create a constant by the name name with value value of type type. If a constant by the name name already exists with a different value and/or type this will raise an error. Will return the pointer to the (created) PslConstant.

PslObject * IDEA::PslDatabaseImpl::createObject const PslDatabase   database,
const PslObjectClass   objectClass,
const std::string &    objectName
[inherited]
 

Will create an instance of the object-class objectClass by the name objectName and return a pointer to this instance. Will return the existing instance of PslObject if it already exists by the name objectName.

const PslToken * IDEA::PslDatabaseImpl::createToken const PslDatabase   database,
const PslTimeline   timeline,
const PslPredicate   predicate,
const Time   earliestStart,
const Time   latestStart,
const Time   earliestEnd,
const Time   latestEnd,
unsigned int    externalTokenId,
const TokenLocation   source,
const std::string &    comRelayName
[inherited]
 

const PslToken * IDEA::PlasmaDatabaseImpl::createToken const PslDatabase   db,
const EUROPA::TokenId &    token
 

const PslVariable * IDEA::PslDatabaseImpl::createVariable const PslDatabase   database,
const PslLabelSet   ls,
const std::string &    name
[inherited]
 

const PslVariable * IDEA::PslDatabaseImpl::createVariable const PslDatabase   database,
double    value,
const std::string &    name
[inherited]
 

const PslVariable * IDEA::PslDatabaseImpl::createVariable const PslDatabase   database,
double    lb,
double    ub,
const std::string &    name
[inherited]
 

const PslVariable * IDEA::PslDatabaseImpl::createVariable const PslDatabase   database,
const PslDataType   type,
const std::string &    name
[inherited]
 

const PslVariable * IDEA::PslDatabaseImpl::createVariable const PslDatabase   database,
int    value,
const std::string &    name
[inherited]
 

const PslVariable * IDEA::PslDatabaseImpl::createVariable const PslDatabase   database,
int    lb,
int    ub,
const std::string &    name
[inherited]
 

Will create an instance of PslVariable of type int with lowerbound lb and upperbound ub.

const PslVariable * IDEA::PlasmaDatabaseImpl::createVariable const PslDatabase   db,
const EUROPA::AbstractDomain &    baseDomain,
const std::string &    name
 

Constructs a PLASMA variable with the specified base domain and name, and a PslVariable to represent it.

const PslVariable * IDEA::PlasmaDatabaseImpl::createVariable const PslDatabase   db,
const EUROPA::ConstrainedVariableId &    variableId
 

int IDEA::PslDatabaseImpl::externalize const PslToken   token [virtual, inherited]
 

const std::string & IDEA::PslDatabaseImpl::getAgentName   [inherited]
 

PslConstant * IDEA::PslDatabaseImpl::getConstant const std::string &    name [inherited]
 

Returns the PslConstant instance by the name name if it exists otherwise returns a null-pointer.

const EUROPA::ConstraintEngineId & IDEA::PlasmaDatabaseImpl::getConstraintEngine  
 

const PslToken * IDEA::PslDatabaseImpl::getExternalizedToken int    id [inherited]
 

const PslModelManager * IDEA::PslDatabaseImpl::getModelManager   [inherited]
 

Returns the PslModelManager instance associated with the invoking database.

const std::string & IDEA::PslDatabaseImpl::getName   [inherited]
 

Returns the name of the invoking database.

PslObject * IDEA::PslDatabaseImpl::getObject const std::string &    name [inherited]
 

Returns the PslObject instance by the name name if it exists otherwise returns a null-pointer.

const PslObjectList IDEA::PslDatabaseImpl::getObjects   [inherited]
 

Returns all the PslObject instances associated with the invoking database.

const PslTrueFalseVariable * IDEA::PslDatabaseImpl::getPendingMessageVariable   [inherited]
 

EUROPA::PlanDatabaseId IDEA::PlasmaDatabaseImpl::getPlanDatabase  
 

EUROPA::RulesEngineId IDEA::PlasmaDatabaseImpl::getRulesEngine  
 

const Time IDEA::PslDatabaseImpl::getTime   [inherited]
 

Returns the current time of the invoking database.

The current time is the time set last by the invocation setTime and is not necesarry related to the actual time of the agent.

const Time IDEA::PlasmaDatabaseImpl::getTimeExtended   [private, virtual]
 

Returns the current time of the invoking database.

The current time is the time set last by the invocation setTime and is not necesarry related to the actual time of the agent.

Reimplemented from IDEA::PslDatabaseImpl.

const PslVariable * IDEA::PslDatabaseImpl::getTimeVariable   [inherited]
 

Returns the time-variable of the invoking database.

It is recommended to use getTime and setTime to manipulate the variable. API has been exposed so the variable can be passed on to constraints

const PslToken * IDEA::PslDatabaseImpl::getToken int    uid [inherited]
 

const PslVariable * IDEA::PslDatabaseImpl::getVariable int    key [inherited]
 

Will return the PslVariable instance whose key-value is equal to key if such an instance exists, otherwise returns a null-pointer.

void IDEA::PlasmaDatabaseImpl::initializeExtended const PslDatabase   db [protected, virtual]
 

Reimplemented from IDEA::PslDatabaseImpl.

bool IDEA::PlasmaDatabaseImpl::isConsistent   [virtual]
 

Implements IDEA::PslDatabaseImpl.

void IDEA::PslDatabaseImpl::lock const std::string &    location [inherited]
 

void IDEA::PlasmaDatabaseImpl::print std::ostream &    os [virtual]
 

Prints the content of the invoking database to os.

Reimplemented from IDEA::PslDatabaseImpl.

void IDEA::PslDatabaseImpl::removeToken const PslTokenImpl   token [inherited]
 

void IDEA::PslDatabaseImpl::removeVariable const PslVariable   var [inherited]
 

void IDEA::PslDatabaseImpl::resetContent   [inherited]
 

void IDEA::PlasmaDatabaseImpl::setActiveUpdate   [virtual]
 

Set active update enables the database to be populated with plan-server datastructures in real time they show up in the underlying database.

When invoked it should update the plan-server to be in synch with underlying data-structure again.

Implements IDEA::PslDatabaseImpl.

void IDEA::PslDatabaseImpl::setAgentName const std::string &    name [inherited]
 

void IDEA::PlasmaDatabaseImpl::setPassiveUpdate   [virtual]
 

Set active update disables the database to be populated with plan-server datastructures in real time they show up in the underlying database.

Implements IDEA::PslDatabaseImpl.

void IDEA::PslDatabaseImpl::setPendingMessages bool    value [inherited]
 

Sets the variable indicating if there are pending-messages in a reactor (typically the reactive-planner) to value.

void IDEA::PslDatabaseImpl::setPrintFilter PslOutputFilter   filter,
bool    deleteInstance
[inherited]
 

set a filter for use by print()

void IDEA::PslDatabaseImpl::setTime const Time   time [inherited]
 

Sets the time of the invoking database to time.

Time is assumed to be monotonicly increasing so any invocation with time < getTime() will be ignored.

void IDEA::PslDatabaseImpl::unLock const std::string &    location [inherited]
 


Member Data Documentation

EUROPA::ConstraintEngineId IDEA::PlasmaDatabaseImpl::m_ConstraintEngine [private]
 

A Constraint Engine for propagation of relations

PlasmaConstraintEngineListener* IDEA::PlasmaDatabaseImpl::m_ConstraintEngineListener [private]
 

EUROPA::PlanDatabaseId IDEA::PlasmaDatabaseImpl::m_PlanDatabase [private]
 

A PlanDatabase as central state representation

PlasmaPlanDatabaseListener* IDEA::PlasmaDatabaseImpl::m_PlanDatabaseListener [private]
 

EUROPA::RulesEngineId IDEA::PlasmaDatabaseImpl::m_RulesEngine [private]
 

A Rules Engine to enforce model rules.


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