CFx SDK Documentation 2026 SP0
Loading...
Searching...
No Matches
EditorImpl.h File Reference
#include "TD_PackPush.h"
#include "Editor.h"
#include "DbIdMapping.h"
#include "FxDbCoreExtension.h"
#include "TD_PackPop.h"

Go to the source code of this file.

Classes

class  OdRxEventImpl
 
class  OdEditorImpl
 

Macros

#define FX_SAFE_CALL_REACTOR_EVENT_IMPL(reactor, method, params, index)
 
#define FX_BEGIN_MAIN_THREAD()
 
#define FX_END_MAIN_THREAD()
 
#define RXEVENT_FIRE(method, inparams, params)
 
#define EDEVENT_FIRE(method, inparams, params)
 
#define DCEVENT_FIRE(method, inparams, params, IdMappingToDatabase)
 
#define RXEVENT_FIRE_ABORT(method, inparams, params, abortmethod, abortparams)
 
#define EDEVENT_FIRE_ABORT(method, inparams, params, abortmethod, abortparams)
 

Typedefs

typedef OdSmartPtr< OdRxEventImplOdRxEventImplPtr
 
typedef OdSmartPtr< OdEditorImplOdEditorImplPtr
 

Functions

OdArray< OdRxEventReactor * > fxCopyRawReactorPointers (OdArray< OdRxEventReactorPtr > &apReactors)
 
bool fxIsValidReactor (OdRxEventReactor *pRawReactor, const OdArray< OdRxEventReactorPtr > &apReactors, unsigned iHeuristicIndex)
 

Macro Definition Documentation

◆ DCEVENT_FIRE

#define DCEVENT_FIRE ( method,
inparams,
params,
IdMappingToDatabase )
Value:
inline void fire_##method inparams \
{ \
FX_BEGIN_MAIN_THREAD(); \
TD_AUTOLOCK( m_mutex ); \
try \
{ \
const auto reactors = fxCopyRawReactorPointers( m_reactors ); \
for (unsigned i = 0; i < reactors.size(); ++i) \
{ \
if ( fxIsValidReactor( reactors[i], m_reactors, i ) )\
reactors[i]->method params; \
} \
} \
catch( ... ) \
{ \
--m_EventCounter; \
throw; \
} \
if (!(--m_EventCounter))\
while( m_reactors.remove(OdRxEventReactorPtr()) );\
FX_END_MAIN_THREAD(); \
}
bool fxIsValidReactor(OdRxEventReactor *pRawReactor, const OdArray< OdRxEventReactorPtr > &apReactors, unsigned iHeuristicIndex)
Definition EditorImpl.h:83
OdArray< OdRxEventReactor * > fxCopyRawReactorPointers(OdArray< OdRxEventReactorPtr > &apReactors)
Definition EditorImpl.h:74
OdSmartPtr< OdRxEventReactor > OdRxEventReactorPtr
Definition RxEvent.h:672
GLenum GLint * params
Definition gles2_ext.h:184

Definition at line 152 of file EditorImpl.h.

◆ EDEVENT_FIRE

#define EDEVENT_FIRE ( method,
inparams,
params )
Value:
inline void fire_##method inparams \
{ \
FX_BEGIN_MAIN_THREAD(); \
TD_AUTOLOCK( m_mutex ); \
++m_EventCounter; \
try \
{ \
const auto reactors = fxCopyRawReactorPointers( m_reactors ); \
for (unsigned i = 0; i < reactors.size(); ++i) \
{ \
if ( fxIsValidReactor( reactors[i], m_reactors, i ) )\
{\
OdEditorReactorPtr edReactor = OdEditorReactor::cast(reactors[i]); \
if (edReactor.get()) edReactor->method params; \
}\
} \
} \
catch( ... ) \
{ \
--m_EventCounter; \
throw; \
} \
if (!(--m_EventCounter))\
while( m_reactors.remove(OdRxEventReactorPtr()) );\
FX_END_MAIN_THREAD(); \
}
OdSmartPtr< OdEditorReactor > OdEditorReactorPtr
Definition Editor.h:873
static OdRxObjectPtr cast(const OdRxObject *pointer)
Definition RxObject.h:640
const T * get() const
Definition SmartPtr.h:315

