Public Types | Public Member Functions | Static Public Attributes | List of all members
zorba::internal::diagnostic::parameters Class Reference

#include <zorba/internal/diagnostic.h>

Collaboration diagram for zorba::internal::diagnostic::parameters:
Collaboration graph
[legend]

Public Types

typedef params_type::size_type size_type
 
typedef params_type::value_type value_type
 

Public Member Functions

template<typename T >
parametersoperator, (T const &t)
 Adds the string representation of the given object as the next parameter. More...
 
value_type const & operator[] (size_type i) const
 Gets the i'th parameter value. More...
 
 parameters ()
 Constructs a parameters object. More...
 
void substitute (value_type *s) const
 Substitutes substrings of the given string. More...
 

Static Public Attributes

static parameters const empty
 A empty instance for convenience. More...
 

Detailed Description

Definition at line 213 of file internal/diagnostic.h.

Member Typedef Documentation

Definition at line 217 of file internal/diagnostic.h.

typedef params_type::value_type zorba::internal::diagnostic::parameters::value_type

Definition at line 216 of file internal/diagnostic.h.

Constructor & Destructor Documentation

zorba::internal::diagnostic::parameters::parameters ( )

Constructs a parameters object.

Member Function Documentation

template<typename T >
parameters& zorba::internal::diagnostic::parameters::operator, ( T const &  t)
inline

Adds the string representation of the given object as the next parameter.

Template Parameters
TThe object type.
Parameters
tThe object.
Returns
Returns *this.

Definition at line 237 of file internal/diagnostic.h.

References zorba::internal::ztd::to_string().

value_type const& zorba::internal::diagnostic::parameters::operator[] ( size_type  i) const
inline

Gets the i'th parameter value.

Parameter numbers start at 1.

Parameters
iThe parameter to get.
Returns
Returns said parameter value.

Definition at line 249 of file internal/diagnostic.h.

void zorba::internal::diagnostic::parameters::substitute ( value_type s) const

Substitutes substrings of the given string.

There are two forms:

  • $i
  • ${chars i chars}

where i is an integer in the range [1,9] and chars are any characters except [1-9}].

The second form elides the addition characacters if the value of the ith parameter is empty. For example, ${"1"} will substitute the value of the 1st parameter quoted if non-empty; if empty, the entire substitution set of characters (everything from the $ to the }) will be elided.

Parameters
sThe string to perform the substitutions on.

Member Data Documentation

parameters const zorba::internal::diagnostic::parameters::empty
static

A empty instance for convenience.

Definition at line 222 of file internal/diagnostic.h.


The documentation for this class was generated from the following file:
blog comments powered by Disqus