6 #ifndef LIBPKG_STATUS_TABLE 7 #define LIBPKG_STATUS_TABLE 34 std::map<key_type,mapped_type> _data;
49 const mapped_type&
operator[](
const key_type& key)
const;
55 {
return _data.begin(); }
60 const_iterator
end()
const 61 {
return _data.end(); }
67 const_iterator
find(
const key_type& key)
const;
75 void insert(
const key_type& key,
const mapped_type& value);
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_iterator begin() const
Get const iterator for start of table.
Definition: status_table.h:54
status mapped_type
Definition: status_table.h:25
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
The namespace used to hold the package management library.
Definition: auto_dir.cc:12
const mapped_type & operator[](const key_type &key) const
Get status of package.
Definition: status_table.cc:24
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
void commit()
Commit changes.
Definition: status_table.cc:57
const_iterator end() const
Get const iterator for end of table.
Definition: status_table.h:60
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
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