#include <GenericObjectContainer.h>
Public Member Functions | |
| void | actualizeForSceneContent () |
| void | endOfSimulation () |
| GenericObjectContainer () | |
| int | getCount () |
| boost::shared_ptr < GenericObjectHandler > | getFromAssociatedObject (int theAssociatedObjectID) |
| boost::shared_ptr < GenericObjectHandler > | getFromID (int theID) |
| boost::shared_ptr < GenericObjectHandler > | getFromIndex (int ind) |
| void | handleSimulation () |
| int | insert (boost::shared_ptr< GenericObjectHandler > objectHandler) |
| void | removeAll () |
| void | removeFromID (int theID) |
| void | startOfSimulation () |
| virtual | ~GenericObjectContainer () |
Static Public Member Functions | |
| static void | simExtGetAllCustomData (SLuaCallBack *p) |
| static void | simExtGetCustomDataFromHeader (SLuaCallBack *p) |
| static void | simExtSetFloatCustomDataFromHeader (SLuaCallBack *p) |
| static void | simExtSetIntCustomDataFromHeader (SLuaCallBack *p) |
Protected Attributes | |
| std::map< std::string, boost::shared_ptr < GenericObjectHandler > > | _allExistingPlugins |
| std::vector< boost::shared_ptr < GenericObjectHandler > > | _allObjects |
| pluginlib::ClassLoader < GenericObjectHandler > | _object_handler_loader |
Definition at line 11 of file GenericObjectContainer.h.
Constructor.
Definition at line 10 of file GenericObjectContainer.cpp.
| GenericObjectContainer::~GenericObjectContainer | ( | ) | [virtual] |
Destroy the container after removing all objects inside.
Definition at line 30 of file GenericObjectContainer.cpp.
This is called every time the scene content in V-REP might have changed (e.g. object added/removed/etc.). The method synchronizes the container with the current V-REP's scene content: we need to make sure that every object in V-REP's scene has exactly one element in this container.
Definition at line 109 of file GenericObjectContainer.cpp.
This is called at the end of simulation.
Definition at line 92 of file GenericObjectContainer.cpp.
| int GenericObjectContainer::getCount | ( | ) |
Get the number of elements in the container.
Definition at line 83 of file GenericObjectContainer.cpp.
| boost::shared_ptr< GenericObjectHandler > GenericObjectContainer::getFromAssociatedObject | ( | int | theAssociatedObjectID | ) |
Get the container of an object.
| theAssociatedObjectID | The unique ID of the object. |
Definition at line 74 of file GenericObjectContainer.cpp.
| boost::shared_ptr< GenericObjectHandler > GenericObjectContainer::getFromID | ( | int | theID | ) |
Returns the object corresponding to a given unique ID.
| theID | The unique ID of the object to be returned. |
Definition at line 59 of file GenericObjectContainer.cpp.
| boost::shared_ptr< GenericObjectHandler > GenericObjectContainer::getFromIndex | ( | int | ind | ) |
Returns the object correspImuonding to a container index.
| ind | The container index of the object to be returned. |
Definition at line 68 of file GenericObjectContainer.cpp.
This is called at each simulation step, i.e. when the main script calls: simHandleModule.
Definition at line 103 of file GenericObjectContainer.cpp.
| int GenericObjectContainer::insert | ( | boost::shared_ptr< GenericObjectHandler > | objectHandler | ) |
Insert an object in the container.
| objectHandler | A pointer to the object to be inserted. |
Definition at line 50 of file GenericObjectContainer.cpp.
| void GenericObjectContainer::removeAll | ( | ) |
Remove all objects from the container.
Definition at line 34 of file GenericObjectContainer.cpp.
| void GenericObjectContainer::removeFromID | ( | int | theID | ) |
Remove the object corresponding to the given ID from the container.
| theID | The unique ID of the object to be removed. |
Definition at line 39 of file GenericObjectContainer.cpp.
| void GenericObjectContainer::simExtGetAllCustomData | ( | SLuaCallBack * | p | ) | [static] |
A Lua custom command that retrieves all custom data from an object and print it in the format described in CAccess class documentation.
| p | Lua callback parameter. See V-REP main documentation for details. |
Definition at line 203 of file GenericObjectContainer.cpp.
| void GenericObjectContainer::simExtGetCustomDataFromHeader | ( | SLuaCallBack * | p | ) | [static] |
A Lua custom command that retrieves the custom data corresponding to a certain header (among those defined in CustomDataHeaders) from an object.
| p | Lua callback parameter. See V-REP main documentation for details. |
Definition at line 275 of file GenericObjectContainer.cpp.
| simVoid GenericObjectContainer::simExtSetFloatCustomDataFromHeader | ( | SLuaCallBack * | p | ) | [static] |
A Lua custom command that sets the floating point custom data corresponding to a certain header (among those defined in CustomDataHeaders) from an object. TODO: use binding to pass the object container so that the object can be initialized each time the custom data are modified.
| p | Lua callback parameter. See V-REP main documentation for details. |
TODO: add output bool to indicate success
Definition at line 336 of file GenericObjectContainer.cpp.
| simVoid GenericObjectContainer::simExtSetIntCustomDataFromHeader | ( | SLuaCallBack * | p | ) | [static] |
A Lua custom command that sets the integer point custom data corresponding to a certain header (among those defined in CustomDataHeaders) from an object. TODO: use binding to pass the object container so that the object can be initialized each time the custom data are modified.
| p | Lua callback parameter. See V-REP main documentation for details. |
TODO: add output bool to indicate success
Definition at line 410 of file GenericObjectContainer.cpp.
This is called at the start of simulation.
Definition at line 87 of file GenericObjectContainer.cpp.
std::map<std::string, boost::shared_ptr<GenericObjectHandler> > GenericObjectContainer::_allExistingPlugins [protected] |
Definition at line 123 of file GenericObjectContainer.h.
std::vector<boost::shared_ptr<GenericObjectHandler> > GenericObjectContainer::_allObjects [protected] |
Definition at line 120 of file GenericObjectContainer.h.
pluginlib::ClassLoader<GenericObjectHandler> GenericObjectContainer::_object_handler_loader [protected] |
Definition at line 122 of file GenericObjectContainer.h.