PeriDyno 1.0.0
Loading...
Searching...
No Matches
Object.h File Reference
#include <string>
#include <atomic>
#include <map>
Include dependency graph for Object.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  dyno::ClassInfo
 
class  dyno::Object
 

Namespaces

namespace  dyno
 This is an implementation of AdditiveCCD based on peridyno.
 

Macros

#define DECLARE_CLASS(name)
 
#define IMPLEMENT_CLASS_COMMON(name, func)
 
#define IMPLEMENT_CLASS(name)
 
#define _STR(s)
 
#define DECLARE_TCLASS(name, T1)
 
#define IMPLEMENT_CLASS_COMMON_1(name, T1, func)
 
#define IMPLEMENT_TCLASS(name, T1)
 
#define DEFINE_CLASS(name)
 
#define DEFINE_UNIQUE_CLASS(name, type)
 

Typedefs

typedef Object *(* dyno::ObjectConstructorFn) (void)
 
typedef uint32_t dyno::ObjectId
 

Functions

bool dyno::Register (ClassInfo *ci)
 

Macro Definition Documentation

◆ _STR

#define _STR ( s)
Value:
#s

Definition at line 85 of file Object.h.

◆ DECLARE_CLASS

#define DECLARE_CLASS ( name)
Value:
public: \
static const ClassInfo* ms_classinfo; \
public: \
virtual const ClassInfo* getClassInfo() const; \
static Object* createObject();

Definition at line 65 of file Object.h.

◆ DECLARE_TCLASS

#define DECLARE_TCLASS ( name,
T1 )
Value:
public: \
static const ClassInfo ms_classinfo; \
public: \
virtual const ClassInfo* getClassInfo() const; \
static Object* createObject();

Definition at line 87 of file Object.h.

◆ DEFINE_CLASS

#define DEFINE_CLASS ( name)
Value:
template class name<DataType3d>;

Definition at line 140 of file Object.h.

◆ DEFINE_UNIQUE_CLASS

#define DEFINE_UNIQUE_CLASS ( name,
type )
Value:
template class name<type>;

Definition at line 143 of file Object.h.

◆ IMPLEMENT_CLASS

#define IMPLEMENT_CLASS ( name)
Value:
IMPLEMENT_CLASS_COMMON(name,name::createObject) \
Object* name::createObject() \
{ return new name;}
#define IMPLEMENT_CLASS_COMMON(name, func)
Definition Object.h:73

Definition at line 79 of file Object.h.

◆ IMPLEMENT_CLASS_COMMON

#define IMPLEMENT_CLASS_COMMON ( name,
func )
Value:
const ClassInfo* name::ms_classinfo = new ClassInfo((#name), (ObjectConstructorFn) func); \
\
const ClassInfo* name::getClassInfo() const \
{return name::ms_classinfo;}

Definition at line 73 of file Object.h.

◆ IMPLEMENT_CLASS_COMMON_1

#define IMPLEMENT_CLASS_COMMON_1 ( name,
T1,
func )
Value:
template<typename T1> \
const ClassInfo name<T1>::ms_classinfo(std::string(_STR(name)).append("<").append(T1::getName()).append(">"), \
(ObjectConstructorFn) func); \
\
template<typename T1> \
const ClassInfo* name<T1>::getClassInfo() const \
{return &name<T1>::ms_classinfo;}
#define _STR(s)
Definition Object.h:85

Definition at line 94 of file Object.h.

◆ IMPLEMENT_TCLASS

#define IMPLEMENT_TCLASS ( name,
T1 )
Value:
IMPLEMENT_CLASS_COMMON_1(name, T1, name<T1>::createObject) \
\
template<typename T1> \
Object* name<T1>::createObject() \
{ return new name<T1>;}
#define IMPLEMENT_CLASS_COMMON_1(name, T1, func)
Definition Object.h:94

Definition at line 103 of file Object.h.