|
Choreonoid
1.1
|
#include <SceneBodyManager.h>
クラス | |
| class | FactoryHolder |
公開メンバ関数 | |
| SceneBodyManager (ExtensionManager &ext) | |
| ~SceneBodyManager () | |
| FactoryHolder * | addSceneBodyFactory (boost::function< SceneBody *(BodyItem *)> factory) |
静的公開メンバ関数 | |
| static SceneBodyManager * | instance () |
| SceneBodyManager::SceneBodyManager | ( | ExtensionManager & | ext | ) |
| SceneBodyManager::~SceneBodyManager | ( | ) |
| SceneBodyManager::FactoryHolder * SceneBodyManager::addSceneBodyFactory | ( | boost::function< SceneBody *(BodyItem *)> | factory | ) |
| factory | A factory function object that creates a scene body instance of a customized sub class. In order to avoid the collision between the multiple factories, it is desirable that the factory function checks the actual type of a BodyItem instance and a customized scene body is only returned if the type matches. Example code is as follows: SceneBody* factory(BodyItem* bodyItem)
{
BodyItemEx* ex = dynamic_cast<BodyItemEx*>(bodyItem);
if(ex){
return new SceneBodyEx(ex);
}
return 0;
}
|
|
static |
1.8.9.1