33 #ifndef DART_COMMON_SPECIALIZEDFORASPECT_HPP_
34 #define DART_COMMON_SPECIALIZEDFORASPECT_HPP_
44 template <
class... OtherSpecAspects>
54 template <
class SpecAspect>
80 void set(
const T* aspect);
86 void set(std::unique_ptr<T>&& aspect);
89 template <
class T,
typename ...Args>
90 T* createAspect(Args&&... args);
100 std::unique_ptr<T> releaseAspect();
104 static constexpr
bool isSpecializedFor();
108 template <
class T>
struct type { };
112 bool _has(type<T>)
const;
115 bool _has(type<SpecAspect>)
const;
122 SpecAspect* _get(type<SpecAspect>);
126 const T* _get(type<T>)
const;
129 const SpecAspect* _get(type<SpecAspect>)
const;
136 void _set(type<T>,
const T* aspect);
139 void _set(type<SpecAspect>,
const SpecAspect* aspect);
146 void _set(type<T>, std::unique_ptr<T>&& aspect);
149 void _set(type<SpecAspect>, std::unique_ptr<SpecAspect>&& aspect);
152 template <
class T,
typename ...Args>
153 T* _createAspect(type<T>, Args&&... args);
156 template <
typename ...Args>
157 SpecAspect* _createAspect(type<SpecAspect>, Args&&... args);
161 void _removeAspect(type<T>);
164 void _removeAspect(type<SpecAspect>);
168 std::unique_ptr<T> _releaseAspect(type<T>);
171 std::unique_ptr<SpecAspect> _releaseAspect(type<SpecAspect>);
175 static constexpr
bool _isSpecializedFor(type<T>);
178 static constexpr
bool _isSpecializedFor(type<SpecAspect>);
189 template <
class SpecAspect1,
class... OtherSpecAspects>
192 Virtual< SpecializedForAspect<OtherSpecAspects...> > >
std::string type
Definition: SdfParser.cpp:82
Terminator for the variadic template.
Definition: CompositeJoiner.hpp:45
Composite is a base class that should be virtually inherited by any class that wants to be able to ma...
Definition: Composite.hpp:52
virtual ~SpecializedForAspect()=default
virtual ~SpecializedForAspect()=default
Composite::AspectMap::iterator mSpecAspectIterator
Iterator that points to the Aspect of this SpecializedForAspect.
Definition: SpecializedForAspect.hpp:181
Declaration of the variadic template.
Definition: SpecializedForAspect.hpp:46
virtual ~SpecializedForAspect()=default
std::multimap< dart::dynamics::Shape *, SimpleFrameShapeDnD * >::iterator iterator
Definition: Viewer.cpp:622
Definition: BulletCollisionDetector.cpp:63