Save the state of the system. More...
Public Member Functions | |
PvConfigurationWriter () | |
Constructor. | |
~PvConfigurationWriter () | |
Destructor. | |
PvResult | Store (PvDevice *aDevice, PvString aName=PvString("")) |
Store a PvDevice configuration. More... | |
PvResult | Store (PvStream *aStream, PvString aName=PvString("")) |
Store a PvStream configuration. More... | |
PvResult | Store (const PvString &aString, const PvString &aName) |
Store a custom string. More... | |
PvResult | Store (PvGenParameterArray *aGenParameterArray, PvString aName=PvString(""), PvStringList *aExtendedBlackList=NULL) |
Store a PvGenParameterArray. More... | |
PvResult | Store (PvPropertyList *aPropertyList, PvString aName=PvString("")) |
Stores a property list. More... | |
PvResult | Save (const PvString &aFilename) |
Flush all stored configurations to disk. More... | |
PvResult | SaveToString (PvString &aString) |
Saves the configuration to a string. More... | |
void | SetErrorList (PvStringList *aList, const PvString &aPrefix) |
Sets the error list where all errors/warnings are logged. More... | |
Save the state of the system.
You can save:
To save your state information:
To load your state information:
Flush all stored configurations to disk.
The Save flushes writes all configurations in the PvConfigurationWriter object (using Store) to disk.
[in] | aFilename | The configuration file's filename and path. |
Saves the configuration to a string.
The Save flushes writes all configurations in the PvConfigurationWriter object (using Store) to a string.
[in] | aString | The string where the configurations are saved. |
void PvConfigurationWriter::SetErrorList | ( | PvStringList * | aList, |
const PvString & | aPrefix | ||
) |
Sets the error list where all errors/warnings are logged.
[in] | aList | A pointer to a string list. The content of the list is not reset, new errors are simply added to the list. |
[in] | aPrefix | A contextual prefix prepended to all errors as they are added to the error list. |
Store a custom string.
Can be used to persist application information other than PvDevice or PvStream status in a single configuration file.
To use this method, see Store(PvDevice *,PvString).
[in] | aString | See Store(PvDevice *,PvString), aDevice parameter. |
[in] | aName | See Store(PvDevice *,PvString). |
Store a PvDevice configuration.
The Store family of methods add a configuration to the PvConfigurationWriter object. You must call Save to flush your configurations to disk.
The Store methods use a (ConfigurationType, ConfigurationName) parameter format. The ConfigurationType is the object (PvDevice, PvStream, or PvString); the ConfigurationName is an arbitrary identifying name for the configuration.
[in] | aDevice | The configuration type; the object whose information will be stored. Other Store methods have similar behavior, but different data types (PvStream or PvString). |
[in] | aName | The configuration name; an arbitrary identifying name for this configuration (since you set it, it may differ from the value returned by methods such as PvDeviceInfo::GetUserDefinedName). |
PvResult PvConfigurationWriter::Store | ( | PvGenParameterArray * | aGenParameterArray, |
PvString | aName = PvString( "" ) , |
||
PvStringList * | aExtendedBlackList = NULL |
||
) |
Store a PvGenParameterArray.
Can be used to persist a PvGenParameterArray.
[in] | aGenParameterArray | See Store(PvDevice *,PvString), aDevice parameter. |
[in] | aName | See Store(PvDevice *,PvString). |
[in] | aExtendedBlackList | A list of parameter names to add to the parameter black list when saving. |
PvResult PvConfigurationWriter::Store | ( | PvPropertyList * | aPropertyList, |
PvString | aName = PvString( "" ) |
||
) |
Stores a property list.
Can be used to persist a property list object. A property is name/value pair.
[in] | aPropertyList | See Store(PvDevice *,PvString), aDevice parameter. |
[in] | aName | See Store(PvDevice *,PvString). |
Store a PvStream configuration.
To use this method, see Store(PvDevice *,PvString).
[in] | aStream | See Store(PvDevice *,PvString), aDevice parameter. |
[in] | aName | See Store(PvDevice *,PvString). |
Copyright (c) 2002-2021 Pleora Technologies Inc.
www.pleora.com