File tree Expand file tree Collapse file tree 4 files changed +51
-40
lines changed Expand file tree Collapse file tree 4 files changed +51
-40
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,7 @@ read_dm.o\
248248read_txt_tools.o\
249249read_txt_stru.o\
250250read_txt_input_value.o\
251+ read_txt_input_item.o\
251252read_txt_input_list.o\
252253read_txt_input_process.o\
253254read_txt_input_process_global.o\
Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ add_library(
2525 read_rho.cpp
2626 read_txt_tools.cpp
2727 read_txt_input_value.cpp
28+ read_txt_input_item.cpp
2829 read_txt_input_list.cpp
2930 read_txt_input_process.cpp
3031 read_txt_input_process_global.cpp
Original file line number Diff line number Diff line change @@ -26,46 +26,6 @@ namespace Read_Txt_Input
2626 ++this ->values_size_lower_limit ;
2727 ++this ->values_size_upper_limit ;
2828 }
29-
30- template <>
31- void Input_Item::set_value (const bool &b)
32- {
33- this ->values .push_back ({});
34- this ->values .back ().setb (b);
35- this ->values_type .push_back (" b" );
36- }
37-
38- template <>
39- void Input_Item::set_value (const int &i)
40- {
41- this ->values .push_back ({});
42- this ->values .back ().seti (i);
43- this ->values_type .push_back (" i" );
44- }
45-
46- template <>
47- void Input_Item::set_value (const double &d)
48- {
49- this ->values .push_back ({});
50- this ->values .back ().setd (d);
51- this ->values_type .push_back (" d" );
52- }
53-
54- template <>
55- void Input_Item::set_value (const std::string &s)
56- {
57- this ->values .push_back ({});
58- this ->values .back ().sets (s);
59- this ->values_type .push_back (" s" );
60- }
61-
62- template <>
63- void Input_Item::set_value (const char *const &s)
64- {
65- this ->values .push_back ({});
66- this ->values .back ().sets (std::string (s));
67- this ->values_type .push_back (" s" );
68- }
6929}
7030
7131#endif
Original file line number Diff line number Diff line change 1+ // =======================
2+ // AUTHOR : Peize Lin
3+ // DATE : 2021-12-13
4+ // =======================
5+
6+ #include " read_txt_input_item.h"
7+
8+ namespace Read_Txt_Input
9+ {
10+ template <>
11+ void Input_Item::set_value (const bool &b)
12+ {
13+ this ->values .push_back ({});
14+ this ->values .back ().setb (b);
15+ this ->values_type .push_back (" b" );
16+ }
17+
18+ template <>
19+ void Input_Item::set_value (const int &i)
20+ {
21+ this ->values .push_back ({});
22+ this ->values .back ().seti (i);
23+ this ->values_type .push_back (" i" );
24+ }
25+
26+ template <>
27+ void Input_Item::set_value (const double &d)
28+ {
29+ this ->values .push_back ({});
30+ this ->values .back ().setd (d);
31+ this ->values_type .push_back (" d" );
32+ }
33+
34+ template <>
35+ void Input_Item::set_value (const std::string &s)
36+ {
37+ this ->values .push_back ({});
38+ this ->values .back ().sets (s);
39+ this ->values_type .push_back (" s" );
40+ }
41+
42+ template <>
43+ void Input_Item::set_value (const char *const &s)
44+ {
45+ this ->values .push_back ({});
46+ this ->values .back ().sets (std::string (s));
47+ this ->values_type .push_back (" s" );
48+ }
49+ }
You can’t perform that action at this time.
0 commit comments