Access to the global lists:
If the pointer to the respective list is 0, the function allocates a new list in a fairly thread-safe way.
ChargeTraitsList& ctList() { // Seems that nobody has initialized the list yet: create one. if (0 == ctList_) { ChargeTraitsList* tmp = new ChargeTraitsList; // If the list pointer is still 0: set it. if (0 == ctList_) ctList_ = tmp; // The list pointer has been initialized in the meantime: // use this first pointer. else delete tmp; } return *ctList_; }
Definition at line 93 of file osblistmgr.h.
OSB_LIB::ListMgr::ListMgr | ( | ) | [private] |
Prevent construction: not implemented.
OSB_LIB::ListMgr::ListMgr | ( | const ListMgr & | ) | [private] |
Prevent copying: not implemented.
static ChargeTraitsList& OSB_LIB::ListMgr::ctList | ( | ) | [static] |
List of charge traits.
static CurrencyBook& OSB_LIB::ListMgr::currencyBook | ( | ) | [static] |
List of currencies.
static void OSB_LIB::ListMgr::delInstance | ( | ) | [static, private] |
Delete all list pointers and set them to 0.
static AccountList& OSB_LIB::ListMgr::glAccounts | ( | ) | [static] |
List of GL accounts.
static RoundRuleList& OSB_LIB::ListMgr::roundRules | ( | ) | [static] |
List of rounding rules.
static TaxKeyList& OSB_LIB::ListMgr::taxKeys | ( | ) | [static] |
List of tax keys.
static UnitList& OSB_LIB::ListMgr::units | ( | ) | [static] |
List of units.
friend class DelInstance [friend] |
ChargeTraitsList* OSB_LIB::ListMgr::ctList_ [static, private] |
CurrencyBook* OSB_LIB::ListMgr::currencyBook_ [static, private] |
DelInstance OSB_LIB::ListMgr::delInstance_ [static, private] |
AccountList* OSB_LIB::ListMgr::glAccounts_ [static, private] |
RoundRuleList* OSB_LIB::ListMgr::roundRules_ [static, private] |
TaxKeyList* OSB_LIB::ListMgr::taxKeys_ [static, private] |
UnitList* OSB_LIB::ListMgr::units_ [static, private] |