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

IDEA::PslTimeConstraintImpl Class Reference
[PlanServer implementation base classes]

The time-out constraint maintains the constraint on a token it can not take place in the past. The current time comes from the PslDatabase instance associated with the invoking token. More...

#include <PslTimeConstraintImpl.hh>

Inheritance diagram for IDEA::PslTimeConstraintImpl:

IDEA::PslConstraintImpl IDEA::PlasmaTimeConstraintImpl List of all members.

Public Methods

 PslTimeConstraintImpl (const PslToken *token, int authority)
 Constructor.

 ~PslTimeConstraintImpl ()
 Destructor.

void execute ()
 Maintains the invariant that the token associated can only take place in the future given current time is PslDatabase::getTime.

const PslTokengetToken () const
void print (std::ostream &os)
 Streams information of the invoking instance to os.

const std::string & getName () const
virtual int getId () const=0
 Returns a unique identifier of the constraint.

virtual bool isActive () const=0
 Returns true if the invoking instance is active, eq. is maintained to be true by the underlying plan-database. Otherwise returns false.

void activate (int authority=-1)
 Activates the invoking constraint if not yet activated. An activated constraint need to be maintained to be true by the underlying plan-database.

virtual void deActivate () const=0
 De-activates the invoking constraint if activated. Once an activated constraint is de-activated the underlying plan-database is no longer required to maintain it to be true.

int getAuthority () const
 Returns the authority of the invoking constraint.


Protected Methods

void setAuthority (int authority)
virtual void activateExtended (int authority=-1) const=0

Private Methods

bool hasTokenEnded () const
 Returns true if the end time of the token is a singleton and before the time of the database associated with the token.

bool hasTokenStarted () const
 Returns true if the strat time of the token is a singleton and before the time of the database associated with the token.


Private Attributes

const PslTokenm_Token

Detailed Description

The time-out constraint maintains the constraint on a token it can not take place in the past. The current time comes from the PslDatabase instance associated with the invoking token.


Constructor & Destructor Documentation

IDEA::PslTimeConstraintImpl::PslTimeConstraintImpl const PslToken   token,
int    authority
 

Constructor.

IDEA::PslTimeConstraintImpl::~PslTimeConstraintImpl  
 

Destructor.


Member Function Documentation

void IDEA::PslConstraintImpl::activate int    authority = -1 [inherited]
 

Activates the invoking constraint if not yet activated. An activated constraint need to be maintained to be true by the underlying plan-database.

virtual void IDEA::PslConstraintImpl::activateExtended int    authority = -1 const [protected, pure virtual, inherited]
 

Implemented in IDEA::PlasmaConstraintImpl, IDEA::PlasmaReturnFlagReceivedConstraintImpl, IDEA::PlasmaObservedConstraintImpl, and IDEA::PlasmaTimeConstraintImpl.

virtual void IDEA::PslConstraintImpl::deActivate   [pure virtual, inherited]
 

De-activates the invoking constraint if activated. Once an activated constraint is de-activated the underlying plan-database is no longer required to maintain it to be true.

Note:
No re-propagation from it's original state is triggered.

Implemented in IDEA::PlasmaConstraintImpl, IDEA::PlasmaReturnFlagReceivedConstraintImpl, IDEA::PlasmaObservedConstraintImpl, and IDEA::PlasmaTimeConstraintImpl.

void IDEA::PslTimeConstraintImpl::execute   [virtual]
 

Maintains the invariant that the token associated can only take place in the future given current time is PslDatabase::getTime.

This is done by setting the earliest start time of the token to PslDatabase::getTime whenever the time changes.

Implements IDEA::PslConstraintImpl.

int IDEA::PslConstraintImpl::getAuthority   [inherited]
 

Returns the authority of the invoking constraint.

The authority of the constraint is equal to the authority of the last invocation of activate or construction if activate has not been invoked explicitly.

virtual int IDEA::PslConstraintImpl::getId   [pure virtual, inherited]
 

Returns a unique identifier of the constraint.

Implemented in IDEA::PlasmaConstraintImpl, IDEA::PlasmaReturnFlagReceivedConstraintImpl, IDEA::PlasmaObservedConstraintImpl, and IDEA::PlasmaTimeConstraintImpl.

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

const PslToken * IDEA::PslTimeConstraintImpl::getToken  
 

bool IDEA::PslTimeConstraintImpl::hasTokenEnded   [private]
 

Returns true if the end time of the token is a singleton and before the time of the database associated with the token.

bool IDEA::PslTimeConstraintImpl::hasTokenStarted   [private]
 

Returns true if the strat time of the token is a singleton and before the time of the database associated with the token.

virtual bool IDEA::PslConstraintImpl::isActive   [pure virtual, inherited]
 

Returns true if the invoking instance is active, eq. is maintained to be true by the underlying plan-database. Otherwise returns false.

Implemented in IDEA::PlasmaConstraintImpl, IDEA::PlasmaReturnFlagReceivedConstraintImpl, IDEA::PlasmaObservedConstraintImpl, and IDEA::PlasmaTimeConstraintImpl.

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

Streams information of the invoking instance to os.

Reimplemented from IDEA::PslConstraintImpl.

void IDEA::PslConstraintImpl::setAuthority int    authority [protected, inherited]
 


Member Data Documentation

const PslToken* IDEA::PslTimeConstraintImpl::m_Token [private]
 


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