KJB
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
kjb::psi::Action_descriptor Struct Reference

#include <psi_action.h>

Public Member Functions

 Action_descriptor ()
 
 Action_descriptor (Action_type type_, std::string name_, size_t num_params_, std::vector< std::string > param_names_, std::vector< Unit_type > param_units_, boost::function1< double, const Action & > get_duration_, bool fixed_length_, bool is_relative_, boost::function1< bool, const Action & > validator_)
 

Public Attributes

Action_type type
 
std::string name
 
size_t num_params
 
std::vector< std::string > param_names
 
std::vector< Unit_typeparam_units
 
boost::function1< double,
const Action & > 
get_duration
 
bool fixed_length
 
bool is_relative
 
boost::function1< bool, const
Action & > 
validator
 

Detailed Description

Meta-structure that describes various actions, including its name, and the names and units of all parameters.

Constructor & Destructor Documentation

kjb::psi::Action_descriptor::Action_descriptor ( )
inline
kjb::psi::Action_descriptor::Action_descriptor ( Action_type  type_,
std::string  name_,
size_t  num_params_,
std::vector< std::string >  param_names_,
std::vector< Unit_type param_units_,
boost::function1< double, const Action & >  get_duration_,
bool  fixed_length_,
bool  is_relative_,
boost::function1< bool, const Action & >  validator_ 
)
inline

Member Data Documentation

bool kjb::psi::Action_descriptor::fixed_length

fixed_length

If false, the total number of parameters is unknown, but must be (num_params * n + 1), where n is a non-negative integer. The first parameter of the action is the value of n, and the remaining parameters are repeated groups of values of size num_params..

For example, a set of parameters {(1,2,3), (4,5,6), (7,8,9)} would have num_params == 3, and the parameters themselves would be represented as: {3, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0}.

boost::function1<double, const Action&> kjb::psi::Action_descriptor::get_duration
bool kjb::psi::Action_descriptor::is_relative

is_relative

if true, the action depends on other entities. For example, FOLLOW action depends on the entity that the current entity is following. In this case, the parent_type and parent_index of the Action needs to be set

std::string kjb::psi::Action_descriptor::name
size_t kjb::psi::Action_descriptor::num_params
std::vector<std::string> kjb::psi::Action_descriptor::param_names
std::vector<Unit_type> kjb::psi::Action_descriptor::param_units
Action_type kjb::psi::Action_descriptor::type
boost::function1<bool, const Action&> kjb::psi::Action_descriptor::validator

The documentation for this struct was generated from the following file: