6 #ifndef LIBPKG_STATUS_TABLE
7 #define LIBPKG_STATUS_TABLE
34 std::map<key_type,mapped_type>
_data;
55 {
return _data.begin(); }
61 {
return _data.end(); }
101 bool read(
const string& pathname);
106 public std::runtime_error
void insert(const key_type &key, const mapped_type &value)
Set status of package.
Definition: status_table.cc:36
const mapped_type & operator[](const key_type &key) const
Get status of package.
Definition: status_table.cc:24
status mapped_type
Definition: status_table.h:25
char * _data
Definition: zipfile.cc:68
virtual ~status_table()
Destroy status table.
Definition: status_table.cc:20
status_table(const string &pathname=string())
Construct status table.
Definition: status_table.cc:14
std::map< key_type, mapped_type >::const_iterator const_iterator
Definition: status_table.h:26
A class to represent the current or required status of a package.
Definition: status.h:33
const_iterator end() const
Get const iterator for end of table.
Definition: status_table.h:60
void commit()
Commit changes.
Definition: status_table.cc:57
An exception class for reporting failure to commit table.
Definition: status_table.h:105
string key_type
Definition: status_table.h:24
void clear()
Clear status of all packages.
Definition: status_table.cc:51
A class for mapping package name to package status.
Definition: status_table.h:20
void rollback()
Roll back changes.
Definition: status_table.cc:99
commit_error()
Construct commit error.
Definition: status_table.cc:125
const_iterator begin() const
Get const iterator for start of table.
Definition: status_table.h:54
const_iterator find(const key_type &key) const
Find const iterator for package.
Definition: status_table.cc:31
A base class to represent a data table.
Definition: table.h:18