Logo Search packages:      
Sourcecode: sbnc version File versions  Download package

bool CCore::SetTagString ( const char *  Tag,
const char *  Value 


Sets the value of a global tag (as a string).

Tag the name of the tag
Value the new value

Definition at line 1832 of file Core.cpp.

References CVector< Type >::GetLength(), m_Config, m_Modules, and CConfig::WriteString().

Referenced by SetTagInteger().

      bool ReturnValue;
      char *Setting;

      if (Tag == NULL) {
            return false;

      asprintf(&Setting, "tag.%s", Tag);

      CHECK_ALLOC_RESULT(Setting, asprintf) {
            LOGERROR("asprintf() failed. Could not store global tag.");

            return false;

      for (unsigned int i = 0; i < m_Modules.GetLength(); i++) {
            m_Modules[i]->TagModified(Tag, Value);

      if (Value != NULL && Value[0] == '\0') {
            Value = NULL;

      ReturnValue = m_Config->WriteString(Setting, Value);


      return ReturnValue;

Generated by  Doxygen 1.6.0   Back to index