AGX Dynamics  2.37.2.0
Property.h File Reference
#include <agx/agxPhysics_export.h>
#include <agx/Referenced.h>
#include <agx/ref_ptr.h>
#include <agx/stdint.h>
#include <typeinfo>
#include <stdexcept>
#include <agxStream/Serializable.h>
#include <agx/Vec3.h>
#include <agx/Vec2.h>
#include <agx/HashTable.h>
#include <string>
#include <agx/HashSet.h>

Go to the source code of this file.

Classes

class  agx::PropertyContainer
 Class that is a container of named properties. More...
 

Namespaces

 agx
 The agx namespace contains the dynamics/math part of the AGX Dynamics API.
 

Macros

#define PROPERTY_THROW_IF_TRUE(X, MESSAGE)   if (X) { agxThrow std::runtime_error(MESSAGE); }
 
#define PROPERTY_TYPE(type, Type)
 
#define RESTORE_PROPERTY_CONTAINER(In, TypeName, Type)
 
#define SAVE_PROPERTY_CONTAINER(Out, TypeName, Type)
 

Typedefs

typedef agx::ref_ptr< PropertyContainer > agx::PropertyContainerRef
 

Macro Definition Documentation

◆ PROPERTY_THROW_IF_TRUE

#define PROPERTY_THROW_IF_TRUE (   X,
  MESSAGE 
)    if (X) { agxThrow std::runtime_error(MESSAGE); }

Definition at line 32 of file Property.h.

◆ PROPERTY_TYPE

#define PROPERTY_TYPE (   type,
  Type 
)

Definition at line 39 of file Property.h.

Referenced by agx::PropertyContainer::size().

◆ RESTORE_PROPERTY_CONTAINER

#define RESTORE_PROPERTY_CONTAINER (   In,
  TypeName,
  Type 
)
Value:
{\
size_t size; std::string name;\
Type value;\
\
m_ ## TypeName ## _map.clear(); \
In.beginSection("PropertyContainer");\
In.getAttribute("size", size); \
for(size_t i=0; i < size ; ++i) {\
In >> agxStream::in( "name", name );\
In >> agxStream::in( "value", value );\
addProperty ## TypeName (name, value);\
}\
In.endSection("PropertyContainer");\
}
InputRef< T > in(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored (usually a pointer...
Definition: InputArchive.h:400

Definition at line 273 of file Property.h.

◆ SAVE_PROPERTY_CONTAINER

#define SAVE_PROPERTY_CONTAINER (   Out,
  TypeName,
  Type 
)
Value:
{\
TypeName ## Map::const_iterator it = m_ ## TypeName ## _map.begin(); \
Out.beginSection("PropertyContainer");\
Out.addAttribute("size", m_ ## TypeName ## _map.size() );\
for(; it != m_ ## TypeName ## _map.end(); ++it) {\
Type TypeName ## value; \
std::string name = it->first; \
TypeName ## value = it->second; \
Out << agxStream::out( "name", name );\
Out << agxStream::out( "value", TypeName ## value );\
}\
Out.endSection("PropertyContainer");\
}
OutputRef< Serializable > out(const char *name, const Serializable *obj)
Return an object that contain the name and the object that should be serialized to an archive...

Definition at line 243 of file Property.h.