Public Member Functions | List of all members
G::StringMapReader Class Reference

An adaptor for reading a const StringMap with at(). More...

#include <gstrings.h>

Public Member Functions

 StringMapReader (const StringMap &map_)
 Implicit constructor. More...
 
const std::string & at (const std::string &key) const
 Returns the value, or throws. More...
 
const std::string & at (const std::string &key, const std::string &default_) const
 Returns the value, or the default. More...
 
Strings keys (unsigned int limit=0U, const char *elipsis=NULL) const
 Returns a list of keys (optionally up to some limit). More...
 

Detailed Description

An adaptor for reading a const StringMap with at().

Definition at line 62 of file gstrings.h.

Constructor & Destructor Documentation

G::StringMapReader::StringMapReader ( const StringMap map_)

Implicit constructor.

Definition at line 29 of file gstrings.cpp.

Member Function Documentation

const std::string & G::StringMapReader::at ( const std::string &  key) const

Returns the value, or throws.

Definition at line 34 of file gstrings.cpp.

References G::Str::join().

const std::string & G::StringMapReader::at ( const std::string &  key,
const std::string &  default_ 
) const

Returns the value, or the default.

Definition at line 42 of file gstrings.cpp.

G::Strings G::StringMapReader::keys ( unsigned int  limit = 0U,
const char *  elipsis = NULL 
) const

Returns a list of keys (optionally up to some limit).

Definition at line 48 of file gstrings.cpp.


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