33 #ifndef DART_COMMON_SPECIALIZEDFORASPECT_HPP_
34 #define DART_COMMON_SPECIALIZEDFORASPECT_HPP_
44 template <
class... OtherSpecAspects>
56 template <
class SpecAspect>
81 void set(
const T* aspect);
87 void set(std::unique_ptr<T>&& aspect);
90 template <
class T,
typename... Args>
91 T* createAspect(Args&&... args);
101 std::unique_ptr<T> releaseAspect();
105 static constexpr
bool isSpecializedFor();
115 bool _has(type<T>)
const;
118 bool _has(type<SpecAspect>)
const;
125 SpecAspect* _get(type<SpecAspect>);
129 const T* _get(type<T>)
const;
132 const SpecAspect* _get(type<SpecAspect>)
const;
139 void _set(type<T>,
const T* aspect);
142 void _set(type<SpecAspect>,
const SpecAspect* aspect);
149 void _set(type<T>, std::unique_ptr<T>&& aspect);
152 void _set(type<SpecAspect>, std::unique_ptr<SpecAspect>&& aspect);
155 template <
class T,
typename... Args>
156 T* _createAspect(type<T>, Args&&... args);
159 template <
typename... Args>
160 SpecAspect* _createAspect(type<SpecAspect>, Args&&... args);
164 void _removeAspect(type<T>);
167 void _removeAspect(type<SpecAspect>);
171 std::unique_ptr<T> _releaseAspect(type<T>);
174 std::unique_ptr<SpecAspect> _releaseAspect(type<SpecAspect>);
178 static constexpr
bool _isSpecializedFor(type<T>);
181 static constexpr
bool _isSpecializedFor(type<SpecAspect>);
192 template <
class SpecAspect1,
class... OtherSpecAspects>
195 Virtual<SpecializedForAspect<SpecAspect1> >,
196 Virtual<SpecializedForAspect<OtherSpecAspects...> > >
#define DART_DECLARE_CLASS_WITH_VIRTUAL_BASE_END
Definition: ClassWithVirtualBase.hpp:44
#define DART_DECLARE_CLASS_WITH_VIRTUAL_BASE_BEGIN
Definition: ClassWithVirtualBase.hpp:43
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:53
virtual ~SpecializedForAspect()=default
virtual ~SpecializedForAspect()=default
Composite::AspectMap::iterator mSpecAspectIterator
Iterator that points to the Aspect of this SpecializedForAspect.
Definition: SpecializedForAspect.hpp:184
Declaration of the variadic template.
Definition: SpecializedForAspect.hpp:46
virtual ~SpecializedForAspect()=default
std::multimap< dart::dynamics::Shape *, SimpleFrameShapeDnD * >::iterator iterator
Definition: Viewer.cpp:620
Definition: BulletCollisionDetector.cpp:65