Go to the documentation of this file.
16 #ifndef SURGSIM_FRAMEWORK_SCENEELEMENT_INL_H
17 #define SURGSIM_FRAMEWORK_SCENEELEMENT_INL_H
33 std::vector<std::shared_ptr<T>> result;
37 std::shared_ptr<T> typedElement = std::dynamic_pointer_cast<T>(componentIt->second);
40 result.emplace_back(std::move(typedElement));
51 <<
"Component named " << component <<
" not found in SceneElement named " <<
getName()
52 <<
". Cannot get " <<
property <<
" property.";
53 return found->second->getValue<T>(property);
63 result = found->second->getValue(property, value);
#define SURGSIM_ASSERT(condition)
Assert that condition is true.
Definition: Assert.h:77
std::string getName() const
Return the name of this SceneElement.
Definition: SceneElement.cpp:175
std::vector< std::shared_ptr< Component > > getComponents() const
Gets all the components of this SceneElement.
Definition: SceneElement.cpp:195
Definition: CompoundShapeToGraphics.cpp:29
std::unordered_map< std::string, std::shared_ptr< Component > > m_components
A collection of Components.
Definition: SceneElement.h:229
T getValue(const std::string &component, const std::string &property) const
Retrieves the property value from a component.
Definition: SceneElement-inl.h:47