humoto
Public Member Functions | Protected Member Functions | Static Protected Attributes | List of all members
humoto::config::CommonConfigurableBase< t_crash_on_missing_entry > Class Template Referenceabstract

Detailed Description

template<bool t_crash_on_missing_entry>
class humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >

Configurable base class.

Definition at line 64 of file config.h.

#include <config.h>

Inheritance diagram for humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >:
Inheritance graph

Public Member Functions

template<class t_Reader >
void readConfig (t_Reader &reader, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read configuration (assuming the configuration node to be in the root). More...
 
template<class t_Reader >
void readConfig (t_Reader &reader, const std::string &node_name, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read configuration (assuming the configuration node to be in the root). More...
 
template<class t_Reader >
void readConfig (t_Reader &reader, const char *node_name, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read configuration (assuming the configuration node to be in the root). More...
 
template<class t_Reader >
void readConfig (const std::string &file_name, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read configuration (assuming the configuration node to be in the root). More...
 
template<class t_Reader >
void readConfig (const std::string &file_name, const std::string &node_name, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read configuration (assuming the configuration node to be in the root). More...
 
template<class t_Reader >
void readConfig (const std::string &file_name, const char *node_name, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read configuration (assuming the configuration node to be in the root). More...
 
template<class t_Reader >
void readNestedConfig (t_Reader &reader, const std::string &node_name, const bool crash_on_missing_entry=default_crash_on_missing_entry_)
 Read nested configuration node. More...
 
template<class t_Writer >
void writeConfig (t_Writer &writer) const
 Write configuration. More...
 
template<class t_Writer >
void writeConfig (t_Writer &writer, const std::string &node_name) const
 Write configuration. More...
 
template<class t_Writer >
void writeConfig (const std::string &file_name) const
 Write configuration. More...
 
template<class t_Writer >
void writeConfig (const std::string &file_name, const std::string &node_name) const
 Write configuration. More...
 
template<class t_Writer >
void writeNestedConfig (t_Writer &writer) const
 Write nested configuration node. More...
 
template<class t_Writer >
void writeNestedConfig (t_Writer &writer, const std::string &node_name) const
 Write nested configuration node. More...
 

Protected Member Functions

 CommonConfigurableBase ()
 
 ~CommonConfigurableBase ()
 Protected destructor: prevent destruction of the child classes through a base pointer. More...
 
virtual void finalize ()
 This function is called automaticaly after reading a configuration file. Does nothing by default. More...
 
virtual const std::string & getConfigSectionID () const =0
 Return the default name of a configuration node corresponding to this class. More...
 
virtual std::size_t getNumberOfEntries () const =0
 Get number of entries in the corresponding configuration node. More...
 
virtual void setDefaults ()=0
 Set members to their default values. More...
 

Static Protected Attributes

static const bool default_crash_on_missing_entry_ = t_crash_on_missing_entry
 

Constructor & Destructor Documentation

◆ ~CommonConfigurableBase()

template<bool t_crash_on_missing_entry>
humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::~CommonConfigurableBase ( )
inlineprotected

Protected destructor: prevent destruction of the child classes through a base pointer.

Definition at line 75 of file config.h.

◆ CommonConfigurableBase()

template<bool t_crash_on_missing_entry>
humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::CommonConfigurableBase ( )
inlineprotected

Definition at line 76 of file config.h.

Member Function Documentation

◆ finalize()

template<bool t_crash_on_missing_entry>
virtual void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::finalize ( )
inlineprotectedvirtual

This function is called automaticaly after reading a configuration file. Does nothing by default.

Reimplemented in humoto::WeightedSimpleTaskBaseMixin< constraints::ConstraintsGIB< TaskBase > >, humoto::WeightedSimpleTaskBaseMixin< constraints::ConstraintsGILU< TaskBase > >, humoto::WeightedSimpleTaskBaseMixin< constraints::ConstraintsGIL< TaskBase > >, humoto::WeightedSimpleTaskBaseMixin< constraints::ConstraintsGIU< TaskBase > >, humoto::WeightedSimpleTaskBaseMixin< constraints::ConstraintsGIB0< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsAB< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsAB0< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsASU< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsASL< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsASLU< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsAU< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsAL< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsASB< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsALU< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsASB0< TaskBase > >, humoto::pepper_mpc::MPCParameters, humoto::pepper_mpc::MotionParameters, humoto::walking::RobotFootParameters, humoto::wpg04::MPCParameters, humoto::pepper_mpc::RobotParameters, humoto::pepper_ik::WBCParameters, humoto::pepper_ik::GeneralizedCoordinates< t_features >, humoto::wpg04::TaskCoPPosition, humoto::wpg04::TaskCoMVelocity, humoto::wpg04::TaskCoPVelocity, and humoto::wpg04::TaskTerminalConstraint.

Definition at line 102 of file config.h.

◆ getConfigSectionID()

template<bool t_crash_on_missing_entry>
virtual const std::string& humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::getConfigSectionID ( ) const
protectedpure virtual

Return the default name of a configuration node corresponding to this class.

Returns
the name
Attention
Implementation of this method is added automatically upon inclusion of define_accessors.h if HUMOTO_CONFIG_SECTION_ID is defined.

Implemented in humoto::TaskBase.

◆ getNumberOfEntries()

template<bool t_crash_on_missing_entry>
virtual std::size_t humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::getNumberOfEntries ( ) const
protectedpure virtual

Get number of entries in the corresponding configuration node.

Returns
number of entries

Implemented in humoto::ConfigurableOptimizationProblem.

◆ readConfig() [1/6]

template<bool t_crash_on_missing_entry>
template<class t_Reader >
void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readConfig ( t_Reader &  reader,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inline

Read configuration (assuming the configuration node to be in the root).

Parameters
[in]readerconfiguration reader
[in]crash_on_missing_entry

Definition at line 167 of file config.h.

◆ readConfig() [2/6]

template<bool t_crash_on_missing_entry>
template<class t_Reader >
void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readConfig ( t_Reader &  reader,
const std::string &  node_name,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inline

Read configuration (assuming the configuration node to be in the root).

Parameters
[in]readerconfiguration reader
[in]crash_on_missing_entry
[in]node_namenode name, the default is used if empty

Definition at line 183 of file config.h.

◆ readConfig() [3/6]

template<bool t_crash_on_missing_entry>
template<class t_Reader >
void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readConfig ( t_Reader &  reader,
const char *  node_name,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inline

Read configuration (assuming the configuration node to be in the root).

Parameters
[in]readerconfiguration reader
[in]crash_on_missing_entry
[in]node_namenode name, the default is used if empty
Note
Intercept implicit conversion of a pointer to bool.

Definition at line 202 of file config.h.

◆ readConfig() [4/6]

template<bool t_crash_on_missing_entry>
template<class t_Reader >
void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readConfig ( const std::string &  file_name,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inline

Read configuration (assuming the configuration node to be in the root).

Parameters
[in]file_namefile name
[in]crash_on_missing_entry

Definition at line 218 of file config.h.

◆ readConfig() [5/6]

template<bool t_crash_on_missing_entry>
template<class t_Reader >
void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readConfig ( const std::string &  file_name,
const std::string &  node_name,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inline

Read configuration (assuming the configuration node to be in the root).

Parameters
[in]file_namefile name
[in]node_namenode name, the default is used if empty
[in]crash_on_missing_entry

Definition at line 235 of file config.h.

◆ readConfig() [6/6]

template<bool t_crash_on_missing_entry>
template<class t_Reader >
void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readConfig ( const std::string &  file_name,
const char *  node_name,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inline

Read configuration (assuming the configuration node to be in the root).

Parameters
[in]file_namefile name
[in]crash_on_missing_entry
[in]node_namenode name, the default is used if empty
Note
Intercept implicit conversion of a pointer to bool.

Definition at line 255 of file config.h.

◆ readNestedConfig()

template<bool t_crash_on_missing_entry>
template<class t_Reader >
void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::readNestedConfig ( t_Reader &  reader,
const std::string &  node_name,
const bool  crash_on_missing_entry = default_crash_on_missing_entry_ 
)
inline

Read nested configuration node.

Parameters
[in]reader
[in]crash_on_missing_entry
[in]node_namenode name, the default is used if empty

Definition at line 132 of file config.h.

◆ setDefaults()

template<bool t_crash_on_missing_entry>
virtual void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::setDefaults ( )
protectedpure virtual

Set members to their default values.

Implemented in humoto::WeightedSimpleTaskBaseMixin< constraints::ConstraintsGIB< TaskBase > >, humoto::WeightedSimpleTaskBaseMixin< constraints::ConstraintsGILU< TaskBase > >, humoto::WeightedSimpleTaskBaseMixin< constraints::ConstraintsGIL< TaskBase > >, humoto::WeightedSimpleTaskBaseMixin< constraints::ConstraintsGIU< TaskBase > >, humoto::WeightedSimpleTaskBaseMixin< constraints::ConstraintsGIB0< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsAB< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsAB0< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsASU< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsASL< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsASLU< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsAU< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsAL< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsASB< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsALU< TaskBase > >, humoto::GeneralTaskBaseMixin< constraints::ConstraintsASB0< TaskBase > >, humoto::pepper_mpc::MPCParameters, humoto::rigidbody::RotaryState, humoto::walking::RobotFootParameters, humoto::pepper_mpc::MotionParameters, humoto::Solution, humoto::wpg04::MPCParameters, humoto::walking::StanceFSMParameters, humoto::TaskBase, humoto::rigidbody::RigidBodyState, humoto::wpg04::ModelState, humoto::pepper_mpc::RobotParameters, humoto::pepper_ik::MotionParameters, humoto::qpoases::SolverParameters, humoto::qpoases::SolverParameters::QPoasesParameters, humoto::ConfigurableOptimizationProblem, humoto::kktsolver::SolverParameters, humoto::pepper_mpc::ModelState, humoto::wpg04::WalkParameters, humoto::qpmad::SolverParameters, humoto::rigidbody::PointMassState, humoto::qpmad::SolverParameters::QPmadParameters, humoto::pepper_ik::WBCParameters, humoto::pepper_ik::TaskBaseCoMTrackingBase, humoto::pepper_ik::TaskBaseOrientationBase, humoto::pepper_ik::TaskTagOrientation< t_features >, humoto::pepper_ik::TaskTagPose3Dof< t_features >, humoto::pepper_ik::TaskTagAngularVelocity< t_features >, humoto::pepper_ik::TaskTagCompleteVelocity< t_features >, humoto::pepper_ik::TaskTagPose< t_features >, humoto::pepper_ik::GeneralizedCoordinates< t_features >, humoto::pepper_ik::TaskBodyCoMTracking< t_features >, humoto::pepper_ik::TaskJointsReference< t_features >, humoto::wpg04::TaskFootstepBounds, humoto::quadprogpp::SolverParameters, humoto::rigidbody::RigidBodyPose, humoto::SolverParametersBase, humoto::wpg04::TaskCoMVelocity, humoto::wpg04::TaskCoPBounds, humoto::wpg04::TaskCoPPosition, humoto::wpg04::TaskCoPVelocity, and humoto::wpg04::TaskTerminalConstraint.

◆ writeConfig() [1/4]

template<bool t_crash_on_missing_entry>
template<class t_Writer >
void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::writeConfig ( t_Writer &  writer) const
inline

Write configuration.

Parameters
[in,out]writerconfiguration writer

Definition at line 300 of file config.h.

◆ writeConfig() [2/4]

template<bool t_crash_on_missing_entry>
template<class t_Writer >
void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::writeConfig ( t_Writer &  writer,
const std::string &  node_name 
) const
inline

Write configuration.

Parameters
[in,out]writerconfiguration writer
[in]node_namenode name, the default is used if empty

Definition at line 313 of file config.h.

◆ writeConfig() [3/4]

template<bool t_crash_on_missing_entry>
template<class t_Writer >
void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::writeConfig ( const std::string &  file_name) const
inline

Write configuration.

Parameters
[in]file_namefile name

Definition at line 328 of file config.h.

◆ writeConfig() [4/4]

template<bool t_crash_on_missing_entry>
template<class t_Writer >
void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::writeConfig ( const std::string &  file_name,
const std::string &  node_name 
) const
inline

Write configuration.

Parameters
[in]file_namefile name
[in]node_namenode name, the default is used if empty

Definition at line 342 of file config.h.

◆ writeNestedConfig() [1/2]

template<bool t_crash_on_missing_entry>
template<class t_Writer >
void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::writeNestedConfig ( t_Writer &  writer) const
inline

Write nested configuration node.

Parameters
[in,out]writerconfiguration writer

Definition at line 272 of file config.h.

◆ writeNestedConfig() [2/2]

template<bool t_crash_on_missing_entry>
template<class t_Writer >
void humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::writeNestedConfig ( t_Writer &  writer,
const std::string &  node_name 
) const
inline

Write nested configuration node.

Parameters
[in,out]writerconfiguration writer
[in]node_namenode name, the default is used if empty

Definition at line 285 of file config.h.

Member Data Documentation

◆ default_crash_on_missing_entry_

template<bool t_crash_on_missing_entry>
const bool humoto::config::CommonConfigurableBase< t_crash_on_missing_entry >::default_crash_on_missing_entry_ = t_crash_on_missing_entry
staticprotected

Definition at line 67 of file config.h.


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