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

IDEA::PlasmaVariableImpl Class Reference
[PlanServer implementation using EUROPA-2]

See PslVariable for API documentation. More...

#include <PlasmaVariableImpl.hh>

Inheritance diagram for IDEA::PlasmaVariableImpl:

IDEA::PslVariableImpl List of all members.

Public Methods

 PlasmaVariableImpl (const PslDatabase *db, EUROPA::ConstrainedVariableId variableId)
 PlasmaVariableImpl (const PslDatabase *db, const StringSet &labels, const std::string &name)
 PlasmaVariableImpl (const PslDatabase *db, const std::set< PslObject * > &objects, const std::string &name)
 PlasmaVariableImpl (const PslDatabase *db, const std::set< PslTimeline * > &timelines, const std::string &name)
 PlasmaVariableImpl (const PslDatabase *db, int lb, int ub, const std::string &name)
 PlasmaVariableImpl (const PslDatabase *db, double lb, double ub, const std::string &name)
 PlasmaVariableImpl (const PslDatabase *db, const PslDataType &type, const std::string &name)
 Constructs a variable of type type with a 'full' domain.

 ~PlasmaVariableImpl ()
void commit ()
const std::string getName () const
 Returns the name of the invoking variable.

bool hasIntersection (const PslVariable *variable) const
EUROPA::ConstrainedVariableId getVariableId () const
const PslDataType getDataType () const
bool isInterval () const
 Returns true if the domain represents an interval, false otherwise.

bool isEmpty ()
 Returns true if the invoking variable has an empty domain.

bool isDynamic ()
 Returns true if the domain is dynamic, false otherwise.

bool isSingleton () const
 Returns true if the domain is a singleton, false otherwise.

bool isEnumerated () const
 Returns true if the domain represents an enumerated set, false otherwise.

bool isFinite ()
 Returns true if the domain has a finite number of members, false otherwise.

int getSize ()
 Returns the number of members in the domain.

int getKey () const
std::set< int > getIntMembers () const
 Implementation method for the getMembers() method template.

std::set< double > getRealMembers () const
 Implementation method for the getMembers() method template.

std::set< bool > getBoolMembers () const
 Implementation method for the getMembers() method template.

std::set< std::string > getLabelMembers () const
 Implementation method for the getMembers() method template.

std::set< std::string > getStringMembers () const
 Implementation method for the getMembers() method template.

std::set< const PslObject * > getObjectMembers () const
void makeEmpty ()
void reset ()
 Resets the domain to the maximal possible set.

void setStatic ()
 Makes the invoking domain static if not already (non-dynamic).

const PslConstraintImplconstrainToInt (int value, int authority)
 Implementation method for the constrainTo() method template. The first parameter is the value to constrain the invoking variable to the second parameter is the authority of the invoking entity stored in the created constraint.

const PslConstraintImplconstrainToReal (double value, int authority)
 Implementation method for the constrainTo() method template. The first parameter is the value to constrain the invoking variable to the second parameter is the authority of the invoking entity stored in the created constraint.

const PslConstraintImplconstrainToBool (bool value, int authority)
 Implementation method for the constrainTo() method template. The first parameter is the value to constrain the invoking variable to the second parameter is the authority of the invoking entity stored in the created constraint.

const PslConstraintImplconstrainToLabel (const std::string &value, int authority)
 Implementation method for the constrainTo() method template. The first parameter is the value to constrain the invoking variable to the second parameter is the authority of the invoking entity stored in the created constraint.

const PslConstraintImplconstrainToObject (const PslObject *value, int authority)
 Implementation method for the constrainTo() method template. The first parameter is the value to constrain the invoking variable to the second parameter is the authority of the invoking entity stored in the created constraint.

const PslConstraintImplconstrainToTimeline (const PslTimeline *value, int authority)
 Implementation method for the constrainTo() method template. The first parameter is the value to constrain the invoking variable to the second parameter is the authority of the invoking entity stored in the created constraint.

const PslConstraintImplconstrainToIntInterval (int min, int max, int authority)
 Implementation method for the constrainToInterval() method template. The first parameter is the lower bound, the second is the upper bound, and the third parameter is the authority of the invoking entity stored in the created constraint.

const PslConstraintImplconstrainToRealInterval (double min, double max, int authority)
 Implementation method for the constrainToInterval() method template. The first parameter is the lower bound, the second is the upper bound, and the third parameter is the authority of the invoking entity stored in the created constraint.

void intersect (const PslVariable *other)
 Reduces the domain to its intersection with the argument.

void insertString (const std::string &value)
 Inserts a string to the invoking variable, must be of type STRING.

