ReactOS 0.4.16-dev-329-g9223134
hhp_pair Class Reference

#include <hhp_reader.h>

Public Member Functions

 hhp_pair (string key, bool has_default_value=false, string default_value="")
 
void set_value (string value)
 
string get_value ()
 
string get_key ()
 

Private Attributes

string key
 
bool value_has_been_set
 
string value
 
bool has_default_value
 
string default_value
 

Detailed Description

Definition at line 40 of file hhp_reader.h.

Constructor & Destructor Documentation

◆ hhp_pair()

hhp_pair::hhp_pair ( string  key,
bool  has_default_value = false,
string  default_value = "" 
)

Definition at line 41 of file hhp_reader.cpp.

42{
43 this->key = key;
45 this->default_value = default_value;
46 value_has_been_set = false;
47}
bool has_default_value
Definition: hhp_reader.h:46
bool value_has_been_set
Definition: hhp_reader.h:44
string default_value
Definition: hhp_reader.h:47
string key
Definition: hhp_reader.h:43

Member Function Documentation

◆ get_key()

string hhp_pair::get_key ( )

Definition at line 68 of file hhp_reader.cpp.

69{
70 return key;
71}

◆ get_value()

string hhp_pair::get_value ( )

Definition at line 55 of file hhp_reader.cpp.

56{
58 return value;
59 else
60 {
62 return default_value;
63 else
64 throw domain_error("pair '" + key + "' does not have a default value");
65 }
66}
string value
Definition: hhp_reader.h:45
Definition: copy.c:22

◆ set_value()

void hhp_pair::set_value ( string  value)

Definition at line 49 of file hhp_reader.cpp.

50{
51 this->value = value;
52 value_has_been_set = true;
53}

Member Data Documentation

◆ default_value

string hhp_pair::default_value
private

Definition at line 47 of file hhp_reader.h.

Referenced by get_value(), and hhp_pair().

◆ has_default_value

bool hhp_pair::has_default_value
private

Definition at line 46 of file hhp_reader.h.

Referenced by get_value(), and hhp_pair().

◆ key

string hhp_pair::key
private

Definition at line 43 of file hhp_reader.h.

Referenced by get_key(), and hhp_pair().

◆ value

string hhp_pair::value
private

Definition at line 45 of file hhp_reader.h.

Referenced by get_value(), and set_value().

◆ value_has_been_set

bool hhp_pair::value_has_been_set
private

Definition at line 44 of file hhp_reader.h.

Referenced by get_value(), hhp_pair(), and set_value().


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