Writes configuration data to persistence files. More...
#include <PvConfigurationWriter.h>
Public Member Functions | |
| PvConfigurationWriter () | |
| Constructor. | |
| ~PvConfigurationWriter () | |
| Destructor. | |
| PvResult | Store (PvDevice *aDevice, PvString aName=PvString("")) |
| Stores configuration from a device. More... | |
| PvResult | Store (PvStream *aStream, PvString aName=PvString("")) |
| Stores configuration from a stream. More... | |
| PvResult | Store (const PvString &aString, const PvString &aName) |
| Stores a string value. More... | |
| PvResult | Store (PvGenParameterArray *aGenParameterArray, PvString aName=PvString(""), PvStringList *aExtendedBlackList=NULL) |
| Stores configuration from a GenICam parameter array. More... | |
| PvResult | Store (PvPropertyList *aPropertyList, PvString aName=PvString("")) |
| Stores a property list. More... | |
| PvResult | Save (const PvString &aFilename) |
| Saves the configuration to a file. More... | |
| PvResult | SaveToString (PvString &aString) |
| Saves the configuration to a string. More... | |
| void | SetErrorList (PvStringList *aList, const PvString &aPrefix) |
| Sets the error list for collecting error messages during store operations. More... | |
Writes configuration data to persistence files.
Save the state of the system.
You can save:
To save your state information:
To load your state information:
Saves the configuration to a file.
Flush all stored configurations to disk.
| [in] | aFilename | Path to the output file. |
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.
| [out] | aString | String to receive the configuration data. |
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 for collecting error messages during store operations.
Sets the error list where all errors/warnings are logged.
| [in] | aList | String list to receive error messages. |
| [in] | aPrefix | Prefix to add to error messages. |
| [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. |
Stores a string value.
Store a custom string.
| [in] | aString | String value to store. |
| [in] | aName | Name/key for the stored 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). |
Stores configuration from a device.
Store a PvDevice configuration.
| [in] | aDevice | Device to store configuration from. |
| [in] | aName | Optional name for the stored 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 |
||
| ) |
Stores configuration from a GenICam parameter array.
Store a PvGenParameterArray.
| [in] | aGenParameterArray | Parameter array to store configuration from. |
| [in] | aName | Optional name for the stored configuration. |
| [in] | aExtendedBlackList | Optional list of parameter names to exclude from storage. |
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.
| [in] | aPropertyList | Property list to store. |
| [in] | aName | Optional name for the stored configuration. |
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). |
Stores configuration from a stream.
Store a PvStream configuration.
| [in] | aStream | Stream to store configuration from. |
| [in] | aName | Optional name for the stored 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-2026 Pleora Technologies Inc.
www.pleora.com