16 #ifndef SURGSIM_GRAPHICS_MANAGER_H
17 #define SURGSIM_GRAPHICS_MANAGER_H
52 const std::unordered_map<std::string, std::shared_ptr<Group>>&
getGroups()
const
58 const std::vector<std::shared_ptr<View>>&
getViews()
const
72 virtual bool executeAdditions(
const std::shared_ptr<SurgSim::Framework::Component>& component);
77 virtual bool executeRemovals(
const std::shared_ptr<SurgSim::Framework::Component>& component);
88 virtual bool addView(std::shared_ptr<View> view);
98 virtual bool removeView(std::shared_ptr<View> view);
105 virtual int getType()
const override;
110 virtual std::shared_ptr<Group>
getOrCreateGroup(
const std::string& name) = 0;
115 virtual void addGroup(std::shared_ptr<Group> group);
133 std::unordered_map<std::string, std::shared_ptr<Group>>
m_groups;
142 #endif // SURGSIM_GRAPHICS_MANAGER_H
Definition: DriveElementFromInputBehavior.cpp:27
std::unordered_map< std::string, std::shared_ptr< Group > > m_groups
Groups assigned to the manager.
Definition: Manager.h:133
virtual bool addRepresentation(std::shared_ptr< Representation > representation)
Adds an representation to the manager.
Definition: Manager.cpp:73
std::vector< std::shared_ptr< Representation > > m_representations
Representations assigned to the manager.
Definition: Manager.h:131
virtual std::shared_ptr< Group > getOrCreateGroup(const std::string &name)=0
Fetch a group with a given name, if the group does not exist, create it.
virtual ~Manager()
Destructor.
Definition: Manager.cpp:35
Base Component Manager class.
Definition: ComponentManager.h:49
virtual void dumpDebugInfo() const =0
Generic unspecified debug handle, there are no requirements on this interface the manager implementat...
virtual bool removeRepresentation(std::shared_ptr< Representation > representation)
Removes an representation from the manager.
Definition: Manager.cpp:128
virtual bool doInitialize()
Initializes the manager.
Definition: Manager.cpp:169
const std::vector< std::shared_ptr< View > > & getViews() const
Returns the views assigned to the manager.
Definition: Manager.h:58
virtual bool executeRemovals(const std::shared_ptr< SurgSim::Framework::Component > &component)
Removes a component.
Definition: Manager.cpp:39
Manager()
Constructor.
Definition: Manager.cpp:31
virtual bool removeView(std::shared_ptr< View > view)
Removes a view from the manager.
Definition: Manager.cpp:152
Basic graphics manager class which manages graphics components to provide a visualization of the scen...
Definition: Manager.h:37
virtual void addGroup(std::shared_ptr< Group > group)
Adds a group to the manager, override for manager specific behavior when adding.
Definition: Manager.cpp:208
const std::unordered_map< std::string, std::shared_ptr< Group > > & getGroups() const
Returns the groups assigned to the manager.
Definition: Manager.h:52
std::vector< std::shared_ptr< View > > m_views
Views assigned to the manager.
Definition: Manager.h:135
virtual bool doUpdate(double dt)
Performs an update for a single timestep.
Definition: Manager.cpp:179
virtual bool addView(std::shared_ptr< View > view)
Adds a view to the manager.
Definition: Manager.cpp:112
virtual bool doStartUp()
Starts up the manager after all threads have initialized.
Definition: Manager.cpp:174
const std::vector< std::shared_ptr< Representation > > & getRepresentations() const
Returns the representations assigned to the manager.
Definition: Manager.h:46
virtual bool executeAdditions(const std::shared_ptr< SurgSim::Framework::Component > &component)
Adds a component.
Definition: Manager.cpp:56
virtual int getType() const override
Overrides ComponentManager::getType()
Definition: Manager.cpp:203