#include <storage.h>
Inheritance diagram for SaX::SaXStorage:
Public Member Functions | |
void | setItem (const QString &, const QString &) |
void | addItem (const QString &, const QString &) |
void | removeItem (const QString &, const QString &) |
void | removeEntry (const QString &) |
void | setDenomination (const QString &, const QString &, const QString &) |
void | setRawItem (const QString &, const QString &, const QString &) |
void | addRawItem (const QString &, const QString &, const QString &) |
void | removeRawItem (const QString &, const QString &) |
QString | getItem (const QString &) |
bool | setID (int) |
bool | addID (int) |
bool | delID (int) |
int | getCurrentID (void) |
QDict< QString > | getTable (int) |
QDict< QString > | getCurrentTable (void) |
QDict< QString > * | getTablePointer (int) |
QDict< QString > * | getCurrentTablePointer (void) |
void | merge (QList< QDict< QString > >) |
int | getCount (bool=false) |
void | addGroup (const QString &, const QString &, const QString &) |
QDict< QDict< QString > > | getTablePointerCDB (void) |
QList< QDict< QString > > | getTablePointerCDB_DATA (const QString &) |
QList< QDict< QString > > | getTablePointerDATA (void) |
QDict< QString > | operator[] (int id) |
QString | operator[] (const QString &key) |
SaXStorage (void) | |
Protected Attributes | |
QList< QDict< QString > > | mData |
QDict< QDict< QString > > | mCDB |
int | mCurrentID |
The SaXStorage class provides all the structures and member functions to store, delete/retrieve and change configuration related information. The internal data structure is based on a list of hashes or a an hash of hashes. The standard data is stored in a dictionary list whereas the special CDB data is stored in a dictionary of dictionaries
#include <sax/sax.h> SaXStorage container; container.setItem ("Identifier","Monitor[0]"); container.setDenomination ("01","Belinea","102030"); container.setRawItem ("RawOption","opt1","val1"); container.addRawItem ("RawOption","opt2","val2"); container.removeRawItem ("RawOption","opt1"); //QDict<QString> section = container.getCurrentTable(); QDict<QString> section = container[0]; QString* data = section.take ("RawOption"); printf ("%s\n",data->ascii()); printf ("%s\n",container["RawOption"].ascii());
Definition at line 129 of file storage.h.
|
An object of this type is used to create a storage object saving all the data provided by the interfaces ISAX,SYSP,CDB,PROFILE Definition at line 27 of file storage.cpp. References mCurrentID, and mData. |
|
A method for the CDB interface only. This function will use (group) as first key and (key) as second key to store the value (value) in a two dimensional data dictionary Implements SaX::SaXStorageIF. Definition at line 447 of file storage.cpp. References mCDB. |
|
add a new data record without gaps. If the record already exists the function will return false otherwise true Implements SaX::SaXStorageIF. Definition at line 244 of file storage.cpp. References mCurrentID, and mData. Referenced by SaX::SaXManipulateDevices::addDesktopDevice(), and merge(). |
|
add a value to the current value of (key) seperated by the comma sign. If there is no data behind (key) nothing will happen Implements SaX::SaXStorageIF. Definition at line 52 of file storage.cpp. References mCurrentID, mData, and setItem(). Referenced by SaX::SaXManipulateCard::addCardOption(), and SaX::SaXManipulatePointers::addOption(). Here is the call graph for this function: ![]() |
|
set special item value used for options including a value if the key is some sort of Raw* the value behind this key is a comma separated list of key value pairs separated by a space each. This method will add such a value pair Implements SaX::SaXStorageIF. Definition at line 154 of file storage.cpp. References mCurrentID, mData, setItem(), and setRawItem(). Referenced by SaX::SaXManipulateCard::addCardOption(), and SaX::SaXManipulatePointers::addOption(). Here is the call graph for this function: ![]() |
|
remove a data record and adapt the Identifier strings to provide consistency Implements SaX::SaXStorageIF. Definition at line 264 of file storage.cpp. References mData. Referenced by SaX::SaXManipulateDevices::removeDesktopDevice(), and SaX::SaXManipulateDevices::removeInputDevice(). |
|
if noEmptyItem is set to true this method will calculate the number of non empty data records. If noEmptyItem is set to false which is the default the method will return the number of elements stored in the mData data record list Implements SaX::SaXStorageIF. Definition at line 423 of file storage.cpp. References mData. Referenced by SaX::SaXManipulateDevices::addDesktopDevice(), SaX::SaXManipulateDevices::addInputDevice(), SaX::SaXManipulateCard::getDevices(), and SaX::SaXManipulateLayout::getMultiheadMode(). |
|
return the current section ID value Implements SaX::SaXStorageIF. Definition at line 369 of file storage.cpp. References mCurrentID. |
|
return a copy of the data dictionary for the current ID Implements SaX::SaXStorageIF. Definition at line 393 of file storage.cpp. References mCurrentID, and mData. |
|
return a pointer to the data dictionary at the current ID Implements SaX::SaXStorageIF. Definition at line 413 of file storage.cpp. References mCurrentID, and mData. |
|
returns a copy of the value of key refering to the current data record Implements SaX::SaXStorageIF. Definition at line 109 of file storage.cpp. References mCurrentID, mData, and operator[](). Referenced by SaX::SaXManipulateDesktop::disable3D(), SaX::SaXManipulateDesktop::enable3D(), SaX::SaXManipulateCard::getCardModel(), SaX::SaXManipulateCard::getCardName(), SaX::SaXManipulateCard::getCards(), SaX::SaXManipulateCard::getCardVendor(), SaX::SaXManipulateCard::getHeads(), SaX::SaXManipulateDesktop::is3DCard(), operator[](), SaX::SaXManipulateCard::removeCardOption(), SaX::SaXManipulatePointers::removeOption(), and SaX::SaXManipulateTablets::removePen(). Here is the call graph for this function: ![]() |
|
return a copy of the data dictionary for the given ID (id) Implements SaX::SaXStorageIF. Definition at line 379 of file storage.cpp. References mData. Referenced by operator[](). |
|
return a pointer to the data dictionary at ID (id) Implements SaX::SaXStorageIF. Definition at line 403 of file storage.cpp. References mData. Referenced by SaX::SaXManipulateDevices::addInputDevice(). |
|
A method for the CDB interface only. Return a copy of the two dimensional CDB data dictionary Implements SaX::SaXStorageIF. Definition at line 465 of file storage.cpp. References mCDB. Referenced by SaX::SaXManipulateCard::getCardDrivers(), and SaX::SaXManipulateTablets::getTabletDrivers(). |
|
A method for the CDB interface only. Returns a pointer to the dictionary found under the key (group). The pointer is appended to a list because in most cases the return value is used as parmeter to the merge() method Implements SaX::SaXStorageIF. Definition at line 476 of file storage.cpp. References mCDB. |
|
return a pointer list of the complete data dictionary including all ISAX data records Implements SaX::SaXStorageIF. Definition at line 495 of file storage.cpp. References mData. |
|
merge the data records from the list (data) into the corresponding data records of the object. If a record does not exist it will be created Implements SaX::SaXStorageIF. Definition at line 221 of file storage.cpp. References addID(), setID(), and setItem(). Here is the call graph for this function: ![]() |
|
remove a complete entry from the data dictionary The entry is searched as key named (key) Implements SaX::SaXStorageIF. Definition at line 98 of file storage.cpp. References mCurrentID, and mData. |
|
remove the value (val) from the current value list stored behind the key (key). If the value is not found the list won't be changed Implements SaX::SaXStorageIF. Definition at line 72 of file storage.cpp. References mCurrentID, mData, and setItem(). Referenced by SaX::SaXManipulateCard::removeCardOption(), and SaX::SaXManipulatePointers::removeOption(). Here is the call graph for this function: ![]() |
|
set special item value used for options including a value if the key is some sort of Raw* the value behind this key is a comma separated list of key value pairs separated by a space each. This method will remove such a value pair Implements SaX::SaXStorageIF. Definition at line 178 of file storage.cpp. References mCurrentID, and mData. |
|
set special item value normaly used for Vendor and Name specifications. The vendor and name string is concatenated using the ";" sign Implements SaX::SaXStorageIF. Definition at line 123 of file storage.cpp. References setItem(). Here is the call graph for this function: ![]() |
|
change the current data record ID to the new ID (id) If there is no data for ID (id) an exception is throwed and the current ID won't become changed Implements SaX::SaXStorageIF. Definition at line 351 of file storage.cpp. References SaX::SaXException::errorString(), SaX::SaXException::excSetStorageIDFailed(), and mData. Referenced by merge(), and SaX::SaXManipulateDesktop::selectDesktop(). Here is the call graph for this function: ![]() |
|
set key value pairs to the current data dictionary reached via mCurrentID Implements SaX::SaXStorageIF. Definition at line 40 of file storage.cpp. References mCurrentID, and mData. Referenced by addItem(), addRawItem(), merge(), removeItem(), SaX::SaXManipulateCard::setCardOption(), setDenomination(), SaX::SaXManipulatePointers::setOption(), and setRawItem(). |
|
set special item value used for options including a value if the key is some sort of Raw* the value behind this key is a comma separated list of key value pairs separated by a space each. This method will set such a value pair Implements SaX::SaXStorageIF. Definition at line 138 of file storage.cpp. References setItem(). Referenced by addRawItem(), SaX::SaXManipulateCard::setCardOption(), and SaX::SaXManipulatePointers::setOption(). Here is the call graph for this function: ![]() |