64 typedef std::pair<const key_type,mapped_type>
value_type;
67 typedef std::map<key_type,mapped_type>::iterator
iterator;
90 std::map<key_type,mapped_type,cmp_key> _data;
102 {
return _data.begin(); }
108 {
return _data.end(); }
120 {
return _data.begin(); }
126 {
return _data.end(); }
230 virtual int priority(
const string& value)
const;
235 public std::runtime_error
key_type(const string &value)
Construct key from string.
Definition: control.cc:129
std::ostream & operator<<(std::ostream &out, const component &comp)
Write component record to output stream.
Definition: component.cc:175
std::map< key_type, mapped_type >::iterator iterator
The iterator type.
Definition: control.h:67
string components() const
Get components.
Definition: control.cc:117
string conflicts() const
Get conflicts.
Definition: control.cc:90
string recommends() const
Get recommendations.
Definition: control.cc:76
string url() const
Get download URL.
Definition: control.cc:110
string suggests() const
Get suggestions.
Definition: control.cc:83
const_iterator end() const
Get constant iterator for end of control file.
Definition: control.h:107
An exception class for reporting parse errors.
Definition: control.h:234
string pkgname() const
Get package name.
Definition: control.cc:48
iterator end()
Get iterator for end of control file.
Definition: control.h:125
The key type.
Definition: control.h:35
std::istream & operator>>(std::istream &in, component &comp)
Read component record from input stream.
Definition: component.cc:189
string description() const
Get description.
Definition: control.cc:97
virtual ~control()
Destroy control file.
Definition: control.cc:22
void clear()
Clear control file.
Definition: control.cc:43
std::pair< const key_type, mapped_type > value_type
The value type.
Definition: control.h:64
std::map< key_type, mapped_type >::const_iterator const_iterator
The constant iterator type.
Definition: control.h:70
const_iterator begin() const
Get constant iterator for beginning of control file.
Definition: control.h:101
parse_error(const char *message)
Construct parse error.
Definition: control.cc:151
A class to represent the content of a RiscPkg control file.
Definition: control.h:24
string short_description() const
Get short description.
Definition: control.cc:104
const_iterator find(key_type key) const
Find constant iterator for key.
Definition: control.cc:25
control()
Construct control file.
Definition: control.cc:19
int priority() const
Get priority.
Definition: control.h:56
string depends() const
Get dependencies.
Definition: control.cc:69
unsigned int size()
Get number of fields.
string version() const
Get package version.
Definition: control.cc:55
mapped_type & operator[](key_type key)
Get value corresponding to given key.
Definition: control.cc:37
virtual int priority(const string &value) const
Get priority.
Definition: control.cc:124
string mapped_type
The mapped type.
Definition: control.h:61
string standards_version() const
Get standard-version.
Definition: control.cc:62
iterator begin()
Get iterator for beginning of control file.
Definition: control.h:119