Confdump Agent  1.4.0
Result.hpp
Go to the documentation of this file.
00001 /* 
00002  * Confdump-Agent - Dump static and runtime system configuration
00003  * Copyright (C) 2009-2012  Straton IT, SAS
00004  * 
00005  * This program is free software: you can redistribute it and/or modify
00006  * it under the terms of the GNU General Public License version 3 as
00007  * published by the Free Software Foundation.
00008  * 
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  * 
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016  */
00017 
00018 #ifndef INCLUDED_RESULT_HPP
00019 #define INCLUDED_RESULT_HPP
00020 
00021 #include <vector>
00022 #include <set>
00023 
00024 #include <QStringList>
00025 
00026 #include "boost/shared_ptr.hpp"
00027 
00028 namespace Confdump
00029 {
00030 
00031 namespace System
00032 {
00033 class ManagedElement;
00034 }
00035 
00043 class Result
00044 {
00045 public:
00046     Result();
00047     ~Result();
00048 
00050     typedef boost::shared_ptr< System::ManagedElement > Row;
00052     typedef std::vector< Row > RowSequence;
00054     typedef RowSequence::iterator iterator;
00056     typedef RowSequence::const_iterator const_iterator;
00058     typedef RowSequence::const_reference const_reference;
00060     const_iterator begin() const;
00062     const_iterator end() const;
00064     void addRow( Row row );
00066     void push_back( Row row ) { addRow( row ); }
00067 
00073     QStringList propertyNames() const;
00074 
00089     QList<QVariant> propertyValues( Row row ) const;
00090 
00091 private:
00092     RowSequence rows_;
00093     std::set<QString> properties_;
00094 };
00095 
00096 }
00097 
00098 #endif /* INCLUDED_RESULT_HPP */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends