Commit 1a90a63d authored by florent's avatar florent Committed by florent
Browse files

Make access functions to init and goal config inline.

	* include/hppCore/hppProblem.h: add code,
	* src/hppProblem.cpp: remove code.
parent b4d350b0
......@@ -80,19 +80,38 @@ class ChppProblem
/**
* \brief Get shared pointer to initial configuration.
*/
CkwsConfigShPtr initConfig() const;
CkwsConfigShPtr initConfig() const {
return attInitConf;
};
/**
* \brief Set initial configuration.
*/
ktStatus initConfig ( CkwsConfigShPtr i_config );
ktStatus initConfig ( CkwsConfigShPtr inConfig ) {
if (inConfig->device() != attRobot) {
ODEBUG1(":goalConfig: configuration device does not match problem device.");
return KD_ERROR;
}
attInitConf = inConfig;
return KD_OK;
};
/**
* \brief Get shared pointer to goal configuration.
*/
CkwsConfigShPtr goalConfig() const;
CkwsConfigShPtr goalConfig() const {
return attGoalConf;
};
/**
* \brief Set goal configuration.
*/
ktStatus goalConfig ( CkwsConfigShPtr i_config );
ktStatus goalConfig ( CkwsConfigShPtr inConfig ) {
if (inConfig->device() != attRobot) {
ODEBUG1(":goalConfig: configuration device does not match problem device.");
return KD_ERROR;
}
attGoalConf = inConfig;
return KD_OK;
};
/**
\brief Check that problem is well formulated
*/
......
......@@ -126,32 +126,6 @@ void ChppProblem::initMapOuter()
// ==========================================================================
CkwsConfigShPtr ChppProblem::initConfig() const
{
return attInitConf;
}
// ==========================================================================
ktStatus ChppProblem::initConfig ( CkwsConfigShPtr inConfig )
{
if (inConfig->device() != attRobot) {
ODEBUG1(":goalConfig: configuration device does not match problem device.");
return KD_ERROR;
}
attInitConf = inConfig;
return KD_OK;
}
// ==========================================================================
CkwsConfigShPtr ChppProblem::goalConfig() const
{
return attGoalConf;
}
// ==========================================================================
ktStatus ChppProblem::goalConfig ( CkwsConfigShPtr inConfig )
{
if (inConfig->device() != attRobot) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment