gogoc-config/src/config.cc
bool Config::OverrideConfiguration( const string& aFileName )
{
  assert( m_pParser != NULL );
  
  // Check if we're overriding with the same data from the same file.
  if( aFileName == m_sConfigFile )
  {
    throw GOGOC_UIS__CFG_CANNOTOVERRIDESAMECONTENTS;
  }

  // If access mode is READ only, we're not suposed to be overriding 
  // configuration data.
  if( m_eAccessMode == AM_READ )
  {
    throw GOGOC_UIS__CFG_CANNOTOVERRIDEWHENREAD;
  }

  // Override the configuration data with the one from the specified file.
  // and apply the configuration to the config file.
  return m_pParser->ReadConfigurationData( aFileName ) &&
         m_pParser->WriteConfigurationData( m_sConfigFile );  
}
// --------------------------------------------------------------------------
// Function : OverrideConfiguration
//
// Description:
//   Will override the current configuration data with the one from the 
//   specified file. Then, the new configuration data will be written to the 
//   current configuration file, thus completing the operation.
//
// Arguments: 
//   aFileName: string [IN], The alternate configuration file to load, which
//              will override the current configuration.
//
// Return values:
//   true if the current configuration data has been overriden by the data 
//   found in aFileName.
//
// Exceptions:
//   - When the specified file is the same as the configuration file.
//   - When access mode is READ only.
//   - See Parser::ReadConfigurationData()
//   - See Parser::WriteConfigurationData()
//
// --------------------------------------------------------------------------
Function : OverrideConfiguration
Description:
Will override the current configuration data with the one from the
specified file. Then, the new configuration data will be written to the
current configuration file, thus completing the operation.

string [IN], The alternate configuration file to load, which
will override the current configuration.

Return values:
true if the current configuration data has been overriden by the data
found in aFileName.

When the specified file is the same as the configuration file.
When access mode is READ only.
Function : OverrideConfiguration Description : Will override the current configuration data with the one from the specified file . Then the new configuration data will be written to the current configuration file thus completing the operation . string [ IN ] The alternate configuration file to load which will override the current configuration . Return values : true if the current configuration data has been overriden by the data found in aFileName . When the specified file is the same as the configuration file . When access mode is READ only .
bool Config::OverrideConfiguration( const string& aFileName )
{
  assert( m_pParser != NULL );
  if( aFileName == m_sConfigFile )
  {
    throw GOGOC_UIS__CFG_CANNOTOVERRIDESAMECONTENTS;
  }
  if( m_eAccessMode == AM_READ )
  {
    throw GOGOC_UIS__CFG_CANNOTOVERRIDEWHENREAD;
  }
  return m_pParser->ReadConfigurationData( aFileName ) &&
         m_pParser->WriteConfigurationData( m_sConfigFile );  
}
bool Config :: OverrideConfiguration ( const string & aFileName ) { assert ( m_pParser != NULL ) ; if ( aFileName == m_sConfigFile ) { throw GOGOC_UIS__CFG_CANNOTOVERRIDESAMECONTENTS ; } if ( m_eAccessMode == AM_READ ) { throw GOGOC_UIS__CFG_CANNOTOVERRIDEWHENREAD ; } return m_pParser -> ReadConfigurationData ( aFileName ) && m_pParser -> WriteConfigurationData ( m_sConfigFile ) ; }
Function : OverrideConfiguration
Description:
Will override the current configuration data with the one from the
specified file.
Function : OverrideConfiguration Description : Will override the current configuration data with the one from the specified file .
// Check if we're overriding with the same data from the same file. // If access mode is READ only, we're not suposed to be overriding  // configuration data. // Override the configuration data with the one from the specified file. // and apply the configuration to the config file.