Public Member Functions | Protected Member Functions | Private Attributes
predicate_manager::PredicateDependentEntity Class Reference

#include <predicate_dependent_entity.h>

Inheritance diagram for predicate_manager::PredicateDependentEntity:
Inheritance graph
[legend]

List of all members.

Public Member Functions

void bindDependency (const NameID dep_name_id, const bool *value_ref)
void declareDependency (const std::string &dep_name, const int pm_id=0)
 Declare a new dependency.
void declareDependency (const NameID dep_name_id)
 Declare a new dependency.
NameIDSet getDependencies ()
 Gets a set of NameIDs containing the dependencies of this object.
 PredicateDependentEntity (const Dependencies &deps)
 PredicateDependentEntity ()
virtual void update ()=0

Protected Member Functions

bool getDependencyValue (const std::string &dep_name, const int pm_id=0, DEP_STATUS *status=NULL)

Private Attributes

NameIDSet dep_set_
PredValueMap dep_value_map_
 The names and PM identifiers of the Predicate dependencies;.

Detailed Description

The PredicateDependentEntity class is a base for classes that depend on the values of Predicates. This includes Predicates and Events.

Definition at line 39 of file predicate_dependent_entity.h.


Constructor & Destructor Documentation

PredicateDependentEntity constructor.

Parameters:
depsA set of names and respective PM identifiers of Predicates that may influence this object.
See also:
Dependencies

needs to be filled in by the PM

Definition at line 34 of file predicate_dependent_entity.cpp.

Empty constructor.

Definition at line 42 of file predicate_dependent_entity.cpp.


Member Function Documentation

void PredicateDependentEntity::bindDependency ( const NameID  dep_name_id,
const bool *  value_ref 
)

Binds a NameID to a reference to a boolean value. This allows the fast access to the values of this object's dependencies (through the getDependencyValue function).

Parameters:
dep_name_idA NameID defining a dependency of this predicate.
value_refA (persistent) reference to a boolean value representing the value of that dependency.

Definition at line 62 of file predicate_dependent_entity.cpp.

void PredicateDependentEntity::declareDependency ( const std::string &  dep_name,
const int  pm_id = 0 
)

Declare a new dependency.

Definition at line 47 of file predicate_dependent_entity.cpp.

Declare a new dependency.

Definition at line 55 of file predicate_dependent_entity.cpp.

Gets a set of NameIDs containing the dependencies of this object.

Definition at line 107 of file predicate_dependent_entity.cpp.

bool PredicateDependentEntity::getDependencyValue ( const std::string &  dep_name,
const int  pm_id = 0,
DEP_STATUS status = NULL 
) [protected]

Gets the value of a dependency.

Parameters:
dep_nameThe name of the dependency;
pm_id(optional) The ID of the PredicateManager to which this dependency belongs.
status(optional) The status of the dependency.
See also:
DEP_STATUS

Definition at line 70 of file predicate_dependent_entity.cpp.

virtual void predicate_manager::PredicateDependentEntity::update ( ) [pure virtual]

Update function. This function is to be called whenever one of the dependent Predicates changes its value. It must be implemented by derived classes. It will be called by the PredicateManager to which this object is added.

Implemented in predicate_manager::PropLogicEvent, and predicate_manager::PropLogicPredicate.


Member Data Documentation

Definition at line 88 of file predicate_dependent_entity.h.

The names and PM identifiers of the Predicate dependencies;.

Definition at line 89 of file predicate_dependent_entity.h.


The documentation for this class was generated from the following files:


predicate_manager
Author(s): Joao Reis and Joao Messias
autogenerated on Wed Aug 26 2015 12:28:34