#include <val.h>


Definition at line 487 of file val.h.
Public Member Functions | |
| val_Bool (const string &a_name, const val_Limit a_limits, const UInt32_t a_minNumOfVal=1, const UInt64_t a_maxNumOfVal=cfg_INFINITE) | |
| virtual | ~val_Bool () |
| virtual void | Bind (bool &a_dest) |
Private Member Functions | |
| virtual void | Assign (const string &a_strVal) |
Private Attributes | |
| bool * | m_bool_p |
| log_CLASSID_m | |
| val_Bool::~val_Bool | ( | ) | [virtual] |
| void val_Bool::Bind | ( | bool & | a_dest | ) | [virtual] |
| void val_Bool::Assign | ( | const string & | a_strVal | ) | [private, virtual] |
Implements val_BasicValue.
Definition at line 302 of file val.cpp.
References ie_PARSER_ERROR, ivd_Error, m_bool_p, val_Value::m_name, and NULL.
00302 { 00303 if (m_bool_p == NULL) { 00304 return; 00305 }; 00306 00307 if (a_strVal == "true" || a_strVal == "yes" || a_strVal == "1") { 00308 *m_bool_p = true; 00309 } 00310 else if (a_strVal == "false" || a_strVal == "no" || a_strVal == "0"){ 00311 *m_bool_p = false; 00312 } 00313 else { 00314 ostringstream sstr; 00315 sstr 00316 << m_name << ": " 00317 << "Expected true, false, yes, no, 1 or 0."; 00318 00319 throw ivd_Error(ie_PARSER_ERROR, sstr.str()); 00320 } 00321 }
bool* val_Bool::m_bool_p [private] |
val_Bool::log_CLASSID_m [private] |
1.5.6