ReactOS  0.4.15-dev-4923-g379188a
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;
46  value_has_been_set = false;
47 }
string default_value
Definition: hhp_reader.h:47
string key
Definition: hhp_reader.h:43
bool has_default_value
Definition: hhp_reader.h:46
bool value_has_been_set
Definition: hhp_reader.h:44
Definition: copy.c:22

Member Function Documentation

◆ get_key()

string hhp_pair::get_key ( )

Definition at line 68 of file hhp_reader.cpp.

69 {
70  return key;
71 }
string key
Definition: hhp_reader.h:43

◆ 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
string default_value
Definition: hhp_reader.h:47
bool has_default_value
Definition: hhp_reader.h:46
bool value_has_been_set
Definition: hhp_reader.h:44
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 }
Definition: pdh_main.c:93
string value
Definition: hhp_reader.h:45
bool value_has_been_set
Definition: hhp_reader.h:44

Member Data Documentation

◆ default_value

string hhp_pair::default_value
private

Definition at line 47 of file hhp_reader.h.

◆ has_default_value

bool hhp_pair::has_default_value
private

Definition at line 46 of file hhp_reader.h.

◆ key

string hhp_pair::key
private

Definition at line 43 of file hhp_reader.h.

◆ value

string hhp_pair::value
private

Definition at line 45 of file hhp_reader.h.

◆ value_has_been_set

bool hhp_pair::value_has_been_set
private

Definition at line 44 of file hhp_reader.h.


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