int getIntSingleton () const
 Implementation method for the getSingleton() method template.

double getRealSingleton () const
 Implementation method for the getSingleton() method template.

bool getBoolSingleton () const
 Implementation method for the getSingleton() method template.

int getIntMinimum () const
 Implementation method for the getMinimum() method template.

double getRealMinimum () const
 Implementation method for the getMinimum() method template.

bool getBoolMinimum () const
 Implementation method for the getMinimum() method template.

int getIntMaximum () const
 Implementation method for the getMaximum() method template.

double getRealMaximum () const
 Implementation method for the getMaximum() method template.

bool getBoolMaximum () const
 Implementation method for the getMaximum() method template.

const PslObjectgetObjectSingleton () const
 Implementation method for the getSingleton() method template.

const PslTimelinegetTimelineSingleton () const
 Implementation method for the getSingleton() method template.

const std::string & getLabelSingleton () const
 Implementation method for the getSingleton() method template.

bool hasIntMember (int) const
 Implementation method for the hasMember() method template.

bool hasRealMember (double) const
 Implementation method for the hasMember() method template.

bool hasBoolMember (bool) const
 Implementation method for the hasMember() method template.

bool hasLabelMember (const std::string &) const
 Implementation method for the hasMember() method template.

void insertInt (int)
 Implementation method for the insert() method template.

void insertReal (double)
 Implementation method for the insert() method template.

void insertBool (bool)
 Implementation method for the insert() method template.

void insertLabel (const std::string &)
 Implementation method for the insert() method template.

void removeInt (int)
 Implementation method for the remove() method template.

void removeReal (double)
 Implementation method for the remove() method template.

void removeBool (bool)
 Implementation method for the remove() method template.

void removeLabel (const std::string &)
 Implementation method for the remove() method template.

void setToIntSingleton (int)
 Implementation method for the setToSingleton() method template.

void setToRealSingleton (double)
 Implementation method for the setToSingleton() method template.

void setToBoolSingleton (bool)
 Implementation method for the setToSingleton() method template.

void setToLabelSingleton (const std::string &)
 Implementation method for the setToSingleton() method template.

void setToIntInterval (int min, int max)
 Implementation method for the setToInterval() method template.

void setToRealInterval (double min, double max)
 Implementation method for the setToInterval() method template.

int getId ()
const PslConstraintaddConstraint (const PslConstraintImpl *impl)

Protected Methods

int getExtendedId () const
 Retrieves the ID from the extension.

bool write (std::string &value)
bool read (const std::string &value)
const PslConstraintList getConstraints () const
const PslDatabasegetDatabase () const
virtual void print (std::ostream &) const
 Print method.

virtual bool conditionallyReset (const IntSet &authorities)
 Removes and deletes any constraints on the variable matching the given set of authorities, and resets the variable if any are removed. Returns true if any were removed, false otherwise.

void removeConstraint (const PslConstraint *cnstr)
 Removes the PslConstraint cnstr from the list of constraints associated with the invoking variable.


Private Methods

 PlasmaVariableImpl ()
void createFullPlasmaVariable (const PslDatabase *db, const PslDataType &type, const std::string &name)

Private Attributes

EUROPA::ConstrainedVariableId m_Variable

Detailed Description

See PslVariable for API documentation.


Constructor & Destructor Documentation

IDEA::PlasmaVariableImpl::PlasmaVariableImpl const PslDatabase   db,
EUROPA::ConstrainedVariableId    variableId
 

IDEA::PlasmaVariableImpl::PlasmaVariableImpl const PslDatabase   db,
const StringSet   labels,
const std::string &    name
 

IDEA::PlasmaVariableImpl::PlasmaVariableImpl const PslDatabase   db,
const std::set< PslObject * > &    objects,
const std::string &    name
 

IDEA::PlasmaVariableImpl::PlasmaVariableImpl const PslDatabase   db,
const std::set< PslTimeline * > &    timelines,
const std::string &    name
 

can be specified

IDEA::PlasmaVariableImpl::PlasmaVariableImpl const PslDatabase   db,
int    lb,
int    ub,
const std::string &    name
 

can be specified

IDEA::PlasmaVariableImpl::PlasmaVariableImpl const PslDatabase   db,
double    lb,
double    ub,
const std::string &    name
 

can be specified

IDEA::PlasmaVariableImpl::PlasmaVariableImpl const PslDatabase   db,
const PslDataType   type,
const std::string &    name
 

Constructs a variable of type type with a 'full' domain.

can be specified

IDEA::PlasmaVariableImpl::~PlasmaVariableImpl  
 

IDEA::PlasmaVariableImpl::PlasmaVariableImpl   [private]
 


Member Function Documentation

const PslConstraint * IDEA::PslVariableImpl::addConstraint const PslConstraintImpl   impl [inherited]
 

void IDEA::PlasmaVariableImpl::commit   [virtual]
 

Implements IDEA::PslVariableImpl.

bool IDEA::PslVariableImpl::conditionallyReset const IntSet   authorities [protected, virtual, inherited]
 

Removes and deletes any constraints on the variable matching the given set of authorities, and resets the variable if any are removed. Returns true if any were removed, false otherwise.

const PslConstraintImpl * IDEA::PlasmaVariableImpl::constrainToBool bool    value,
int    authority
[virtual]
 

Implementation method for the constrainTo() method template. The first parameter is the value to constrain the invoking variable to the second parameter is the authority of the invoking entity stored in the created constraint.

Implements IDEA::PslVariableImpl.

const PslConstraintImpl * IDEA::PlasmaVariableImpl::constrainToInt int    value,
int    authority
[virtual]
 

Implementation method for the constrainTo() method template. The first parameter is the value to constrain the invoking variable to the second parameter is the authority of the invoking entity stored in the created constraint.

Implements IDEA::PslVariableImpl.

const PslConstraintImpl * IDEA::PlasmaVariableImpl::constrainToIntInterval int    min,
int    max,
int    authority
[virtual]
 

Implementation method for the constrainToInterval() method template. The first parameter is the lower bound, the second is the upper bound, and the third parameter is the authority of the invoking entity stored in the created constraint.

Implements IDEA::PslVariableImpl.

const PslConstraintImpl * IDEA::PlasmaVariableImpl::constrainToLabel const std::string &    value,
int    authority
[virtual]
 

Implementation method for the constrainTo() method template. The first parameter is the value to constrain the invoking variable to the second parameter is the authority of the invoking entity stored in the created constraint.

Implements IDEA::PslVariableImpl.

const PslConstraintImpl * IDEA::PlasmaVariableImpl::constrainToObject const PslObject   value,
int    authority
[virtual]
 

Implementation method for the constrainTo() method template. The first parameter is the value to constrain the invoking variable to the second parameter is the authority of the invoking entity stored in the created constraint.

Implements IDEA::PslVariableImpl.

const PslConstraintImpl * IDEA::PlasmaVariableImpl::constrainToReal double    value,
int    authority
[virtual]
 

Implementation method for the constrainTo() method template. The first parameter is the value to constrain the invoking variable to the second parameter is the authority of the invoking entity stored in the created constraint.

Implements IDEA::PslVariableImpl.

const PslConstraintImpl * IDEA::PlasmaVariableImpl::constrainToRealInterval double    min,
double    max,
int    authority
[virtual]
 

Implementation method for the constrainToInterval() method template. The first parameter is the lower bound, the second is the upper bound, and the third parameter is the authority of the invoking entity stored in the created constraint.

Implements IDEA::PslVariableImpl.

const PslConstraintImpl * IDEA::PlasmaVariableImpl::constrainToTimeline const PslTimeline   value,
int    authority
[virtual]
 

Implementation method for the constrainTo() method template. The first parameter is the value to constrain the invoking variable to the second parameter is the authority of the invoking entity stored in the created constraint.

Implements IDEA::PslVariableImpl.

void IDEA::PlasmaVariableImpl::createFullPlasmaVariable const PslDatabase   db,
const PslDataType   type,
const std::string &    name
[private]
 

bool IDEA::PlasmaVariableImpl::getBoolMaximum   [virtual]
 

Implementation method for the getMaximum() method template.

Implements IDEA::PslVariableImpl.

std::set< bool > IDEA::PlasmaVariableImpl::getBoolMembers   [virtual]
 

Implementation method for the getMembers() method template.

Implements IDEA::PslVariableImpl.

bool IDEA::PlasmaVariableImpl::getBoolMinimum   [virtual]
 

Implementation method for the getMinimum() method template.

Implements IDEA::PslVariableImpl.

bool IDEA::PlasmaVariableImpl::getBoolSingleton   [virtual]
 

Implementation method for the getSingleton() method template.

Implements IDEA::PslVariableImpl.

const PslConstraintList IDEA::PslVariableImpl::getConstraints   [protected, inherited]
 

const PslDatabase * IDEA::PslVariableImpl::getDatabase   [protected, inherited]
 

const PslDataType IDEA::PlasmaVariableImpl::getDataType   const [virtual]
 