Definition at line 124 of file EditorImpl.h.

◆ EDEVENT_FIRE_ABORT

#define EDEVENT_FIRE_ABORT ( method,
inparams,
params,
abortmethod,
abortparams )

Definition at line 206 of file EditorImpl.h.

◆ FX_BEGIN_MAIN_THREAD

#define FX_BEGIN_MAIN_THREAD ( )
Value:
CFxDbCoreExtension::StaticExecuteInMainThread( [&]() {

Definition at line 68 of file EditorImpl.h.

◆ FX_END_MAIN_THREAD

#define FX_END_MAIN_THREAD ( )
Value:
} );

Definition at line 70 of file EditorImpl.h.

◆ FX_SAFE_CALL_REACTOR_EVENT_IMPL

#define FX_SAFE_CALL_REACTOR_EVENT_IMPL ( reactor,
method,
params,
index )
Value:
{ reactor->method params; }

<group OdRx_Classes>

Definition at line 59 of file EditorImpl.h.

◆ RXEVENT_FIRE

#define RXEVENT_FIRE ( method,
inparams,
params )
Value:
inline void fire_##method inparams \
{ \
FX_BEGIN_MAIN_THREAD(); \
TD_AUTOLOCK( m_mutex ); \
++m_EventCounter; \
try \
{ \
const auto reactors = fxCopyRawReactorPointers( m_reactors ); \
for (unsigned i = 0; i < reactors.size(); ++i) \
{ \
if ( fxIsValidReactor( reactors[i], m_reactors, i ) )\
FX_SAFE_CALL_REACTOR_EVENT_IMPL( reactors[i], method, params, i ) \
} \
} \
catch( ... ) \
{ \
--m_EventCounter; \
throw; \
} \
if (!(--m_EventCounter))\
while( m_reactors.remove(OdRxEventReactorPtr()) );\
FX_END_MAIN_THREAD(); \
}

Definition at line 99 of file EditorImpl.h.

◆ RXEVENT_FIRE_ABORT

#define RXEVENT_FIRE_ABORT ( method,
inparams,
params,
abortmethod,
abortparams )
Value:
inline void fire_##method inparams \
{ \
FX_BEGIN_MAIN_THREAD(); \
TD_AUTOLOCK( m_mutex ); \
const auto reactors = fxCopyRawReactorPointers( m_reactors ); \
OdArray<OdRxEventReactorPtr> firedReactors(reactors.length()); \
for (unsigned i = 0; i < reactors.size(); ++i) \
{ \
if ( fxIsValidReactor( reactors[i], m_reactors, i ) ) \
{ \
try \
{ \
firedReactors.append(reactors[i]); \
reactors[i]->method params; \
} \
catch(...) \
{ \
for (unsigned j = 0; j < firedReactors.size(); ++j) \
{ \
if (m_reactors.contains(firedReactors[j])) \
firedReactors[j]->abortmethod abortparams; \
} \
throw; \
} \
} \
} \
FX_END_MAIN_THREAD(); \
}

Definition at line 176 of file EditorImpl.h.

Typedef Documentation

◆ OdEditorImplPtr

Definition at line 400 of file EditorImpl.h.

◆ OdRxEventImplPtr

Definition at line 387 of file EditorImpl.h.

Function Documentation

◆ fxCopyRawReactorPointers()

OdArray< OdRxEventReactor * > fxCopyRawReactorPointers ( OdArray< OdRxEventReactorPtr > & apReactors)
inline

Definition at line 74 of file EditorImpl.h.

◆ fxIsValidReactor()

bool fxIsValidReactor ( OdRxEventReactor * pRawReactor,
const OdArray< OdRxEventReactorPtr > & apReactors,
unsigned iHeuristicIndex )
inline

Definition at line 83 of file EditorImpl.h.