- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# sbuild::format_detail Class Reference

Format names and values for output. More...

`#include <sbuild-format-detail.h>`

Collaboration diagram for sbuild::format_detail:

[legend]
List of all members.

## Public Member Functions
| format_detail (const std::string &title, std::locale locale)
| The constructor.
virtual | ~format_detail ()
format_detail & | add (std::string const &name, std::string const &value)
| Add a name-value pair (string specialisation).
format_detail & | add (std::string const &name, bool value)
| Add a name-value pair (bool specialisation).
format_detail & | add (std::string const &name, string_list const &value)
| Add a name-value pair (string_list specialisation).
template<typename T>
format_detail & | add (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_type > | list_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.

## Member Typedef Documentation

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

List of name and value pairs.

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

Name and value pairs.

## 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.

format_detail::~format_detail | ( |  | ) | `[virtual]`

## Member Function Documentation

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.

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.

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.

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.

Here is the caller 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.

## 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.

## Member Data Documentation

list_type sbuild::format_detail::items`[private]`

The items to format;.

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

The locale to use for output.

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

The title of the items to format.

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

- sbuild/sbuild-format-detail.h
- sbuild/sbuild-format-detail.cc