#include <CalcInit.h>
Static Public Member Functions | |
static CalcInit * | instance () |
CalcInit: Call once at start of world to set up instruction factories and other boot time setup. | |
Static Private Attributes | |
static CalcInit * | _instance |
Definition at line 28 of file CalcInit.h.
CalcInit * CalcInit::instance | ( | ) | [static] |
CalcInit: Call once at start of world to set up instruction factories and other boot time setup.
Warning: Not thread safe
Definition at line 35 of file CalcInit.cpp.
References _instance, ExtCastRegister(), ExtDateTimeRegister(), ExtDynamicVariableRegister(), ExtMathRegister(), ExtRegExpRegister(), ExtStringRegister(), ExtWinAggFuncRegister(), InstructionFactory::getExtendedInstructionTable(), and InstructionFactory::registerInstructions().
Referenced by CalcAssemblerTest::CalcAssemblerTest(), CalcCastTest::CalcCastTest(), CalcExtCastTest::CalcExtCastTest(), CalcExtContextTest::CalcExtContextTest(), CalcExtDateTimeTest::CalcExtDateTimeTest(), CalcExtDynamicVariableTest::CalcExtDynamicVariableTest(), CalcExtMathTest::CalcExtMathTest(), CalcExtRegExpTest::CalcExtRegExpTest(), CalcExtStringTest::CalcExtStringTest(), CalcExtWinAggFuncTest::CalcExtWinAggFuncTest(), CalcInstFactoryTest::CalcInstFactoryTest(), CalcMiscTest::CalcMiscTest(), main(), and CalcExecStream::prepare().
00036 { 00037 // Warning: Not thread safe 00038 if (_instance) { 00039 return _instance; 00040 } 00041 00042 _instance = new CalcInit; 00043 00044 InstructionFactory::registerInstructions(); 00045 00046 ExtStringRegister(InstructionFactory::getExtendedInstructionTable()); 00047 ExtMathRegister(InstructionFactory::getExtendedInstructionTable()); 00048 ExtDateTimeRegister(InstructionFactory::getExtendedInstructionTable()); 00049 ExtRegExpRegister(InstructionFactory::getExtendedInstructionTable()); 00050 ExtCastRegister(InstructionFactory::getExtendedInstructionTable()); 00051 ExtDynamicVariableRegister( 00052 InstructionFactory::getExtendedInstructionTable()); 00053 ExtWinAggFuncRegister(InstructionFactory::getExtendedInstructionTable()); 00054 00055 // Add new init calls here 00056 00057 return _instance; 00058 }
FENNEL_BEGIN_NAMESPACE CalcInit * CalcInit::_instance [static, private] |