Header of ... More...
Go to the source code of this file.
Defines | |
#define | DECLARE_UNITS_ORDERED_LOOP(loopid) |
#define | DECLARE_GLOBAL_UNITS_ORDERED_LOOP(loopid) |
#define | BEGIN_UNITS_ORDERED_LOOP(loopid, unitclass, unit) |
#define | BEGIN_GLOBAL_UNITS_ORDERED_LOOP(loopid, unit) |
#define | DECLARE_UNITS_LIST_LOOP(loopid) openfluid::core::UnitsPtrList_t::iterator _M_##loopid##_lstit;\ |
#define | BEGIN_UNITS_LIST_LOOP(loopid, ulist, unit) |
#define | DECLARE_EVENT_COLLECTION_LOOP openfluid::core::EventsList_t::iterator _M_EvListiter; |
#define | BEGIN_EVENT_COLLECTION_LOOP(evlist, evobj) |
#define | END_LOOP |
#define | _UNITID(_id) _M_##_id##_Unit |
#define | _UNITSLISTID(_id) _M_##_id##_UList |
#define | _UNITSPTRLISTID(_id) _M_##_id##_UList |
#define | _THREADPOOLID(_id) _M_##_id##_Pool |
#define | _PCSORDID(_id) _M_##_id##_PcsOrd |
#define | _UNITSLISTITERID(_id) _M_##_id##_UListit |
#define | _UNITSPTRLISTITERID(_id) _M_##_id##_UPtrListit |
#define | _EVENTSLISTITERID(_id) _M_##_id##_EListit |
#define | _OPENFLUID_UNITS_ORDERED_LOOP_WITHID(unitclass, unitptr, id) |
#define | OPENFLUID_UNITS_ORDERED_LOOP(unitclass, unitptr) _OPENFLUID_UNITS_ORDERED_LOOP_WITHID(unitclass,unitptr,__LINE__) |
#define | _APPLY_UNITS_ORDERED_LOOP_THREADED_WITHID(id, unitclass, funcptr,...) |
#define | APPLY_UNITS_ORDERED_LOOP_THREADED(unitclass, funcptr,...) _APPLY_UNITS_ORDERED_LOOP_THREADED_WITHID(__LINE__,unitclass,funcptr,## __VA_ARGS__) |
#define | _OPENFLUID_ALLUNITS_ORDERED_LOOP_WITHID(unitptr, id) |
#define | OPENFLUID_ALLUNITS_ORDERED_LOOP(unitptr) _OPENFLUID_ALLUNITS_ORDERED_LOOP_WITHID(unitptr,__LINE__) |
#define | _APPLY_ALLUNITS_ORDERED_LOOP_THREADED_WITHID(id, funcptr,...) |
#define | APPLY_ALLUNITS_ORDERED_LOOP_THREADED(funcptr,...) _APPLY_ALLUNITS_ORDERED_LOOP_THREADED_WITHID(__LINE__,funcptr,## __VA_ARGS__) |
#define | _OPENFLUID_UNITSLIST_LOOP_WITHID(unitslist, unitptr, id) |
#define | OPENFLUID_UNITSLIST_LOOP(unitslist, unitptr) _OPENFLUID_UNITSLIST_LOOP_WITHID(unitslist,unitptr,__LINE__) |
#define | _OPENFLUID_EVENT_COLLECTION_LOOP_WITHID(id, evlist, evobj) |
#define | OPENFLUID_EVENT_COLLECTION_LOOP(evlist, evobj) _OPENFLUID_EVENT_COLLECTION_LOOP_WITHID(__LINE__,evlist,evobj) |
Header of ...
#define _APPLY_ALLUNITS_ORDERED_LOOP_THREADED_WITHID | ( | id, | |
funcptr, | |||
... | |||
) |
openfluid::core::UnitsPtrList_t* _UNITSPTRLISTID(id) = mp_CoreData->getUnitsGlobally(); \ if (_UNITSPTRLISTID(id) != NULL) \ { \ openfluid::core::UnitsPtrList_t::iterator _UNITSPTRLISTITERID(id) = _UNITSPTRLISTID(id)->begin(); \ if (_UNITSPTRLISTITERID(id) != _UNITSPTRLISTID(id)->end()) \ { \ openfluid::core::PcsOrd_t _PCSORDID(id) = (*_UNITSPTRLISTITERID(id))->getProcessOrder(); \ while (_UNITSPTRLISTITERID(id) != _UNITSPTRLISTID(id)->end()) \ { \ Glib::ThreadPool _THREADPOOLID(id)(OPENFLUID_GetFunctionMaxThreads(),true); \ while (_UNITSPTRLISTITERID(id) != _UNITSPTRLISTID(id)->end() && (*_UNITSPTRLISTITERID(id))->getProcessOrder() == _PCSORDID(id)) \ { \ _THREADPOOLID(id).push(sigc::bind(sigc::mem_fun(*this,&funcptr),(*_UNITSPTRLISTITERID(id)), ## __VA_ARGS__)); \ ++_UNITSPTRLISTITERID(id); \ } \ _THREADPOOLID(id).shutdown(); \ if (_UNITSPTRLISTITERID(id) != _UNITSPTRLISTID(id)->end()) _PCSORDID(id) = (*_UNITSPTRLISTITERID(id))->getProcessOrder(); \ } \ } \ }
#define _APPLY_UNITS_ORDERED_LOOP_THREADED_WITHID | ( | id, | |
unitclass, | |||
funcptr, | |||
... | |||
) |
openfluid::core::UnitsList_t* _UNITSLISTID(id) = mp_CoreData->getUnits(unitclass)->getList(); \ if (_UNITSLISTID(id) != NULL) \ { \ openfluid::core::UnitsList_t::iterator _UNITSLISTITERID(id) = _UNITSLISTID(id)->begin(); \ if (_UNITSLISTITERID(id) != _UNITSLISTID(id)->end()) \ { \ openfluid::core::PcsOrd_t _PCSORDID(id) = _UNITSLISTITERID(id)->getProcessOrder(); \ while (_UNITSLISTITERID(id) != _UNITSLISTID(id)->end()) \ { \ Glib::ThreadPool _THREADPOOLID(id)(OPENFLUID_GetFunctionMaxThreads(),true); \ while (_UNITSLISTITERID(id) != _UNITSLISTID(id)->end() && _UNITSLISTITERID(id)->getProcessOrder() == _PCSORDID(id)) \ { \ _THREADPOOLID(id).push(sigc::bind(sigc::mem_fun(*this,&funcptr),&(*_UNITSLISTITERID(id)), ## __VA_ARGS__)); \ ++_UNITSLISTITERID(id); \ } \ _THREADPOOLID(id).shutdown(); \ if (_UNITSLISTITERID(id) != _UNITSLISTID(id)->end()) _PCSORDID(id) = _UNITSLISTITERID(id)->getProcessOrder(); \ } \ } \ }
#define _EVENTSLISTITERID | ( | _id | ) | _M_##_id##_EListit |
#define _OPENFLUID_ALLUNITS_ORDERED_LOOP_WITHID | ( | unitptr, | |
id | |||
) |
openfluid::core::UnitsPtrList_t* _UNITSPTRLISTID(id) = mp_CoreData->getUnitsGlobally(); \ for (openfluid::core::UnitsPtrList_t::iterator _UNITSPTRLISTITERID(id) = _UNITSPTRLISTID(id)->begin(); \ unitptr = (*_UNITSPTRLISTITERID(id)),_UNITSPTRLISTITERID(id) != _UNITSPTRLISTID(id)->end(); \ ++_UNITSPTRLISTITERID(id))
#define _OPENFLUID_EVENT_COLLECTION_LOOP_WITHID | ( | id, | |
evlist, | |||
evobj | |||
) |
for(openfluid::core::EventsList_t::iterator _EVENTSLISTITERID(id) = (evlist)->begin(); \ evobj = &(*_EVENTSLISTITERID(id)), _EVENTSLISTITERID(id) != (evlist)->end(); \ ++_EVENTSLISTITERID(id))
#define _OPENFLUID_UNITS_ORDERED_LOOP_WITHID | ( | unitclass, | |
unitptr, | |||
id | |||
) |
openfluid::core::UnitsList_t* _UNITSLISTID(id) = mp_CoreData->getUnits(unitclass)->getList(); \ if (_UNITSLISTID(id) != 0) \ for (openfluid::core::UnitsList_t::iterator _UNITSLISTITERID(id) = _UNITSLISTID(id)->begin(); \ unitptr = &(*_UNITSLISTITERID(id)),_UNITSLISTITERID(id) != _UNITSLISTID(id)->end(); \ ++_UNITSLISTITERID(id))
#define _OPENFLUID_UNITSLIST_LOOP_WITHID | ( | unitslist, | |
unitptr, | |||
id | |||
) |
if (unitslist != 0) \ for (openfluid::core::UnitsPtrList_t::iterator _UNITSLISTITERID(id) = unitslist->begin(); \ unitptr = *_UNITSLISTITERID(id),_UNITSLISTITERID(id) != unitslist->end(); \ ++_UNITSLISTITERID(id))
#define _PCSORDID | ( | _id | ) | _M_##_id##_PcsOrd |
#define _THREADPOOLID | ( | _id | ) | _M_##_id##_Pool |
#define _UNITID | ( | _id | ) | _M_##_id##_Unit |
#define _UNITSLISTID | ( | _id | ) | _M_##_id##_UList |
#define _UNITSLISTITERID | ( | _id | ) | _M_##_id##_UListit |
#define _UNITSPTRLISTID | ( | _id | ) | _M_##_id##_UList |
#define _UNITSPTRLISTITERID | ( | _id | ) | _M_##_id##_UPtrListit |
#define APPLY_ALLUNITS_ORDERED_LOOP_THREADED | ( | funcptr, | |
... | |||
) | _APPLY_ALLUNITS_ORDERED_LOOP_THREADED_WITHID(__LINE__,funcptr,## __VA_ARGS__) |
Macro for applying a threaded function to each unit of the domain, following their process order
[in] | funcptr | member function name |
[in] | ... | extra parameters to pass to the member function |
#define APPLY_UNITS_ORDERED_LOOP_THREADED | ( | unitclass, | |
funcptr, | |||
... | |||
) | _APPLY_UNITS_ORDERED_LOOP_THREADED_WITHID(__LINE__,unitclass,funcptr,## __VA_ARGS__) |
Macro for applying a threaded function to each unit of a class, following their process order
[in] | unitclass | name of the unit class |
[in] | funcptr | member function name |
[in] | ... | extra parameters to pass to the member function |
#define BEGIN_EVENT_COLLECTION_LOOP | ( | evlist, | |
evobj | |||
) |
{ \ for(_M_EvListiter=(evlist)->begin(); _M_EvListiter != (evlist)->end(); _M_EvListiter++) \ { \ evobj = &(*_M_EvListiter);
Macro for the beginning of a loop processing an event list from an event collection
[in] | evlist | pointer to a list of events |
[out] | evobj | the current processed event |
#define BEGIN_GLOBAL_UNITS_ORDERED_LOOP | ( | loopid, | |
unit | |||
) |
{ \ _M_##loopid##_GUList = mp_CoreData->getUnitsGlobally(); \ for (_M_##loopid##_ordit = _M_##loopid##_GUList->begin();_M_##loopid##_ordit != _M_##loopid##_GUList->end();++_M_##loopid##_ordit) \ { \ unit = (*_M_##loopid##_ordit);
Macro for the beginning of a loop processing all units, following their process order
[in] | loopid | ID of the loop, must match declaration |
[out] | unit | pointer to a openfluid::core::Unit objects, pointing to the current processed SU |
#define BEGIN_UNITS_LIST_LOOP | ( | loopid, | |
ulist, | |||
unit | |||
) |
if ((ulist) != NULL) \
{ \
for(_M_##loopid##_lstit=ulist->begin(); _M_##loopid##_lstit != ulist->end(); _M_##loopid##_lstit++) \
{ \
unit = *_M_##loopid##_lstit; \
Macro for the beginning of a loop processing a list of units
[in] | loopid | ID of the loop, must match declaration |
[in] | ulist | pointer to a list of openfluid::core::Unit |
[out] | unit | pointer to a openfluid::core::Unit objects, pointing to the current processed SU |
#define BEGIN_UNITS_ORDERED_LOOP | ( | loopid, | |
unitclass, | |||
unit | |||
) |
_M_##loopid##_UList = mp_CoreData->getUnits(unitclass)->getList(); \ if (_M_##loopid##_UList != NULL) \ { \ for (_M_##loopid##_ordit = _M_##loopid##_UList->begin();_M_##loopid##_ordit != _M_##loopid##_UList->end();++_M_##loopid##_ordit) \ { \ unit = &(*_M_##loopid##_ordit);
Macro for the beginning of a loop processing all units of a class, following their process order
[in] | loopid | ID of the loop, must match declaration |
[in] | unitclass | name of the unit class |
[out] | unit | pointer to a openfluid::core::Unit objects, pointing to the current processed SU |
#define DECLARE_EVENT_COLLECTION_LOOP openfluid::core::EventsList_t::iterator _M_EvListiter; |
Macro for declaration of a loop processing events in an event collection
#define DECLARE_GLOBAL_UNITS_ORDERED_LOOP | ( | loopid | ) |
openfluid::core::UnitsPtrList_t::iterator _M_##loopid##_ordit;\ openfluid::core::UnitsPtrList_t* _M_##loopid##_GUList;
Macro for declaration of a loop processing all units, following their process order
[in] | loopid | ID of the loop |
#define DECLARE_UNITS_LIST_LOOP | ( | loopid | ) | openfluid::core::UnitsPtrList_t::iterator _M_##loopid##_lstit;\ |
Macro for declaration of a loop processing a list of units
[in] | loopid | ID of the loop |
#define DECLARE_UNITS_ORDERED_LOOP | ( | loopid | ) |
openfluid::core::UnitsList_t::iterator _M_##loopid##_ordit;\ openfluid::core::UnitsList_t* _M_##loopid##_UList;
Macro for declaration of a loop processing all units of a class, following their process order
[in] | loopid | ID of the loop |
#define END_LOOP |
#define OPENFLUID_ALLUNITS_ORDERED_LOOP | ( | unitptr | ) | _OPENFLUID_ALLUNITS_ORDERED_LOOP_WITHID(unitptr,__LINE__) |
Macro for a loop processing all units, following their process order
[out] | unitptr | pointer to a openfluid::core::Unit objects, automatically pointing to the current processed unit |
#define OPENFLUID_EVENT_COLLECTION_LOOP | ( | evlist, | |
evobj | |||
) | _OPENFLUID_EVENT_COLLECTION_LOOP_WITHID(__LINE__,evlist,evobj) |
Macro for a loop processing an events list from an event collection
[in] | evlist | pointer to a list of events |
[out] | evobj | the current processed event |
#define OPENFLUID_UNITS_ORDERED_LOOP | ( | unitclass, | |
unitptr | |||
) | _OPENFLUID_UNITS_ORDERED_LOOP_WITHID(unitclass,unitptr,__LINE__) |
Macro for a loop processing all units of a class, following their process order
[in] | unitclass | name of the unit class |
[out] | unitptr | pointer to a openfluid::core::Unit objects, automatically pointing to the current processed unit |
#define OPENFLUID_UNITSLIST_LOOP | ( | unitslist, | |
unitptr | |||
) | _OPENFLUID_UNITSLIST_LOOP_WITHID(unitslist,unitptr,__LINE__) |
Macro for a loop processing a list of units
[in] | unitslist | pointer to a list of openfluid::core::Unit |
[out] | unitptr | pointer to a openfluid::core::Unit objects, pointing to the current processed unit |