libzypp
13.10.6
|
Collect and serialize a set of ResObject. More...
#include <SysContent.h>
Classes | |
class | Impl |
Public Types | |
typedef StorageT::value_type | value_type |
typedef StorageT::size_type | size_type |
typedef StorageT::iterator | iterator |
typedef StorageT::const_iterator | const_iterator |
Public Member Functions | |
Writer () | |
Default Ctor. More... | |
std::ostream & | writeXml (std::ostream &str) const |
Write collected data as XML. More... | |
Identification. | |
User provided optional data to identify the collection. | |
const std::string & | name () const |
Get name. More... | |
Writer & | name (const std::string &val_r) |
Set name. More... | |
const Edition & | edition () const |
Get edition. More... | |
Writer & | edition (const Edition &val_r) |
Set edition. More... | |
const std::string & | description () const |
Get description. More... | |
Writer & | description (const std::string &val_r) |
Set description. More... | |
Collecting data. | |
* syscontent::Writer contentW;
* contentW.name( "mycollection" )
* .edition( Edition( "1.0" ) )
* .description( "All the cool stuff..." );
*
* ResPool pool( getZYpp()->pool() );
* for_each( pool.begin(), pool.end(),
* bind( &syscontent::Writer::addIf, ref(contentW), _1 ) );
*
* std::ofstream my_file( "some_file" );
* my_file << contentW;
* my_file.close();
*
| |
void | addInstalled (const PoolItem &obj_r) |
Collect currently installed PoolItem. More... | |
void | addIf (const PoolItem &obj_r) |
Collect PoolItem if it stays on the system. More... | |
void | add (const ResObject::constPtr &obj_r) |
Unconditionally add this ResObject (or PoolItem). More... | |
Collected data. | |
bool | empty () const |
Whether no data collected so far. More... | |
size_type | size () const |
Number of items collected. More... | |
const_iterator | begin () const |
Iterator to the begin of collected data. More... | |
const_iterator | end () const |
Iterator to the end of collected data. More... | |
Private Types | |
typedef std::set < ResObject::constPtr > | StorageT |
Private Attributes | |
RWCOW_pointer< Impl > | _pimpl |
Related Functions | |
(Note that these are not member functions.) | |
std::ostream & | operator<< (std::ostream &str, const Writer &obj) |
Collect and serialize a set of ResObject.
Definition at line 55 of file SysContent.h.
|
private |
Definition at line 57 of file SysContent.h.
typedef StorageT::value_type zypp::syscontent::Writer::value_type |
Definition at line 59 of file SysContent.h.
typedef StorageT::size_type zypp::syscontent::Writer::size_type |
Definition at line 60 of file SysContent.h.
typedef StorageT::iterator zypp::syscontent::Writer::iterator |
Definition at line 61 of file SysContent.h.
typedef StorageT::const_iterator zypp::syscontent::Writer::const_iterator |
Definition at line 62 of file SysContent.h.
zypp::syscontent::Writer::Writer | ( | ) |
Default Ctor.
Definition at line 134 of file SysContent.cc.
const std::string & zypp::syscontent::Writer::name | ( | ) | const |
Get name.
Definition at line 138 of file SysContent.cc.
Writer & zypp::syscontent::Writer::name | ( | const std::string & | val_r | ) |
Set name.
Definition at line 141 of file SysContent.cc.
const Edition & zypp::syscontent::Writer::edition | ( | ) | const |
Get edition.
Definition at line 144 of file SysContent.cc.
Set edition.
Definition at line 147 of file SysContent.cc.
const std::string & zypp::syscontent::Writer::description | ( | ) | const |
Get description.
Definition at line 150 of file SysContent.cc.
Writer & zypp::syscontent::Writer::description | ( | const std::string & | val_r | ) |
Set description.
Definition at line 153 of file SysContent.cc.
void zypp::syscontent::Writer::addInstalled | ( | const PoolItem & | obj_r | ) |
Collect currently installed PoolItem.
Definition at line 156 of file SysContent.cc.
void zypp::syscontent::Writer::addIf | ( | const PoolItem & | obj_r | ) |
Collect PoolItem if it stays on the system.
I.e. it stays installed or is tagged to be installed. Solver selected items are omitted.
Definition at line 164 of file SysContent.cc.
void zypp::syscontent::Writer::add | ( | const ResObject::constPtr & | obj_r | ) |
Unconditionally add this ResObject (or PoolItem).
Definition at line 173 of file SysContent.cc.
bool zypp::syscontent::Writer::empty | ( | ) | const |
Whether no data collected so far.
Definition at line 176 of file SysContent.cc.
Writer::size_type zypp::syscontent::Writer::size | ( | ) | const |
Number of items collected.
Definition at line 179 of file SysContent.cc.
Writer::const_iterator zypp::syscontent::Writer::begin | ( | ) | const |
Iterator to the begin of collected data.
Definition at line 182 of file SysContent.cc.
Writer::const_iterator zypp::syscontent::Writer::end | ( | ) | const |
Iterator to the end of collected data.
Definition at line 185 of file SysContent.cc.
std::ostream & zypp::syscontent::Writer::writeXml | ( | std::ostream & | str | ) | const |
Write collected data as XML.
Read them back using Reader.
Definition at line 188 of file SysContent.cc.
|
related |
Stream output
Definition at line 152 of file SysContent.h.
|
private |
Definition at line 146 of file SysContent.h.