17 #ifndef LIBPKG_STATUS_TABLE 18 #define LIBPKG_STATUS_TABLE 45 std::map<key_type,mapped_type> _data;
60 const mapped_type&
operator[](
const key_type& key)
const;
66 {
return _data.begin(); }
71 const_iterator
end()
const 72 {
return _data.end(); }
78 const_iterator
find(
const key_type& key)
const;
86 void insert(
const key_type& key,
const mapped_type& value);
112 bool read(
const string& pathname);
117 public std::runtime_error
void insert(const key_type &key, const mapped_type &value)
Set status of package.
Definition: status_table.cc:47
const_iterator begin() const
Get const iterator for start of table.
Definition: status_table.h:65
status mapped_type
Definition: status_table.h:36
virtual ~status_table()
Destroy status table.
Definition: status_table.cc:31
status_table(const string &pathname=string())
Construct status table.
Definition: status_table.cc:25
The namespace used to hold the package management library.
Definition: auto_dir.cc:23
const mapped_type & operator[](const key_type &key) const
Get status of package.
Definition: status_table.cc:35
std::map< key_type, mapped_type >::const_iterator const_iterator
Definition: status_table.h:37
A class to represent the current or required status of a package.
Definition: status.h:44
void commit()
Commit changes.
Definition: status_table.cc:68
const_iterator end() const
Get const iterator for end of table.
Definition: status_table.h:71
An exception class for reporting failure to commit table.
Definition: status_table.h:116
string key_type
Definition: status_table.h:35
void clear()
Clear status of all packages.
Definition: status_table.cc:62
A class for mapping package name to package status.
Definition: status_table.h:31
void rollback()
Roll back changes.
Definition: status_table.cc:110
const_iterator find(const key_type &key) const
Find const iterator for package.
Definition: status_table.cc:42
A base class to represent a data table.
Definition: table.h:29