/** Method to initialize the options */ bool Initialize(const Journalist& jnlst, const OptionsList& options, const std::string& prefix) { jnlst_ = &jnlst; return InitializeImpl(options, prefix); }
void SQLiteDb::Initialize(const wchar_t* DbName, bool Local) { strName = DbName; init_status = 0; if (!InitializeImpl(DbName, Local)) { Close(); ++init_status; if (!apiMoveFileEx(strPath, strPath+L".bad", MOVEFILE_REPLACE_EXISTING) || !InitializeImpl(DbName, Local)) { Close(); ++init_status; InitializeImpl(L":memory:", Local); } } }
/** Reduced version of the Initialize method, which does not * require special Ipopt information. This is useful for * algorithm objects that could be used outside Ipopt, such as * linear solvers. */ bool ReducedInitialize(const Journalist& jnlst, const OptionsList& options, const std::string& prefix) { initialize_called_ = true; // Copy the pointers for the problem defining objects jnlst_ = &jnlst; ip_nlp_ = NULL; ip_data_ = NULL; ip_cq_ = NULL; bool retval = InitializeImpl(options, prefix); if (!retval) { initialize_called_ = false; } return retval; }
void GameEngine::Initialize() { SDL_Init(SDL_INIT_EVERYTHING); _window = SDL_CreateWindow("Engine", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 640, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN); _graphicsObject = new GraphicsOpenGL(); _graphicsObject->Initialize(_window); //_soundManager.Initialize(); IMG_Init(IMG_INIT_JPG | IMG_INIT_PNG | IMG_INIT_TIF | IMG_INIT_WEBP); InitializeImpl(); /* Get the time at the beginning of our game loop so that we can track the * elapsed difference. */ _engineTimer.Start(); }
/** This method is called every time the algorithm starts again - * it is used to reset any internal state. The pointers to the * Journalist, as well as to the IpoptNLP, IpoptData, and * IpoptCalculatedQuantities objects should be stored in the * instanciation of this base class. This method is also used to * get all required user options from the OptionsList. Here, if * prefix is given, each tag (identifying the options) is first * looked for with the prefix in front, and if not found, without * the prefix. Note: you should not cue off of the iteration * count to indicate the "start" of an algorithm! * * Do not overload this method, since it does some general * initialization that is common for all strategy objects. * Overload the protected InitializeImpl method instead. */ bool Initialize(const Journalist& jnlst, IpoptNLP& ip_nlp, IpoptData& ip_data, IpoptCalculatedQuantities& ip_cq, const OptionsList& options, const std::string& prefix) { initialize_called_ = true; // Copy the pointers for the problem defining objects jnlst_ = &jnlst; ip_nlp_ = &ip_nlp; ip_data_ = &ip_data; ip_cq_ = &ip_cq; bool retval = InitializeImpl(options, prefix); if (!retval) { initialize_called_ = false; } return retval; }