opensurgsim
Public Member Functions | Public Attributes | List of all members
MockSceneElement Class Reference

Class to catch the calls made to the scene element, does nothing. More...

#include <MockObjects.h>

Inheritance diagram for MockSceneElement:
SurgSim::Framework::SceneElement ConstructorSceneElement

Public Member Functions

 MockSceneElement (const std::string &name="MockSceneElement")
 
virtual void update (double dt)
 
virtual void lateUpdate (double dt)
 
virtual void fixedRateUpdate (double dt)
 
virtual bool doInitialize ()
 Method to initialize this SceneElement. More...
 
- Public Member Functions inherited from SurgSim::Framework::SceneElement
 SceneElement (const std::string &name)
 Constructor. More...
 
virtual ~SceneElement ()
 Destructor.
 
virtual std::string getClassName () const
 
bool addComponent (std::shared_ptr< Component > component)
 Adds a component, calls initialize() on the component, if SceneElement::isInitialized() is true. More...
 
bool removeComponent (std::shared_ptr< Component > component)
 Removes a given component. More...
 
bool removeComponent (const std::string &name)
 Removes the component described by name. More...
 
void removeComponents ()
 Removes all components.
 
std::shared_ptr< ComponentgetComponent (const std::string &name) const
 Gets the component identified by name. More...
 
std::vector< std::shared_ptr< Component > > getComponents () const
 Gets all the components of this SceneElement. More...
 
template<class T >
std::vector< std::shared_ptr< T > > getComponents () const
 Template version of getComponents method to get all the components with type T. More...
 
template<class T >
getValue (const std::string &component, const std::string &property) const
 Retrieves the property value from a component. More...
 
boost::any getValue (const std::string &component, const std::string &property) const
 Retrieves the property value from a component. More...
 
template<class T >
bool getValue (const std::string &component, const std::string &property, T *value) const
 Retrieves the property value from a component, and convertis it to the type of the output parameter. More...
 
void setValue (const std::string &component, const std::string &property, const boost::any &value)
 Sets the property value of a component. More...
 
void addToGroup (const std::string &group)
 Add this scene element to the given group. More...
 
void removeFromGroup (const std::string &group)
 Remove this scene element from the given group. More...
 
void setGroups (const std::vector< std::string > &groups)
 Set the groups of this scene element. More...
 
std::vector< std::string > getGroups () const
 
bool inGroup (const std::string &name)
 Test whether this SceneElement is in a specific group. More...
 
bool initialize ()
 Executes the initialize operation. More...
 
std::string getName () const
 Return the name of this SceneElement. More...
 
void setPose (const SurgSim::Math::RigidTransform3d &pose)
 Set the pose of this SceneElement. More...
 
const SurgSim::Math::RigidTransform3dgetPose () const
 Get the pose of this SceneElement. More...
 
std::shared_ptr< PoseComponentgetPoseComponent ()
 Get the PoseComponent that controls the pose all Representations in this SceneElement. More...
 
void setScene (std::weak_ptr< Scene > scene)
 Sets the Scene. More...
 
std::shared_ptr< ScenegetScene ()
 Gets the Scene. More...
 
void setRuntime (std::weak_ptr< Runtime > runtime)
 Sets the Runtime. More...
 
std::shared_ptr< RuntimegetRuntime ()
 Gets the runtime. More...
 
bool isInitialized () const
 Return if this SceneElement is initialized. More...
 
void setActive (bool val)
 Set this SceneElement's status (active/inactive) More...
 
bool isActive () const
 
std::shared_ptr< SceneElementgetSharedPtr ()
 Gets a shared pointer to this SceneElement. More...
 
virtual YAML::Node encode (bool standalone) const
 Convert to a YAML::Node. More...
 
virtual bool decode (const YAML::Node &node)
 Pull data from a YAML::Node. More...
 

Public Attributes

bool didInit
 
bool didUpdate
 
bool didLateUpdate
 
bool didFixedUpdate
 

Detailed Description

Class to catch the calls made to the scene element, does nothing.

Member Function Documentation

§ doInitialize()

virtual bool MockSceneElement::doInitialize ( )
inlinevirtual

Method to initialize this SceneElement.

To be overridden by derived class(es).

Returns
True if initialization is successful; Otherwise, false.

Implements SurgSim::Framework::SceneElement.


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