version 1.8, 2002/08/29 00:27:52
|
version 1.9, 2002/09/13 21:40:42
|
|
|
// | // |
// Modified By: Yi Zhou (yi_zhou@hp.com) | // Modified By: Yi Zhou (yi_zhou@hp.com) |
// : Sushma Fernandes (sushma_fernandes@hp.com) | // : Sushma Fernandes (sushma_fernandes@hp.com) |
|
// Carol Ann Krug Graves, Hewlett-Packard Company |
|
// (carolann_graves@hp.com) |
// | // |
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
|
|
config file. | config file. |
*/ | */ |
Boolean ConfigFileHandler::updateCurrentValue ( | Boolean ConfigFileHandler::updateCurrentValue ( |
const String& name, |
const CIMName& name, |
const String& value, | const String& value, |
Boolean unset) | Boolean unset) |
{ | { |
// Remove the old property name and value from the table | // Remove the old property name and value from the table |
if (_currentConfig->table.contains(name)) |
if (_currentConfig->table.contains(name.getString())) |
{ | { |
if (!_currentConfig->table.remove(name)) |
if (!_currentConfig->table.remove(name.getString())) |
{ | { |
return false; | return false; |
} | } |
|
|
if (!unset) | if (!unset) |
{ | { |
// Store the new property name and value in to the table | // Store the new property name and value in to the table |
if (!_currentConfig->table.insert(name, value)) |
if (!_currentConfig->table.insert(name.getString(), value)) |
{ | { |
return false; | return false; |
} | } |
|
|
config file. | config file. |
*/ | */ |
Boolean ConfigFileHandler::updatePlannedValue ( | Boolean ConfigFileHandler::updatePlannedValue ( |
const String& name, |
const CIMName& name, |
const String& value, | const String& value, |
Boolean unset) | Boolean unset) |
{ | { |
// | // |
// Remove the old property name and value from the table | // Remove the old property name and value from the table |
// | // |
if (_plannedConfig->table.contains(name)) |
if (_plannedConfig->table.contains(name.getString())) |
{ | { |
if (!_plannedConfig->table.remove(name)) |
if (!_plannedConfig->table.remove(name.getString())) |
{ | { |
return false; | return false; |
} | } |
|
|
// | // |
// Store the new property name and value in to the table | // Store the new property name and value in to the table |
// | // |
if (!_plannedConfig->table.insert(name, value)) |
if (!_plannedConfig->table.insert(name.getString(), value)) |
{ | { |
return false; | return false; |
} | } |
|
|
/** | /** |
Get the current property value for the specified property name. | Get the current property value for the specified property name. |
*/ | */ |
Boolean ConfigFileHandler::getCurrentValue (const String& name, String& value) |
Boolean ConfigFileHandler::getCurrentValue (const CIMName& name, String& value) |
{ | { |
if (_currentFileExist) | if (_currentFileExist) |
{ | { |
return _currentConfig->table.lookup(name, value); |
return _currentConfig->table.lookup(name.getString(), value); |
} | } |
| |
return false; | return false; |
|
|
/** | /** |
Get the planned property value for the specified property name. | Get the planned property value for the specified property name. |
*/ | */ |
Boolean ConfigFileHandler::getPlannedValue (const String& name, String& value) |
Boolean ConfigFileHandler::getPlannedValue (const CIMName& name, String& value) |
{ | { |
if (_plannedFileExist) | if (_plannedFileExist) |
{ | { |
return _plannedConfig->table.lookup(name, value); |
return _plannedConfig->table.lookup(name.getString(), value); |
} | } |
| |
return false; | return false; |
|
|
/** | /** |
Get all current property names. | Get all current property names. |
*/ | */ |
void ConfigFileHandler::getAllCurrentPropertyNames (Array<String>& propertyNames) |
void ConfigFileHandler::getAllCurrentPropertyNames (Array<CIMName>& propertyNames) |
{ | { |
propertyNames.clear(); | propertyNames.clear(); |
| |
|
|
Get all current property names and values. | Get all current property names and values. |
*/ | */ |
void ConfigFileHandler::getAllCurrentProperties ( | void ConfigFileHandler::getAllCurrentProperties ( |
Array<String>& propertyNames, |
Array<CIMName>& propertyNames, |
Array<String>& propertyValues) | Array<String>& propertyValues) |
{ | { |
propertyNames.clear(); | propertyNames.clear(); |
|
|
Get all planned property names and values. | Get all planned property names and values. |
*/ | */ |
void ConfigFileHandler::getAllPlannedPropertyNames ( | void ConfigFileHandler::getAllPlannedPropertyNames ( |
Array<String>& propertyNames) |
Array<CIMName>& propertyNames) |
{ | { |
propertyNames.clear(); | propertyNames.clear(); |
| |
|
|
Get all planned config property names and values. | Get all planned config property names and values. |
*/ | */ |
void ConfigFileHandler::getAllPlannedProperties ( | void ConfigFileHandler::getAllPlannedProperties ( |
Array<String>& propertyNames, |
Array<CIMName>& propertyNames, |
Array<String>& propertyValues) | Array<String>& propertyValues) |
{ | { |
propertyNames.clear(); | propertyNames.clear(); |