can be specified

Implements IDEA::PslVariableImpl.

int IDEA::PlasmaVariableImpl::getExtendedId   [protected, virtual]
 

Retrieves the ID from the extension.

Implements IDEA::PslVariableImpl.

int IDEA::PslVariableImpl::getId   [inherited]
 

int IDEA::PlasmaVariableImpl::getIntMaximum   [virtual]
 

Implementation method for the getMaximum() method template.

Implements IDEA::PslVariableImpl.

std::set< int > IDEA::PlasmaVariableImpl::getIntMembers   [virtual]
 

Implementation method for the getMembers() method template.

Implements IDEA::PslVariableImpl.

int IDEA::PlasmaVariableImpl::getIntMinimum   [virtual]
 

Implementation method for the getMinimum() method template.

Implements IDEA::PslVariableImpl.

int IDEA::PlasmaVariableImpl::getIntSingleton   [virtual]
 

Implementation method for the getSingleton() method template.

Implements IDEA::PslVariableImpl.

int IDEA::PlasmaVariableImpl::getKey  
 

StringSet IDEA::PlasmaVariableImpl::getLabelMembers   [virtual]
 

Implementation method for the getMembers() method template.

Implements IDEA::PslVariableImpl.

const std::string & IDEA::PlasmaVariableImpl::getLabelSingleton   [virtual]
 

Implementation method for the getSingleton() method template.

Implements IDEA::PslVariableImpl.

const std::string IDEA::PlasmaVariableImpl::getName   [virtual]
 

Returns the name of the invoking variable.

Implements IDEA::PslVariableImpl.

std::set< const PslObject * > IDEA::PlasmaVariableImpl::getObjectMembers   [virtual]
 

Implements IDEA::PslVariableImpl.

const PslObject * IDEA::PlasmaVariableImpl::getObjectSingleton   [virtual]
 

Implementation method for the getSingleton() method template.

Implements IDEA::PslVariableImpl.

double IDEA::PlasmaVariableImpl::getRealMaximum   [virtual]
 

Implementation method for the getMaximum() method template.

Implements IDEA::PslVariableImpl.

std::set< double > IDEA::PlasmaVariableImpl::getRealMembers   [virtual]
 

Implementation method for the getMembers() method template.

Implements IDEA::PslVariableImpl.

double IDEA::PlasmaVariableImpl::getRealMinimum   [virtual]
 

Implementation method for the getMinimum() method template.

Implements IDEA::PslVariableImpl.

double IDEA::PlasmaVariableImpl::getRealSingleton   [virtual]
 

Implementation method for the getSingleton() method template.

Implements IDEA::PslVariableImpl.

int IDEA::PlasmaVariableImpl::getSize   [virtual]
 

Returns the number of members in the domain.

Implements IDEA::PslVariableImpl.

StringSet IDEA::PlasmaVariableImpl::getStringMembers   [virtual]
 

Implementation method for the getMembers() method template.

Implements IDEA::PslVariableImpl.

const PslTimeline * IDEA::PlasmaVariableImpl::getTimelineSingleton   [virtual]
 

Implementation method for the getSingleton() method template.

Implements IDEA::PslVariableImpl.

EUROPA::ConstrainedVariableId IDEA::PlasmaVariableImpl::getVariableId  
 

bool IDEA::PlasmaVariableImpl::hasBoolMember bool    const [virtual]
 

Implementation method for the hasMember() method template.

Implements IDEA::PslVariableImpl.

bool IDEA::PlasmaVariableImpl::hasIntersection const PslVariable   variable const [virtual]
 

Implements IDEA::PslVariableImpl.

bool IDEA::PlasmaVariableImpl::hasIntMember int    const [virtual]
 

Implementation method for the hasMember() method template.

Implements IDEA::PslVariableImpl.

bool IDEA::PlasmaVariableImpl::hasLabelMember const std::string &    const [virtual]
 

Implementation method for the hasMember() method template.

Implements IDEA::PslVariableImpl.

bool IDEA::PlasmaVariableImpl::hasRealMember double    const [virtual]
 

Implementation method for the hasMember() method template.

Implements IDEA::PslVariableImpl.

void IDEA::PlasmaVariableImpl::insertBool bool    [virtual]
 

Implementation method for the insert() method template.

Implements IDEA::PslVariableImpl.

void IDEA::PlasmaVariableImpl::insertInt int    [virtual]
 

Implementation method for the insert() method template.

Implements IDEA::PslVariableImpl.

void IDEA::PlasmaVariableImpl::insertLabel const std::string &    [virtual]
 

Implementation method for the insert() method template.

