Public Member Functions | Static Public Member Functions | Protected Attributes
GenericObjectContainer Class Reference

#include <GenericObjectContainer.h>

List of all members.

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

Detailed Description

Definition at line 11 of file GenericObjectContainer.h.


Constructor & Destructor Documentation

Constructor.

Definition at line 10 of file GenericObjectContainer.cpp.

Destroy the container after removing all objects inside.

Definition at line 30 of file GenericObjectContainer.cpp.


Member Function Documentation

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.

Get the number of elements in the container.

Returns:
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.

Parameters:
theAssociatedObjectIDThe unique ID of the object.
Returns:
The object element in the container.

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.

Parameters:
theIDThe unique ID of the object to be returned.
Returns:
A pointer to the object corresponding to the given ID or NULL if the object was not found.

Definition at line 59 of file GenericObjectContainer.cpp.

Returns the object correspImuonding to a container index.

Parameters:
indThe container index of the object to be returned.
Returns:
A pointer to the object corresponding to the given index or NULL if the object was not found.

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.

Parameters:
objectHandlerA pointer to the object to be inserted.
Returns:
The ID of the inserted object.

Definition at line 50 of file GenericObjectContainer.cpp.

Remove all objects from the container.

Definition at line 34 of file GenericObjectContainer.cpp.

Remove the object corresponding to the given ID from the container.

Parameters:
theIDThe 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.

Parameters:
pLua 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.

Parameters:
pLua 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.

Parameters:
pLua 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.

Parameters:
pLua 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.


Member Data Documentation

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.

Definition at line 122 of file GenericObjectContainer.h.


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


vrep_ros_plugin
Author(s): Riccardo Spica , Giovanni Claudio
autogenerated on Wed Sep 9 2015 18:54:52