LibPkg
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
pkg::binary_control Class Reference

A class to represent the content of a RiscPkg binary control file. More...

#include <binary_control.h>

Inheritance diagram for pkg::binary_control:
pkg::control

Public Member Functions

 binary_control ()
 Construct binary control file. More...
 
virtual ~binary_control ()
 Destroy binary control file. More...
 
std::string environment_id () const
 
const pkg_envpackage_env () const
 
int install_priority () const
 Get package install priority or use environment default install priority if 0 or unset. More...
 
- Public Member Functions inherited from pkg::control
 control ()
 Construct control file. More...
 
virtual ~control ()
 Destroy control file. More...
 
const_iterator begin () const
 Get constant iterator for beginning of control file. More...
 
const_iterator end () const
 Get constant iterator for end of control file. More...
 
const_iterator find (key_type key) const
 Find constant iterator for key. More...
 
iterator begin ()
 Get iterator for beginning of control file. More...
 
iterator end ()
 Get iterator for end of control file. More...
 
iterator find (key_type key)
 Find iterator for key. More...
 
mapped_typeoperator[] (key_type key)
 Get value corresponding to given key. More...
 
void clear ()
 Clear control file. More...
 
unsigned int size ()
 Get number of fields. More...
 
string pkgname () const
 Get package name. More...
 
string version () const
 Get package version. More...
 
string standards_version () const
 Get standard-version. More...
 
string description () const
 Get description. More...
 
string short_description () const
 Get short description. More...
 
string depends () const
 Get dependencies. More...
 
string recommends () const
 Get recommendations. More...
 
string suggests () const
 Get suggestions. More...
 
string conflicts () const
 Get conflicts. More...
 
string url () const
 Get download URL. More...
 
string components () const
 Get components. More...
 
string environment () const
 Get environment. More...
 
string osdepends () const
 Get OS dependencies. More...
 

Protected Member Functions

virtual int priority (const string &value) const
 Get priority. More...
 

Protected Attributes

pkg_env_environment
 
int _install_priority
 

Additional Inherited Members

- Public Types inherited from pkg::control
typedef string mapped_type
 The mapped type. More...
 
typedef std::pair< const key_type, mapped_typevalue_type
 The value type. More...
 
typedef std::map< key_type, mapped_type >::iterator iterator
 The iterator type. More...
 
typedef std::map< key_type, mapped_type >::const_iterator const_iterator
 The constant iterator type. More...
 

Detailed Description

A class to represent the content of a RiscPkg binary control file.

Behaviour is that of a map<string,string>, except that:

The sort order is subject to change without notice. This should not break anything, because nothing should depend on the sort order.

Constructor & Destructor Documentation

◆ binary_control()

pkg::binary_control::binary_control ( )

Construct binary control file.

◆ ~binary_control()

pkg::binary_control::~binary_control ( )
virtual

Destroy binary control file.

Member Function Documentation

◆ environment_id()

std::string pkg::binary_control::environment_id ( ) const

◆ package_env()

const pkg_env * pkg::binary_control::package_env ( ) const

◆ install_priority()

int pkg::binary_control::install_priority ( ) const

Get package install priority or use environment default install priority if 0 or unset.

Returns
the install priority used to choose the most appropriate package for an environment.

References _install_priority, pkg::pkg_env::default_install_priority(), pkg::control::end(), pkg::control::find(), and package_env().

Referenced by pkg::env_packages_table::operator[]().

◆ priority()

int pkg::binary_control::priority ( const string &  value) const
protectedvirtual

Get priority.

This function may be overridden to modify the sort order. By default, all keys have a priority of 0. The key with the most negative priority is output first.

The returned priority must be consistent for any given key (otherwise data is likely to be lost).

Parameters
valuethe string to be used as a key (converted to lower case)
Returns
the priority

Reimplemented from pkg::control.

Member Data Documentation

◆ _environment

pkg_env* pkg::binary_control::_environment
mutableprotected

Referenced by package_env().

◆ _install_priority

int pkg::binary_control::_install_priority
mutableprotected

Referenced by install_priority().


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

Reference Manual LibPkg Version 0.6.1 (28 Jan 2015)