AGX Dynamics 2.40.0.0
Loading...
Searching...
No Matches
Type.h File Reference
#include <typeinfo>
#include <agxData/agxData.h>
#include <agxData/Format.h>
#include <agx/Vector.h>
#include <agx/HashTable.h>
#include <agx/HashVector.h>
#include <agx/Integer.h>
#include <agx/Referenced.h>
#include <agx/Object.h>
#include <agx/AtomicValue.h>
#include <agx/SpinMutex.h>
#include <agx/IntegerTemplates.h>
#include <agx/RealTemplates.h>
#include <agx/IndexRangeTemplates.h>

Go to the source code of this file.

Classes

struct  agxData::FormatBinding< T >
 
struct  agxData::FormatBinding< T * >
 
class  agxData::Type
 Abstracted type. More...
 
struct  agxData::TypeBinding< T >
 Type binding, templated type -> abstract type. More...
 
struct  agxData::TypeBinding< T * >
 

Namespaces

namespace  agx
 The agx namespace contains the dynamics/math part of the AGX Dynamics API.
 
namespace  agxData
 Contains classes for low level data storage for AGX.
 

Macros

#define AGX_TEMPLATED_TYPE_BINDING(_Type, _Name)
 
#define AGX_TYPE_BINDING(_Type, _Name)
 
#define AGX_TYPE_NAME_MAX_LENGTH   1023
 

Typedefs

typedef agx::HashTable< agx::Name, FormatRef > agxData::FormatTable
 
typedef agx::observer_ptr< const Type > agxData::TypeConstObserver
 
typedef agx::ref_ptr< const Type > agxData::TypeConstRef
 
typedef agx::observer_ptr< Type > agxData::TypeObserver
 
typedef agx::ref_ptr< Type > agxData::TypeRef
 
typedef agx::HashVector< agx::Name, TypeRef > agxData::TypeTable
 

Functions

template<typename T >
Format * agxData::getFormat ()
 
AGXCORE_EXPORT Format * agxData::getFormat (agx::TiXmlElement *eTypeFormat, agx::Device *device=nullptr)
 
AGXCORE_EXPORT Format * agxData::getFormat (const agx::String &typeFormatName)
 
template<>
Format * agxData::getFormat< agx::String > ()
 
template<>
Format * agxData::getFormat< void > ()
 
AGXCORE_EXPORT Format * agxData::getGenericStructFormat (size_t numBytes)
 
AGXCORE_EXPORT Type * agxData::getOrCreateType (const agx::String &name)
 
template<typename T >
Type * agxData::getType ()
 
AGXCORE_EXPORT Type * agxData::getType (agx::UInt id)
 
AGXCORE_EXPORT Type * agxData::getType (const agx::String &name)
 
const TypeTable & agxData::getTypes ()
 
void agxData::printAllTypesAndFormats ()
 Print all types and formats to std::cout.
 

Macro Definition Documentation

◆ AGX_TEMPLATED_TYPE_BINDING

#define AGX_TEMPLATED_TYPE_BINDING (   _Type,
  _Name 
)
Value:
namespace agxData \
{ \
template <typename T> \
struct TypeBinding< _Type<T> > \
{ \
static Type *getType() \
{ \
Format *format = agxData::getFormat<T>(); \
const agx::String& elementName = format->getName() == "default" ? format->getType()->getName().str() : format->fullName(); \
agx::String typeName = _Name "<" + elementName + ">"; \
Type *type = agxData::getOrCreateType(typeName); \
\
if (!type->getDefaultFormat()) \
type->addFormat(new FormatT< _Type<T> >("default"), true); \
\
return type; \
} \
}; \
\
template <typename T> \
struct FormatBinding< _Type<T> > \
{ \
static Format *getFormat() \
{ \
return getType< _Type<T> >()->getDefaultFormat(); \
} \
}; \
}
Contains classes for low level data storage for AGX.
Definition: Container.h:23
AGXCORE_EXPORT Type * getOrCreateType(const agx::String &name)
static Format * getFormat()
Definition: Type.h:171
static Type * getType()
Definition: Type.h:158

Definition at line 192 of file Type.h.

◆ AGX_TYPE_BINDING

#define AGX_TYPE_BINDING (   _Type,
  _Name 
)
Value:
namespace agxData \
{ \
template <> \
struct TypeBinding<_Type> \
{ \
static Type *getType() \
{ \
return agxData::getOrCreateType(_Name); \
} \
}; \
}

Definition at line 179 of file Type.h.

◆ AGX_TYPE_NAME_MAX_LENGTH

#define AGX_TYPE_NAME_MAX_LENGTH   1023

Definition at line 41 of file Type.h.