Synesis Software STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ...

variant_bool Class Reference
[Inserters]

#include <pantheios/inserters/variant_bool.hpp>

Inheritance diagram for variant_bool:

boolean

List of all members.


Detailed Description

Class for inserting VARIANT_BOOL variables into Pantheios diagnostic logging statements.

Consider the following statement:

  char          s[] = "abc";
  std::string   str("def");
  VARIANT_BOOL  b   = VARIANT_FALSE;

  pantheios::log(pantheios::notice, "s=", s, ", b=", pantheios::variant_bool(b), ", str=", str);

This will produce the output:

    s=abc, b=false, str=def

Note:
The class provides the static method set_value_strings() for assigning user-defined strings to represent true and false values.

Construction

 variant_bool (VARIANT_BOOL value)
 Construct from a variant_bool value.

Public Types

Member Types
typedef boolean parent_class_type
typedef variant_bool class_type

Public Member Functions

Implementation
virtual pan_slice_t const * get_slice_ (bool value) const

Constructor & Destructor Documentation

variant_bool ( VARIANT_BOOL  value  )  [inline, explicit]

Construct from a variant_bool value.

Parameters:
value The variant_bool whose value will be represented as a string


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

pantheios Library documentation © Matthew Wilson & Synesis Software, 2006-2011 SourceForge.net Logo