 |
AGX Dynamics
2.38.0.2
|
Go to the documentation of this file.
78 void addListener(EventListener* listener);
79 void removeListener(EventListener* listener);
80 bool hasListener(EventListener* listener);
89 static void setEnableRebind(
bool flag);
94 static bool getEnableRebind();
104 virtual void save(TiXmlElement* )
const {}
107 static Object *load(TiXmlElement *eObject,
Device *device);
109 template <
typename T>
110 static T *load(TiXmlElement *eObject,
Device *device);
124 static TiXmlDocument openDocument(
const String& path);
128 template <
typename T>
129 static T *load(
const String& path,
Device *device,
const String& type =
"",
size_t instance = 0);
131 template <
typename T>
153 const agx::Name& getImplementationName()
const;
230 template <
typename T>
233 template <
typename T>
234 const T *getContext()
const;
236 template <
typename T>
239 template <
typename T>
240 const T *getResource(
const agx::Path& path)
const;
242 template <
typename T>
243 T *getAutoScopedResource(
const agx::Path& path);
245 template <
typename T>
246 const T *getAutoScopedResource(
const agx::Path& path)
const;
251 bool isUnique()
const;
256 virtual void buildNavigationTree(agxJson::Value& eNode)
const;
275 static bool g_shouldRebind;
283 EventDispatch *m_eventDispatch;
301 template <
typename T>
304 template <
typename T>
332 #define AGX_MODEL_IMPLEMENTATION(_class, _path) \
333 agx::Model *_class::ClassModel() \
335 ScopeLock<ReentrantMutex> lock(agx::getTypeSystemMutex()); \
336 static agx::Model *s_model = nullptr; \
339 agx::createImplementedModel(_path, s_model); \
342 LOGGER_ERROR() << agx::String::format("No model found for path \'%s\'. Make sure AGX environment is properly setup", _path) << LOGGER_ENDL(); \
347 #define AGX_BUILTIN_MODEL(_class, _path, _parent) \
348 agx::Model *_class::ClassModel() \
350 ScopeLock<ReentrantMutex> lock(agx::getTypeSystemMutex()); \
351 static agx::Model *s_model = nullptr; \
354 agx::createBuiltinModel(_path, _parent, s_model); \
362 template <
typename T>
365 template <
typename T>
377 template <
typename T>
381 return dynamic_cast<T *
>(object);
384 template <
typename T>
388 return dynamic_cast<T *
>(object);
391 template <
typename T>
395 return dynamic_cast<T *
>(object);
399 template <
typename T>
405 template <
typename T>
408 return dynamic_cast<const T *
>(this->
getContext());
412 template <
typename T>
416 return (
object !=
nullptr && object->
is<T>()) ?
object->as<T>() :
nullptr;
419 template <
typename T>
422 return const_cast<Object *
>(
this)->getResource<T>(path);
426 template <
typename T>
430 return (
object !=
nullptr && object->
is<T>()) ?
object->as<T>() :
nullptr;
433 template <
typename T>
436 return const_cast<Object *
>(
this)->getAutoScopedResource<T>(path);
HashTable< Name, Object * > ObjectPtrTable
AGXCORE_EXPORT agx::ReentrantMutex & getTypeSystemMutex()
agx::Object * getContext()
virtual void configure(TiXmlElement *)
Representation of a path, a list of name components.
agx::Object * getAutoScopedResource(const agx::Path &path, agx::Model *model=nullptr)
virtual void save(TiXmlElement *) const
Vector containing 'raw' data.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Contains classes for low level data storage for AGX.
A model is an abstract representation of the class of an agx::Object.
A pointer to an agx::Object.
#define AGX_DECLARE_VECTOR_TYPES(type)
agx::UInt32 getId() const
AGXCORE_EXPORT void createBuiltinModel(const char *path, Model *parent, Model *&result)
Inheritance with partial specialization due to bug with ref_ptr containers.
Representation of a name string.
agx::Object is a refcounted object with a name.
Inheritance with partial specialization due to bug with ref_ptr containers.
A component is an object containing other objects, enabling hierarchical structuring.
AGXCORE_EXPORT Component * root()
agx::Object * getResource(const agx::Path &path, agx::Model *model=nullptr)
AGX_DECLARE_HASHSET_TYPES(Object)
bool is() const
Subclass test.
Base class providing referencing counted objects.
#define AGX_DECLARE_POINTER_TYPES(type)
std::recursive_mutex ReentrantMutex
AGXCORE_EXPORT void createImplementedModel(const char *path, Model *&result)
static Object * load(TiXmlElement *eObject, Device *device)
An agx::Device is an abstract representation of a device on which data can be stored and processed.
virtual void snapshot(TiXmlNode *, const String &) const
const agx::Name & getName() const
static agx::Model * ClassModel()
AGXCORE_EXPORT void printNode(const char *path)
Debugging.
virtual void printSubtree() const
AGXCORE_EXPORT Model * getModel(const Path &path, const Path &_namespace=Path())