Main Page | Directories | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

singleton.h File Reference

#include "../symbol_shortening.h"
#include <vector>
#include "singleton_container.h"

Include dependency graph for singleton.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Classes

class  ClientBase
 the class ClientBase delivers the base information, to concat client class instances with the corresponding server class instance. More...
class  Singleton< T >
 BaseSingleton class for classes which need only ONE instance per project. More...
class  SingletonVec< T, SIZE >
 scalable variant of base Singleton, which can manage a prdefined amount of instances with global access More...

Defines

#define SINGLETON(CLASS)   Singleton< CLASS >
 the macro SINGLETON allows to define classes independend from the value of PRT_INSTANCE_CNT, so that the compiler selects the appropriate base class during compile time this variant is used by the compiler, if only one ISO11783 or DIN9684 BUS (common case) has to be managed by the IsoAgLib, so that the additional overhead of SingletonVec is avoided
#define SINGLETON_CLIENT1(CLASS, CLIENT1, KEY1)   SingletonCont1<CLASS,CLIENT1,KEY1>
 the macro SINGLETON_CLIENT1 allows to define a singleton, which allows ONE (aka 1) client class to register pointers to each instance (the register function has to be called during execution of constructor, whereas the unregister function has to be called during execution of destructor.
#define SINGLETON_CLIENT2(CLASS, CLIENT1, KEY1, CLIENT2, KEY2)   SingletonCont2<CLASS,CLIENT1,KEY1,CLIENT2,KEY2>
 the macro SINGLETON_CLIENT2 allows to define a singleton, which allows TWO (aka 2) client classes to register pointers to each instance (the register function has to be called during execution of constructor, whereas the unregister function has to be called during execution of destructor.
#define SINGLETON_CLIENT3(CLASS, CLIENT1, KEY1, CLIENT2, KEY2, CLIENT3, KEY3)   SingletonCont3< CLASS,CLIENT1,KEY1,CLIENT2,KEY2,CLIENT3,KEY3>
 the macro SINGLETON_CLIENT3 allows to define a singleton, which allows THREE (aka 3) client classes to register pointers to each instance (the register function has to be called during execution of constructor, whereas the unregister function has to be called during execution of destructor.
#define autoInstance()   instance()
 the macro autoInstance() is simply replaced by instance() in cases where only one ISO11783 or DIN9684 BUS is managed as the more usual case is only one BUS, this solution creates no unneeded overhead
#define getCanInstance4Comm()   getCanInstance()
#define getSchedulerInstance4Comm()   getSchedulerInstance()
#define getBaseInstance4Comm()   getBaseInstance()
#define getSystemMgmtInstance4Comm()   getSystemMgmtInstance()
#define getDinMonitorInstance4Comm()   getDinMonitorInstance()
#define getIsoMonitorInstance4Comm()   getIsoMonitorInstance()
#define getDinServiceMonitorInstance4Comm()   getDinServiceMonitorInstance()
#define getProcessInstance4Comm()   getProcessInstance()
#define getDinMaskuploadInstance4Comm()   getDinMaskuploadInstance()
#define getMultiSendInstance4Comm()   getMultiSendInstance()
#define getIisoTerminalInstance4Comm()   getIsoTerminalInstance()
#define getGpsInstance4Comm()   getGpsInstance()
#define CAN_SINGLETON(CLASS)   Singleton<CLASS>
 CAN_SINGLETON allows to define CAN classes independend from the specified amount of managed CAN BUSes.
#define USE_BASE_SINGLETON_VEC   0
#define CLIENT_TYPE_CNT()   1
#define CLIENT_TYPE_CNT()   2
#define CLIENT_TYPE_CNT()   3
#define USE_BASE_SINGLETON_VEC   1
#define CLIENT_TYPE_CNT()   1
#define CLIENT_TYPE_CNT()   2
#define CLIENT_TYPE_CNT()   3


Define Documentation

 
#define autoInstance  )     instance()
 

the macro autoInstance() is simply replaced by instance() in cases where only one ISO11783 or DIN9684 BUS is managed as the more usual case is only one BUS, this solution creates no unneeded overhead

Definition at line 115 of file singleton.h.

#define CAN_SINGLETON CLASS   )     Singleton<CLASS>
 

CAN_SINGLETON allows to define CAN classes independend from the specified amount of managed CAN BUSes.

Definition at line 156 of file singleton.h.

 
#define CLIENT_TYPE_CNT  )     3
 

Definition at line 309 of file singleton.h.

 
#define CLIENT_TYPE_CNT  )     2
 

Definition at line 309 of file singleton.h.

 
#define CLIENT_TYPE_CNT  )     1
 

Definition at line 309 of file singleton.h.

 
#define CLIENT_TYPE_CNT  )     3
 

Definition at line 309 of file singleton.h.

 
#define CLIENT_TYPE_CNT  )     2
 

Definition at line 309 of file singleton.h.

 
#define CLIENT_TYPE_CNT  )     1
 

Definition at line 309 of file singleton.h.

 
#define getBaseInstance4Comm  )     getBaseInstance()
 

Definition at line 118 of file singleton.h.

Referenced by __IsoAgLib::ISOItem_c::processMsg(), __IsoAgLib::GPS_c::processMsg(), __IsoAgLib::MeasureProgLocal_c::setVal(), __IsoAgLib::MeasureProgLocal_c::start(), and __IsoAgLib::MeasureProgLocal_c::timeEvent().

 
#define getCanInstance4Comm  )     getCanInstance()
 

Definition at line 116 of file singleton.h.

Referenced by __IsoAgLib::Base_c::checkCreateReceiveFilter(), __IsoAgLib::ISOMonitor_c::close(), __IsoAgLib::Scheduler_c::close(), __IsoAgLib::ISOTerminal_c::close(), __IsoAgLib::Scheduler_c::closeCommunication(), __IsoAgLib::Process_c::createRemoteFilter(), __IsoAgLib::DINMonitor_c::deleteDinMemberGtp(), __IsoAgLib::Process_c::deleteRemoteFilter(), __IsoAgLib::Base_c::forceMaintainPower(), __IsoAgLib::ISOTerminal_c::indicateObjectPoolCompletion(), __IsoAgLib::ISOMonitor_c::init(), __IsoAgLib::DINMonitor_c::init(), __IsoAgLib::GPS_c::init(), __IsoAgLib::MultiSend_c::init(), __IsoAgLib::Base_c::isoSendCalendar(), __IsoAgLib::Base_c::isoTimeEvent(), __IsoAgLib::ISOItem_c::processMsg(), __IsoAgLib::MultiSend_c::processMsg(), __IsoAgLib::ISOTerminal_c::processMsg(), __IsoAgLib::DINMaskUpload_c::processMsg(), __IsoAgLib::DINMonitor_c::requestDinMemberNames(), __IsoAgLib::DINItem_c::sendAdressRelease(), __IsoAgLib::ProcDataBase_c::sendDataRawCmdGtp(), __IsoAgLib::MultiSend_c::sendIntern(), __IsoAgLib::DINItem_c::sendName(), __IsoAgLib::ISOMonitor_c::sendRequestForClaimedAddress(), __IsoAgLib::DINItem_c::sendState(), __IsoAgLib::DINItem_c::sendStateRequest(), __IsoAgLib::DINMonitor_c::sendStopIntern(), __IsoAgLib::ProcDataBase_c::sendValGtp(), __IsoAgLib::MultiSend_c::setDelay(), __IsoAgLib::DINItem_c::startAddressClaim(), __IsoAgLib::ISOTerminal_c::startObjectPoolUploading(), __IsoAgLib::ISOItem_c::timeEvent(), __IsoAgLib::DINServiceItem_c::timeEvent(), __IsoAgLib::DINItem_c::timeEvent(), __IsoAgLib::Scheduler_c::timeEvent(), __IsoAgLib::Process_c::timeEvent(), __IsoAgLib::GPS_c::timeEvent(), __IsoAgLib::MultiSend_c::timeEvent(), __IsoAgLib::ISOTerminal_c::timeEvent(), __IsoAgLib::Base_c::timeEvent(), and __IsoAgLib::IdentItem_c::timeEventActive().

 
#define getDinMaskuploadInstance4Comm  )     getDinMaskuploadInstance()
 

Definition at line 124 of file singleton.h.

Referenced by __IsoAgLib::MultiSend_c::processMsg().

 
#define getDinMonitorInstance4Comm  )     getDinMonitorInstance()
 

Definition at line 120 of file singleton.h.

Referenced by __IsoAgLib::IdentItem_c::close(), __IsoAgLib::Process_c::createRemoteFilter(), __IsoAgLib::Process_c::deleteRemoteFilter(), __IsoAgLib::SystemMgmt_c::existMemberGtp(), __IsoAgLib::SystemMgmt_c::existMemberNr(), __IsoAgLib::ProcessPkg_c::flags2String(), __IsoAgLib::SystemMgmt_c::gety2gtpClaimedAddress(), __IsoAgLib::DINServiceMonitor_c::insertDinService(), __IsoAgLib::SystemMgmt_c::memberGetyCnt(), __IsoAgLib::SystemMgmt_c::memberGetyInd(), __IsoAgLib::SystemMgmt_c::memberGtp(), __IsoAgLib::SystemMgmt_c::memberNr(), __IsoAgLib::DINServiceMonitor_c::processMsg(), __IsoAgLib::DINServiceItem_c::processMsg(), __IsoAgLib::DINItem_c::processMsg(), __IsoAgLib::Process_c::processMsg(), __IsoAgLib::Base_c::processMsg(), __IsoAgLib::ProcDataBase_c::resolvGtpSetBasicSendFlags(), __IsoAgLib::DINItem_c::sendAdressRelease(), __IsoAgLib::DINItem_c::sendName(), __IsoAgLib::DINItem_c::sendState(), __IsoAgLib::DINItem_c::sendStateRequest(), __IsoAgLib::DINItem_c::startAddressClaim(), __IsoAgLib::ProcessPkg_c::string2Flags(), __IsoAgLib::DINServiceItem_c::timeEvent(), __IsoAgLib::DINItem_c::timeEvent(), __IsoAgLib::GPS_c::timeEvent(), __IsoAgLib::DINMaskUpload_c::timeEvent(), __IsoAgLib::Base_c::timeEvent(), __IsoAgLib::IdentItem_c::timeEventActive(), __IsoAgLib::IdentItem_c::timeEventPreAddressClaim(), __IsoAgLib::DINMaskUpload_c::tryResendMaskSyncData(), __IsoAgLib::ProcDataRemoteBase_c::var2empfSend(), and __IsoAgLib::ProcDataLocalBase_c::var2empfSend().

 
#define getDinServiceMonitorInstance4Comm  )     getDinServiceMonitorInstance()
 

Definition at line 122 of file singleton.h.

Referenced by __IsoAgLib::DINMonitor_c::processMsg().

 
#define getGpsInstance4Comm  )     getGpsInstance()
 

Definition at line 127 of file singleton.h.

Referenced by __IsoAgLib::Process_c::processMsg().

 
#define getIisoTerminalInstance4Comm  )     getIsoTerminalInstance()
 

Definition at line 126 of file singleton.h.

 
#define getIsoMonitorInstance4Comm  )     getIsoMonitorInstance()
 

Definition at line 121 of file singleton.h.

Referenced by __IsoAgLib::IdentItem_c::close(), __IsoAgLib::Process_c::createRemoteFilter(), __IsoAgLib::Process_c::deleteRemoteFilter(), __IsoAgLib::SystemMgmt_c::existMemberGtp(), __IsoAgLib::SystemMgmt_c::existMemberNr(), __IsoAgLib::ProcessPkg_c::flags2String(), __IsoAgLib::SystemMgmt_c::gety2gtpClaimedAddress(), __IsoAgLib::ISOTerminal_c::indicateObjectPoolCompletion(), __IsoAgLib::IdentItem_c::init(), __IsoAgLib::Base_c::isoProcessMsg(), __IsoAgLib::Base_c::isoTimeEvent(), __IsoAgLib::SystemMgmt_c::memberGetyCnt(), __IsoAgLib::SystemMgmt_c::memberGetyInd(), __IsoAgLib::SystemMgmt_c::memberGtp(), __IsoAgLib::SystemMgmt_c::memberNr(), __IsoAgLib::ISOItem_c::processMsg(), __IsoAgLib::ISOTerminal_c::processMsg(), __IsoAgLib::ProcDataBase_c::resolvGtpSetBasicSendFlags(), __IsoAgLib::IdentItem_c::setToMaster(), __IsoAgLib::ISOTerminal_c::startObjectPoolUploading(), __IsoAgLib::ProcessPkg_c::string2Flags(), __IsoAgLib::ISOItem_c::timeEvent(), __IsoAgLib::DINMonitor_c::timeEvent(), __IsoAgLib::ISOTerminal_c::timeEvent(), __IsoAgLib::Base_c::timeEvent(), __IsoAgLib::IdentItem_c::timeEventActive(), __IsoAgLib::IdentItem_c::timeEventPreAddressClaim(), __IsoAgLib::ProcDataRemoteBase_c::var2empfSend(), and __IsoAgLib::ProcDataLocalBase_c::var2empfSend().

 
#define getMultiSendInstance4Comm  )     getMultiSendInstance()
 

Definition at line 125 of file singleton.h.

Referenced by __IsoAgLib::DINMaskUpload_c::init(), __IsoAgLib::DINMaskUpload_c::processMsg(), and __IsoAgLib::DINMaskUpload_c::timeEvent().

 
#define getProcessInstance4Comm  )     getProcessInstance()
 

Definition at line 123 of file singleton.h.

Referenced by __IsoAgLib::ProcDataBase_c::getProcessPkg(), __IsoAgLib::ProcDataRemoteBase_c::init(), __IsoAgLib::ProcDataLocalBase_c::init(), __IsoAgLib::GPS_c::init(), __IsoAgLib::ProcDataLocalBase_c::ProcDataLocalBase_c(), __IsoAgLib::ProcDataRemoteBase_c::ProcDataRemoteBase_c(), __IsoAgLib::MeasureProgBase_c::processIncrementMsg(), __IsoAgLib::ISOMonitor_c::processMsg(), __IsoAgLib::SetpointBase_c::processMsg(), __IsoAgLib::MeasureProgBase_c::processMsg(), __IsoAgLib::MeasureProgRemote_c::processMsg(), __IsoAgLib::MeasureProgLocal_c::processMsg(), __IsoAgLib::ProcDataBase_c::processMsg(), __IsoAgLib::GPS_c::processMsg(), __IsoAgLib::ProcDataRemoteSimpleSetpointSimpleMeasureCombined_c::processProg(), __IsoAgLib::SimpleManageMeasureProgRemote_c::processProg(), __IsoAgLib::ManageMeasureProgLocal_c::processProg(), __IsoAgLib::ProcDataLocalBase_c::processProg(), __IsoAgLib::SetpointLocal_c::processRequest(), __IsoAgLib::SetpointRemote_c::processSet(), __IsoAgLib::SetpointLocal_c::processSet(), __IsoAgLib::SimpleManageSetpointRemote_c::processSetpoint(), __IsoAgLib::ProcDataRemoteSimpleSetpointSimpleMeasureCombined_c::processSetpoint(), __IsoAgLib::SimpleManageSetpointLocal_c::processSetpoint(), __IsoAgLib::ProcDataLocalBase_c::processSetpoint(), __IsoAgLib::MeasureProgRemote_c::setValFromPkg(), __IsoAgLib::DINMaskUpload_c::timeEvent(), __IsoAgLib::IdentItem_c::timeEventActive(), __IsoAgLib::ProcDataLocalBase_c::~ProcDataLocalBase_c(), and __IsoAgLib::ProcDataRemoteBase_c::~ProcDataRemoteBase_c().

 
#define getSchedulerInstance4Comm  )     getSchedulerInstance()
 

Definition at line 117 of file singleton.h.

Referenced by __IsoAgLib::ISOMonitor_c::close(), __IsoAgLib::SystemMgmt_c::close(), __IsoAgLib::DINServiceMonitor_c::close(), __IsoAgLib::DINMonitor_c::close(), __IsoAgLib::Process_c::close(), __IsoAgLib::GPS_c::close(), __IsoAgLib::MultiSend_c::close(), __IsoAgLib::ISOTerminal_c::close(), __IsoAgLib::DINMaskUpload_c::close(), __IsoAgLib::Base_c::close(), __IsoAgLib::ISOMonitor_c::init(), __IsoAgLib::SystemMgmt_c::init(), __IsoAgLib::DINServiceMonitor_c::init(), __IsoAgLib::DINMonitor_c::init(), __IsoAgLib::Process_c::init(), __IsoAgLib::GPS_c::init(), __IsoAgLib::MultiSend_c::init(), __IsoAgLib::ISOTerminal_c::init(), __IsoAgLib::DINMaskUpload_c::init(), __IsoAgLib::Base_c::init(), __IsoAgLib::DINMonitor_c::processMsg(), and __IsoAgLib::IdentItem_c::timeEventActive().

 
#define getSystemMgmtInstance4Comm  )     getSystemMgmtInstance()
 

Definition at line 119 of file singleton.h.

Referenced by __IsoAgLib::DINMonitor_c::adressConflict(), __IsoAgLib::IdentItem_c::close(), __IsoAgLib::DINMonitor_c::commandGlobalStop(), __IsoAgLib::DINMonitor_c::commandItemState(), __IsoAgLib::DINMonitor_c::commandStop(), __IsoAgLib::IdentItem_c::init(), __IsoAgLib::ProcessPkg_c::memberEmpf(), __IsoAgLib::ProcessPkg_c::memberSend(), __IsoAgLib::DINMonitor_c::processAddressClaimMsg(), __IsoAgLib::Process_c::processMsg(), __IsoAgLib::DINMaskUpload_c::processMsg(), __IsoAgLib::DINMonitor_c::requestDinMemberNames(), __IsoAgLib::DINMonitor_c::sendPeriodicStop(), __IsoAgLib::DINItem_c::sendStateRequest(), __IsoAgLib::DINMonitor_c::timeEvent(), __IsoAgLib::SetpointRemote_c::timeEvent(), __IsoAgLib::MeasureProgRemote_c::timeEvent(), __IsoAgLib::SetpointLocal_c::timeEvent(), __IsoAgLib::ManageMeasureProgLocal_c::timeEvent(), __IsoAgLib::GPS_c::timeEvent(), __IsoAgLib::DINMaskUpload_c::timeEvent(), and __IsoAgLib::MeasureProgRemote_c::verifySetRemoteGtp().

#define SINGLETON CLASS   )     Singleton< CLASS >
 

the macro SINGLETON allows to define classes independend from the value of PRT_INSTANCE_CNT, so that the compiler selects the appropriate base class during compile time this variant is used by the compiler, if only one ISO11783 or DIN9684 BUS (common case) has to be managed by the IsoAgLib, so that the additional overhead of SingletonVec is avoided

Definition at line 83 of file singleton.h.

#define SINGLETON_CLIENT1 CLASS,
CLIENT1,
KEY1   )     SingletonCont1<CLASS,CLIENT1,KEY1>
 

the macro SINGLETON_CLIENT1 allows to define a singleton, which allows ONE (aka 1) client class to register pointers to each instance (the register function has to be called during execution of constructor, whereas the unregister function has to be called during execution of destructor.

This macro allows to define specific classes independend from the value of PRT_INSTANCE_CNT. With the help of the macro autoInstance(), the interaction of instances of different classes which belongs to the same ISO11783 or DIN9684 BUS can be defined independend from PRT_INSTANCE_CNT

Definition at line 92 of file singleton.h.

#define SINGLETON_CLIENT2 CLASS,
CLIENT1,
KEY1,
CLIENT2,
KEY2   )     SingletonCont2<CLASS,CLIENT1,KEY1,CLIENT2,KEY2>
 

the macro SINGLETON_CLIENT2 allows to define a singleton, which allows TWO (aka 2) client classes to register pointers to each instance (the register function has to be called during execution of constructor, whereas the unregister function has to be called during execution of destructor.

This macro allows to define specific classes independend from the value of PRT_INSTANCE_CNT. With the help of the macro autoInstance(), the interaction of instances of different classes which belongs to the same ISO11783 or DIN9684 BUS can be defined independend from PRT_INSTANCE_CNT

Definition at line 101 of file singleton.h.

#define SINGLETON_CLIENT3 CLASS,
CLIENT1,
KEY1,
CLIENT2,
KEY2,
CLIENT3,
KEY3   )     SingletonCont3< CLASS,CLIENT1,KEY1,CLIENT2,KEY2,CLIENT3,KEY3>
 

the macro SINGLETON_CLIENT3 allows to define a singleton, which allows THREE (aka 3) client classes to register pointers to each instance (the register function has to be called during execution of constructor, whereas the unregister function has to be called during execution of destructor.

This macro allows to define specific classes independend from the value of PRT_INSTANCE_CNT. With the help of the macro autoInstance(), the interaction of instances of different classes which belongs to the same ISO11783 or DIN9684 BUS can be defined independend from PRT_INSTANCE_CNT

Definition at line 110 of file singleton.h.

#define USE_BASE_SINGLETON_VEC   1
 

Definition at line 294 of file singleton.h.

#define USE_BASE_SINGLETON_VEC   0
 

Definition at line 294 of file singleton.h.


Generated on Wed Oct 13 15:12:39 2004 for IsoAgLib by  doxygen 1.3.8-20040913