Confdump Agent
1.4.0
|
The result of a query (a dynamic table) More...
#include <Result.hpp>
Public Types | |
typedef boost::shared_ptr < System::ManagedElement > | Row |
The type used for rows in this container. | |
typedef std::vector< Row > | RowSequence |
A sequence of rows (mostly useful to define other types) | |
typedef RowSequence::iterator | iterator |
Iterator for this container. | |
typedef RowSequence::const_iterator | const_iterator |
Const iterator for this container. | |
typedef RowSequence::const_reference | const_reference |
Reference to the element type (support for STL algorithms) | |
Public Member Functions | |
Result () | |
~Result () | |
const_iterator | begin () const |
The first element of the sequence (STL compat) | |
const_iterator | end () const |
The past-the-end element of the sequence (STL compat) | |
void | addRow (Row row) |
Add a result row. | |
void | push_back (Row row) |
Standard alias for addRow. | |
QStringList | propertyNames () const |
A list of all properties which can be found in this Result ("table heading"). | |
QList< QVariant > | propertyValues (Row row) const |
Table row contents for a Row. | |
Private Attributes | |
RowSequence | rows_ |
std::set< QString > | properties_ |
The result of a query (a dynamic table)
A Result is a container for row (System::ManagedElement) objects, a sort of table (in database speak). As each row (System::ManagedElement) may have different fields, the table structure is dynamic and may include new "columns" (properties) after new rows are added.
Definition at line 43 of file Result.hpp.
typedef RowSequence::const_iterator Confdump::Result::const_iterator |
Const iterator for this container.
Definition at line 56 of file Result.hpp.
typedef RowSequence::const_reference Confdump::Result::const_reference |
Reference to the element type (support for STL algorithms)
Definition at line 58 of file Result.hpp.
typedef RowSequence::iterator Confdump::Result::iterator |
Iterator for this container.
Definition at line 54 of file Result.hpp.
typedef boost::shared_ptr< System::ManagedElement > Confdump::Result::Row |
The type used for rows in this container.
Definition at line 50 of file Result.hpp.
typedef std::vector< Row > Confdump::Result::RowSequence |
A sequence of rows (mostly useful to define other types)
Definition at line 52 of file Result.hpp.
Definition at line 34 of file Result.cpp.
Definition at line 38 of file Result.cpp.
void Confdump::Result::addRow | ( | Result::Row | row | ) |
Add a result row.
Definition at line 52 of file Result.cpp.
References properties_, and rows_.
Referenced by Confdump::System::WmiDumper::doQueryTable(), and push_back().
The first element of the sequence (STL compat)
Definition at line 42 of file Result.cpp.
References rows_.
Referenced by Confdump::System::WmiDumper::doComputerIdentifier().
Result::const_iterator Confdump::Result::end | ( | ) | const |
The past-the-end element of the sequence (STL compat)
Definition at line 47 of file Result.cpp.
References rows_.
Referenced by Confdump::System::WmiDumper::doComputerIdentifier().
QStringList Confdump::Result::propertyNames | ( | ) | const |
A list of all properties which can be found in this Result ("table heading").
The list is not currently sorted in any meaningful order, and this order may change when new rows are added.
Definition at line 65 of file Result.cpp.
References properties_.
Referenced by Confdump::XmlFormatter::doPrintTable(), Confdump::TextFormatter::doPrintTable(), and propertyValues().
QList< QVariant > Confdump::Result::propertyValues | ( | Result::Row | row | ) | const |
Table row contents for a Row.
This returns, the "table row contents" matching the "table heading" of propertyNames(). In other words, the row properties are returned sorted according to the current propertyNames() order.
Each "cell" is stored in a QVariant, which can theoretically hold anything allowed by the Qt library. In practice, the dumpers make it contain :
Definition at line 74 of file Result.cpp.
References propertyNames().
Referenced by Confdump::XmlFormatter::doPrintTable(), and Confdump::TextFormatter::doPrintTable().
void Confdump::Result::push_back | ( | Row | row | ) | [inline] |
Standard alias for addRow.
Definition at line 66 of file Result.hpp.
References addRow().
Referenced by Confdump::System::Linux::allBlockDevices(), Confdump::System::Linux::InitScript::allInitScripts(), Confdump::System::LinuxDumper::allNetworkInterfaces(), Confdump::System::Linux::RcdScript::allRcdScripts(), Confdump::System::Win32::ScheduledTask::allSystemInstances(), Confdump::System::Win32::BasicTcp4Socket::allSystemInstances(), Confdump::System::LinuxDumper::operatingSystem(), and Confdump::System::Linux::Uptime::uptime().
std::set<QString> Confdump::Result::properties_ [private] |
Definition at line 93 of file Result.hpp.
Referenced by addRow(), and propertyNames().
RowSequence Confdump::Result::rows_ [private] |
Definition at line 92 of file Result.hpp.