|
std::map< std::string, ObjectParameter * > | parameters {} |
|
std::map< std::string, std::set< unsigned int > > | indexCollections {} |
|
MemoryPool * | memory |
|
|
struct | grail::data::PlannerActionSnapshot |
|
◆ AddCollection()
void grail::planner::ParametrizedObject::AddCollection |
( |
const std::string & |
collectionName | ) |
|
Creates a new collection object under the provided name, which can be used to group many IDs of objects together.
The name should be unique or you will otherwise override an existing collection.
◆ CollectionContains()
bool grail::planner::ParametrizedObject::CollectionContains |
( |
const std::string & |
collectionName, |
|
|
unsigned int |
objectIndex |
|
) |
| const |
- Returns
- true if the object contains objectIndex in a collection identified collectionName
◆ Contains()
bool grail::planner::ParametrizedObject::Contains |
( |
const std::string & |
paramName | ) |
const |
- Returns
- true if the object contains a parameter with the given name, false otherwise
◆ GetCollection() [1/2]
std::set< unsigned int > * grail::planner::ParametrizedObject::GetCollection |
( |
const std::string & |
name | ) |
|
- Parameters
-
collectionName | The name of the collection to retrieve. See AddCollection. |
- Returns
- The collection with the given name or
null
if such does not exist.
◆ GetCollection() [2/2]
const std::set< unsigned int > * grail::planner::ParametrizedObject::GetCollection |
( |
const std::string & |
name | ) |
const |
- Parameters
-
collectionName | The name of the collection to retrieve. See AddCollection. |
- Returns
- The collection with the given name or
null
if such does not exist.
◆ GetParametersSize()
std::size_t grail::planner::ParametrizedObject::GetParametersSize |
( |
| ) |
const |
- Returns
- The number of parameters assigned to this object
◆ GetParameterValue()
template<typename ParameterType >
ParameterType grail::planner::ParametrizedObject::GetParameterValue |
( |
const std::string & |
paramName | ) |
const |
|
inline |
- Returns
- The parameter's value if a parameter with the given name exists, the default value otherwise
◆ MergeParameters()
void grail::planner::ParametrizedObject::MergeParameters |
( |
const ParametrizedObject & |
other | ) |
|
MergeParameters - Adds other parameters to own, replacing parameter with other in case of conflict.
- Parameters
-
other | Object to merge parameters from |
◆ SetParameter()
template<typename ParameterType >
void grail::planner::ParametrizedObject::SetParameter |
( |
const std::string & |
paramName, |
|
|
const ParameterType & |
paramValue |
|
) |
| |
|
inline |
Updates the value of a parameter identified by the given name. If there's no such parameter, it will be added.
◆ SetSerializeSnapshotFunction()
void grail::planner::ParametrizedObject::SetSerializeSnapshotFunction |
( |
std::function< void(const ParametrizedObject &object, std::map< std::string, std::string > &nameValues)> |
function | ) |
|
SetSerializeSnapshotFunction - Sets a function serializing a snapshot of parameter values to string.
- Parameters
-
function | - serialization function returning a map where keys represent parameter identifiers and values - parameter values serialized to string. |
The documentation for this class was generated from the following files:
- GrailPlanners/Planner/WorldState/ParametrizedObject.hh
- GrailPlanners/Planner/WorldState/ParametrizedObject.cpp