6 #ifndef MATERIALX_GENUSERDATA_H
7 #define MATERIALX_GENUSERDATA_H
34 return shared_from_this();
40 return shared_from_this();
44 template <
class T> shared_ptr<T>
asA()
46 return std::dynamic_pointer_cast<
T>(getSelf());
50 template <
class T> shared_ptr<const T>
asA()
const
52 return std::dynamic_pointer_cast<
const T>(getSelf());
61 #endif // MATERIALX_GENCONTEXT_H
shared_ptr< const T > asA() const
Return this object cast to a templated type.
GenUserDataPtr getSelf()
Return a shared pointer for this object.
#define MATERIALX_NAMESPACE_BEGIN
ConstGenUserDataPtr getSelf() const
Return a shared pointer for this object.
std::shared_ptr< const GenUserData > ConstGenUserDataPtr
Shared pointer to a constant GenUserData.
std::shared_ptr< GenUserData > GenUserDataPtr
Shared pointer to a GenUserData.
shared_ptr< T > asA()
Return this object cast to a templated type.
#define MATERIALX_NAMESPACE_END