Dv::Props::Reference Class Reference

#include <props.h>

Collaboration diagram for Dv::Props::Reference:
Collaboration graph
[legend]

List of all members.

Public Member Functions

bool defined () const
 Reference (const std::string &key, Props &props)
 Reference (const std::string &key, const Props &props)
template<typename T >
get () const
template<typename T >
get (const T &default_value) const
std::string get (const char *default_value) const
std::string str () const
template<typename T >
 operator T () const
 operator std::string & ()
 Return a reference to the raw string content associated with a key.
 operator const std::string & () const
template<typename T >
Referenceoperator= (const T &t)
template<typename T >
Referenceoperator+= (const T &t)
template<typename T >
Referenceappend (const T &t, const std::string &separator)
Referenceerase ()

Private Attributes

std::string key_
Propsprops_

Friends

class Props
std::ostream & operator<< (std::ostream &os, const Reference &i)
template<typename T >
const Propsoperator>> (const Reference &r, T &t)

Detailed Description

Definition at line 47 of file props.h.


Constructor & Destructor Documentation

Dv::Props::Reference::Reference ( const std::string &  key,
Props props 
) [inline]

Definition at line 50 of file props.h.

Dv::Props::Reference::Reference ( const std::string &  key,
const Props props 
) [inline]

Definition at line 51 of file props.h.


Member Function Documentation

bool Dv::Props::Reference::defined (  )  const [inline]

Definition at line 49 of file props.h.

References Dv::StringMap< T >::find(), key_, and props_.

template<typename T >
T Dv::Props::Reference::get (  )  const [inline]

Definition at line 55 of file props.h.

References Dv::StringMap< T >::find(), key_, and props_.

template<typename T >
T Dv::Props::Reference::get ( const T &  default_value  )  const [inline]

Definition at line 63 of file props.h.

References Dv::StringMap< T >::find(), key_, and props_.

std::string Dv::Props::Reference::get ( const char *  default_value  )  const [inline]

Definition at line 71 of file props.h.

References Dv::StringMap< T >::find(), key_, and props_.

std::string Dv::Props::Reference::str (  )  const [inline]

Definition at line 79 of file props.h.

template<typename T >
Dv::Props::Reference::operator T (  )  const [inline]

Definition at line 82 of file props.h.

Dv::Props::Reference::operator std::string & (  )  [inline]

Return a reference to the raw string content associated with a key.

Returns:
a reference to the raw string associated with the Reference's key.
Warning:
Creates the element associated with the key, if it does not yet exist

Definition at line 89 of file props.h.

References key_, Dv::StringMap< T >::map_, and props_.

Dv::Props::Reference::operator const std::string & (  )  const [inline]

Definition at line 93 of file props.h.

References key_, Dv::StringMap< T >::map_, and props_.

template<typename T >
Reference& Dv::Props::Reference::operator= ( const T &  t  )  [inline]

Definition at line 101 of file props.h.

References Dv::tostring().

template<typename T >
Reference& Dv::Props::Reference::operator+= ( const T &  t  )  [inline]

Definition at line 104 of file props.h.

template<typename T >
Reference& Dv::Props::Reference::append ( const T &  t,
const std::string &  separator 
) [inline]

Definition at line 107 of file props.h.

References Dv::tostring().

Reference& Dv::Props::Reference::erase (  )  [inline]

Definition at line 116 of file props.h.

References erase().

Referenced by erase().


Friends And Related Function Documentation

friend class Props [friend]

Definition at line 133 of file props.h.

std::ostream& operator<< ( std::ostream &  os,
const Reference i 
) [friend]

Definition at line 119 of file props.h.

template<typename T >
const Props& operator>> ( const Reference r,
T &  t 
) [friend]

Definition at line 125 of file props.h.


Member Data Documentation

std::string Dv::Props::Reference::key_ [private]

Definition at line 131 of file props.h.

Referenced by defined(), get(), operator const std::string &(), and operator std::string &().

Definition at line 132 of file props.h.

Referenced by defined(), get(), operator const std::string &(), and operator std::string &().


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

dvutil-1.0.10 [ 5 December, 2009]