AGX Dynamics  2.35.0.1
Referenced.h File Reference
#include <agx/config/AGX_DEBUG_REFERENCED.h>
#include <agx/config/AGX_DEBUG_TRACK_REFERENCED_OBJECTS.h>
#include <agx/ref_ptr.h>
#include <agx/observer_ptr.h>
#include <agx/agxCore_export.h>
#include <agx/AtomicValue.h>
#include <agx/ScopeLock.h>
#include <mutex>
#include <agx/Vector.h>
#include <agx/PushDisableWarnings.h>
#include <agx/PopDisableWarnings.h>

Go to the source code of this file.

Classes

class  agx::Referenced
 Base class providing referencing counted objects. More...
 

Namespaces

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

Macros

#define AGX_DECLARE_POINTER_TYPES(type)
 
#define AGX_EXPIRED_SCOPE_ALLOCATION   (-0xABC)
 
#define INSERT_OBSERVER(obs)    if ( !m_observers->contains( obs ) ) m_observers->push_back( obs )
 
#define OBSERVER_CONTAINER_TYPE   1
 
#define ObserverContainer   VectorPOD< Observer* >*
 
#define REMOVE_OBSERVER(obs)    if ( m_observers ) m_observers->findAndErase( obs )
 
#define REPORT_REFERENCED_DELETED
 

Typedefs

using agx::Mutex = std::mutex
 

Macro Definition Documentation

◆ AGX_DECLARE_POINTER_TYPES

#define AGX_DECLARE_POINTER_TYPES (   type)
Value:
class type; \
typedef agx::ref_ptr< type > type ## Ref; \
typedef agx::observer_ptr< type > type ## Observer; \
typedef agx::ref_ptr< const type > type ## ConstRef;\
typedef agx::observer_ptr< const type > type ## ConstObserver
Smart pointer for observed objects, that automatically set pointers to them to null when they deleted...
Definition: observer_ptr.h:61
Smart pointer for handling referenced counted objects.
Definition: ref_ptr.h:30

Definition at line 248 of file Referenced.h.

◆ AGX_EXPIRED_SCOPE_ALLOCATION

#define AGX_EXPIRED_SCOPE_ALLOCATION   (-0xABC)

Definition at line 95 of file Referenced.h.

◆ INSERT_OBSERVER

#define INSERT_OBSERVER (   obs)     if ( !m_observers->contains( obs ) ) m_observers->push_back( obs )

Definition at line 49 of file Referenced.h.

◆ OBSERVER_CONTAINER_TYPE

#define OBSERVER_CONTAINER_TYPE   1

Definition at line 42 of file Referenced.h.

◆ ObserverContainer

#define ObserverContainer   VectorPOD< Observer* >*

Definition at line 48 of file Referenced.h.

◆ REMOVE_OBSERVER

#define REMOVE_OBSERVER (   obs)     if ( m_observers ) m_observers->findAndErase( obs )

Definition at line 51 of file Referenced.h.

◆ REPORT_REFERENCED_DELETED

#define REPORT_REFERENCED_DELETED
Value:
if ( m_observers ) { \
for ( size_t i = 0, numObservers = m_observers->size(); i < numObservers; ++i ) \
(*m_observers)[ i ]->objectDeleted( this ); \
delete m_observers; \
m_observers = nullptr; \
}

Definition at line 53 of file Referenced.h.