void CFormula::SetEmptyDefaultBot() { SFunction func; ClearFormula(); CSLock lock(m_critsec); func.dirty = true; _formula_name = "NoName"; // Adding empty standard-functions // http://www.maxinmontreal.com/forums/viewtopic.php?f=156&t=16230 CheckForDefaultFormulaEntries(); }
bool CFunctionCollection::ParseAll() { CSLock lock(m_critsec); CheckForDefaultFormulaEntries(); p_formula_parser->InitNewParse(); COHScriptObject *p_oh_script_object = GetFirst(); while (p_oh_script_object != NULL) { if (p_oh_script_object->IsFunction() || p_oh_script_object->IsList()) { p_oh_script_object->Parse(); } p_oh_script_object = GetNext(); } p_formula_parser->FinishParse(); return true; }
void CFunctionCollection::SetEmptyDefaultBot() { CSLock lock(m_critsec); DeleteAll(false, true); _title = "NoName"; // Adding empty standard-functions // http://www.maxinmontreal.com/forums/viewtopic.php?f=156&t=16230 CheckForDefaultFormulaEntries(); // After setting the bot we should parse it so that OH can evaluate and act ParseAll(); // Parser, function-collection and library initialized // and a ParseAll to come: // this is the perfect place to execute the selftest. ExecuteSelftest(); }
bool CFunctionCollection::ParseAll() { write_log(preferences.debug_formula(), "[CFunctionCollection] ParseAll()\n"); CSLock lock(m_critsec); CheckForDefaultFormulaEntries(); p_formula_parser->InitNewParse(); COHScriptObject *p_oh_script_object = GetFirst(); while (p_oh_script_object != NULL) { if (p_oh_script_object->IsFunction() || p_oh_script_object->IsList()) { p_oh_script_object->Parse(); } p_oh_script_object = GetNext(); } // Finally parse the debug-tab, // that is no longer in the collection. p_debug_tab->Parse(); p_formula_parser->FinishParse(); return true; }