MOOSE - Multiscale Object Oriented Simulation Environment
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Conv< bool > Class Template Reference

#include <Conv.h>

+ Collaboration diagram for Conv< bool >:

Static Public Member Functions

static const bool buf2val (double **buf)
 
static string rttiType ()
 
static unsigned int size (bool val)
 
static void str2val (bool &val, const string &s)
 
static void val2buf (bool val, double **buf)
 
static void val2str (string &s, bool val)
 

Detailed Description

template<>
class Conv< bool >

Definition at line 401 of file Conv.h.

Member Function Documentation

static const bool Conv< bool >::buf2val ( double **  buf)
inlinestatic

Definition at line 412 of file Conv.h.

412  {
413  bool ret = (**buf > 0.5);
414  (*buf)++;
415  return ret;
416  }
static string Conv< bool >::rttiType ( )
inlinestatic

Definition at line 436 of file Conv.h.

436  {
437  return "bool";
438  }
static unsigned int Conv< bool >::size ( bool  val)
inlinestatic

This is the size used in the serialized form.

Definition at line 407 of file Conv.h.

408  {
409  return 1;
410  }
static void Conv< bool >::str2val ( bool &  val,
const string &  s 
)
inlinestatic

Definition at line 422 of file Conv.h.

422  {
423  if ( s == "0" || s == "false" || s == "False" )
424  val = 0;
425  else
426  val = 1;
427  }
static void Conv< bool >::val2buf ( bool  val,
double **  buf 
)
inlinestatic

Definition at line 417 of file Conv.h.

417  {
418  **buf = val;
419  (*buf)++;
420  }
static void Conv< bool >::val2str ( string &  s,
bool  val 
)
inlinestatic

Definition at line 429 of file Conv.h.

429  {
430  if ( val > 0.5 )
431  s = "1";
432  else
433  s = "0";
434  }

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