LibPkg
Public Types | Public Member Functions | List of all members
pkg::source_table Class Reference

A class for holding a list of source URLs. More...

#include <source_table.h>

Inheritance diagram for pkg::source_table:
pkg::table

Public Types

typedef string value_type
 
typedef std::list< value_type >::const_iterator const_iterator
 

Public Member Functions

 source_table (const string &dpathname, const string &pathname)
 Construct source table. More...
 
virtual ~source_table ()
 Destroy source table. More...
 
const_iterator begin () const
 Get const iterator for start of table. More...
 
const_iterator end () const
 Get const iterator for end of table. More...
 
void update ()
 Re-read the default and configured sources files. More...
 
- Public Member Functions inherited from pkg::table
 table ()
 Construct table. More...
 
virtual ~table ()
 Destroy table. More...
 

Additional Inherited Members

- Protected Member Functions inherited from pkg::table
void notify ()
 Notify watchers that a change has occurred. More...
 

Detailed Description

A class for holding a list of source URLs.

The underlying sources file consists of a list of source URLs, one per line. Trailing spaces are ignored, as are blank lines. Comments are introduced by a hash character.

The order of the list is significant and is preserved. Sources higher in the list take precedence over those further down.

Member Typedef Documentation

◆ value_type

◆ const_iterator

Constructor & Destructor Documentation

◆ source_table()

pkg::source_table::source_table ( const string &  dpathname,
const string &  pathname 
)

Construct source table.

Parameters
dpathnamethe pathname of the default sources file
pathnamethe pathname of the configured sources file

References update().

◆ ~source_table()

pkg::source_table::~source_table ( )
virtual

Destroy source table.

Member Function Documentation

◆ begin()

const_iterator pkg::source_table::begin ( ) const
inline

Get const iterator for start of table.

Returns
the const iterator

Referenced by pkg::update::poll().

◆ end()

const_iterator pkg::source_table::end ( ) const
inline

Get const iterator for end of table.

Returns
the const iterator

References update().

Referenced by pkg::update::poll().

◆ update()

void pkg::source_table::update ( )

Re-read the default and configured sources files.

References pkg::table::notify().

Referenced by end(), pkg::update::poll(), and source_table().


The documentation for this class was generated from the following files:

Reference Manual LibPkg Version 0.6.1 (28 Jan 2015)