sbuild::format_detail Class Reference

Format names and values for output. More...

#include <sbuild-format-detail.h>

Collaboration diagram for sbuild::format_detail:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 format_detail (const std::string &title, std::locale locale)
 The constructor.
virtual ~format_detail ()
format_detailadd (std::string const &name, std::string const &value)
 Add a name-value pair (string specialisation).
format_detailadd (std::string const &name, bool value)
 Add a name-value pair (bool specialisation).
format_detailadd (std::string const &name, string_list const &value)
 Add a name-value pair (string_list specialisation).
template<typename T>
format_detailadd (std::string const &name, T const &value)
 Add a name-value pair.

Private Types

typedef std::pair< std::string,
std::string > 
value_type
 Name and value pairs.
typedef std::vector< value_typelist_type
 List of name and value pairs.

Private Member Functions

std::string get_title () const
 Get the title of the chroot.

Private Attributes

std::string title
 The title of the items to format.
std::locale locale
 The locale to use for output.
list_type items
 The items to format;.

Friends

template<class charT, class traits>
std::basic_ostream< charT,
traits > & 
operator<< (std::basic_ostream< charT, traits > &stream, format_detail const &rhs)
 Output the format_detail to an ostream.

Detailed Description

Format names and values for output.

Definition at line 39 of file sbuild-format-detail.h.


Member Typedef Documentation

typedef std::pair<std::string,std::string> sbuild::format_detail::value_type [private]

Name and value pairs.

Definition at line 166 of file sbuild-format-detail.h.

typedef std::vector<value_type> sbuild::format_detail::list_type [private]

List of name and value pairs.

Definition at line 168 of file sbuild-format-detail.h.


Constructor & Destructor Documentation

format_detail::format_detail ( const std::string &  title,
std::locale  locale 
)

The constructor.

Parameters:
title the title of the set of name and value pairs.
locale the locale to use for formatting the values.

Definition at line 30 of file sbuild-format-detail.cc.

format_detail::~format_detail (  )  [virtual]

Definition at line 38 of file sbuild-format-detail.cc.


Member Function Documentation

format_detail & format_detail::add ( std::string const &  name,
std::string const &  value 
)

Add a name-value pair (string specialisation).

Parameters:
name the name.
value the string value.
Returns:
a reference to the format_detail object.

Definition at line 43 of file sbuild-format-detail.cc.

References sbuild::DEBUG_INFO, sbuild::DEBUG_WARNING, items, and sbuild::log_debug().

Referenced by add(), sbuild::chroot::get_details(), sbuild::chroot_source::get_details(), sbuild::chroot_lvm_snapshot::get_details(), sbuild::chroot_file::get_details(), and sbuild::chroot_block_device::get_details().

Here is the call graph for this function:

Here is the caller graph for this function:

format_detail & format_detail::add ( std::string const &  name,
bool  value 
)

Add a name-value pair (bool specialisation).

Parameters:
name the name.
value the bool value.
Returns:
a reference to the format_detail object.

Definition at line 68 of file sbuild-format-detail.cc.

References _, and add().

Here is the call graph for this function:

format_detail & format_detail::add ( std::string const &  name,
string_list const &  value 
)

Add a name-value pair (string_list specialisation).

Parameters:
name the name.
value the string_list value.
Returns:
a reference to the format_detail object.

Definition at line 81 of file sbuild-format-detail.cc.

References add(), and sbuild::string_list_to_string().

Here is the call graph for this function:

template<typename T>
format_detail& sbuild::format_detail::add ( std::string const &  name,
T const &  value 
) [inline]

Add a name-value pair.

Parameters:
name the name.
value the value.
Returns:
a reference to the format_detail object.

Definition at line 95 of file sbuild-format-detail.h.

References add().

Here is the call graph for this function:

std::string format_detail::get_title (  )  const [private]

Get the title of the chroot.

The title is formatted for output.

Returns:
the formatted title.

Definition at line 88 of file sbuild-format-detail.cc.

References _, and title.


Friends And Related Function Documentation

template<class charT, class traits>
std::basic_ostream<charT,traits>& operator<< ( std::basic_ostream< charT, traits > &  stream,
format_detail const &  rhs 
) [friend]

Output the format_detail to an ostream.

Parameters:
stream the stream to output to.
rhs the format_detail to output.
Returns:
the stream.

Definition at line 124 of file sbuild-format-detail.h.


Member Data Documentation

std::string sbuild::format_detail::title [private]

The title of the items to format.

Definition at line 171 of file sbuild-format-detail.h.

Referenced by get_title().

std::locale sbuild::format_detail::locale [private]

The locale to use for output.

Definition at line 173 of file sbuild-format-detail.h.

list_type sbuild::format_detail::items [private]

The items to format;.

Definition at line 175 of file sbuild-format-detail.h.

Referenced by add().


The documentation for this class was generated from the following files:
Generated on Sat Jan 27 16:14:10 2007 for schroot by  doxygen 1.5.1