Implements IDEA::PslVariableImpl.

void IDEA::PlasmaVariableImpl::insertReal double    [virtual]
 

Implementation method for the insert() method template.

Implements IDEA::PslVariableImpl.

void IDEA::PlasmaVariableImpl::insertString const std::string &    value [virtual]
 

Inserts a string to the invoking variable, must be of type STRING.

Implements IDEA::PslVariableImpl.

void IDEA::PlasmaVariableImpl::intersect const PslVariable   other [virtual]
 

Reduces the domain to its intersection with the argument.

Implements IDEA::PslVariableImpl.

bool IDEA::PlasmaVariableImpl::isDynamic   [virtual]
 

Returns true if the domain is dynamic, false otherwise.

Implements IDEA::PslVariableImpl.

bool IDEA::PlasmaVariableImpl::isEmpty   [virtual]
 

Returns true if the invoking variable has an empty domain.

Implements IDEA::PslVariableImpl.

bool IDEA::PlasmaVariableImpl::isEnumerated   [virtual]
 

Returns true if the domain represents an enumerated set, false otherwise.

Implements IDEA::PslVariableImpl.

bool IDEA::PlasmaVariableImpl::isFinite   [virtual]
 

Returns true if the domain has a finite number of members, false otherwise.

Implements IDEA::PslVariableImpl.

bool IDEA::PlasmaVariableImpl::isInterval   [virtual]
 

Returns true if the domain represents an interval, false otherwise.

Implements IDEA::PslVariableImpl.

bool IDEA::PlasmaVariableImpl::isSingleton   [virtual]
 

Returns true if the domain is a singleton, false otherwise.

Implements IDEA::PslVariableImpl.

void IDEA::PlasmaVariableImpl::makeEmpty  
 

void IDEA::PslVariableImpl::print std::ostream &    const [protected, virtual, inherited]
 

Print method.

bool IDEA::PslVariableImpl::read const std::string &    value [protected, inherited]
 

void IDEA::PlasmaVariableImpl::removeBool bool    [virtual]
 

Implementation method for the remove() method template.

Implements IDEA::PslVariableImpl.

void IDEA::PslVariableImpl::removeConstraint const PslConstraint   cnstr [protected, inherited]
 

Removes the PslConstraint cnstr from the list of constraints associated with the invoking variable.

Will error out if the constraint is active or if the constraint is not associated with the invoking variable.

void IDEA::PlasmaVariableImpl::removeInt int    [virtual]
 

Implementation method for the remove() method template.

Implements IDEA::PslVariableImpl.

void IDEA::PlasmaVariableImpl::removeLabel const std::string &    [virtual]
 

Implementation method for the remove() method template.

Implements IDEA::PslVariableImpl.

void IDEA::PlasmaVariableImpl::removeReal double    [virtual]
 

Implementation method for the remove() method template.

Implements IDEA::PslVariableImpl.

void IDEA::PlasmaVariableImpl::reset   [virtual]
 

Resets the domain to the maximal possible set.

Implements IDEA::PslVariableImpl.

void IDEA::PlasmaVariableImpl::setStatic   [virtual]
 

Makes the invoking domain static if not already (non-dynamic).

Implements IDEA::PslVariableImpl.

void IDEA::PlasmaVariableImpl::setToBoolSingleton bool    [virtual]
 

Implementation method for the setToSingleton() method template.

Implements IDEA::PslVariableImpl.

void IDEA::PlasmaVariableImpl::setToIntInterval int    min,
int    max
[virtual]
 

Implementation method for the setToInterval() method template.

Implements IDEA::PslVariableImpl.

void IDEA::PlasmaVariableImpl::setToIntSingleton int    [virtual]
 

Implementation method for the setToSingleton() method template.

Implements IDEA::PslVariableImpl.

void IDEA::PlasmaVariableImpl::setToLabelSingleton const std::string &    [virtual]
 

Implementation method for the setToSingleton() method template.

Implements IDEA::PslVariableImpl.

void IDEA::PlasmaVariableImpl::setToRealInterval double    min,
double    max
[virtual]
 

Implementation method for the setToInterval() method template.

Implements IDEA::PslVariableImpl.

void IDEA::PlasmaVariableImpl::setToRealSingleton double    [virtual]
 

Implementation method for the setToSingleton() method template.

Implements IDEA::PslVariableImpl.

bool IDEA::PslVariableImpl::write std::string &    value [protected, inherited]
 


Member Data Documentation

EUROPA::ConstrainedVariableId IDEA::PlasmaVariableImpl::m_Variable [private]
 


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