company logo

IniFile :: setConfiguration - Set configuration

Usually, the first configuration element (OConfiguration) in the XML file is used as configuration element. XML configuration files allow any number of configurations, which have to be defined below the same parent XML element. In case of multiple configuration files the configuration may be selected by calling this function. When no configuration could be located, the function returns false. Otherwise, the function selects the configuration as current configuration and returns true.

Notes:

The function is supported for XML configuration files, only.

Return value:  Success ( bool  )

The value is true when the function was executed successfully. Otherwise the value is set to false.

Implementation overview

Implementation details

  1. Change configuration by name
    bool IniFile  :: setConfiguration ( odaba::String &sName )

    The function tries to locate the configuration by name. When no configuration with the name passed in sName could be located, the function returns an false.

    • sName - Name
  2. to list
  3. Change configuration by position
    bool IniFile  :: setConfiguration ( int32 iPosition )

    The function tries to locate the configuration at position iPosition. When no configuration could be located ad required position, the function returns false. The first configuration has position 0.

    • iPosition - Position in collection

      The position of an element in a collection is beginning with 0 for the first element.

  4. to list