1 /**
2  * Autogenerated by Thrift for src/module.thrift
3  *
4  * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5  *  @generated @nocommit
6  */
7 #pragma once
8 
9 #include <thrift/lib/cpp2/gen/module_constants_h.h>
10 
11 #include "thrift/compiler/test/fixtures/constants/gen-cpp2/module_types.h"
12 
13 namespace cpp2 {
14 
15 struct module_constants {
16 
17   static constexpr ::std::int32_t const myInt_ = static_cast<::std::int32_t>(1337);
18 
myIntmodule_constants19   static constexpr ::std::int32_t myInt() {
20     return myInt_;
21   }
22 
23   // consider using folly::StringPiece instead of std::string whenever possible
24   // to referencing this statically allocated string constant, in order to
25   // prevent unnecessary allocations
26 
27   static constexpr char const * const name_ = "Mark Zuckerberg";
28 
namemodule_constants29   static constexpr char const * name() {
30     return name_;
31   }
32 
33   // consider using folly::StringPiece instead of std::string whenever possible
34   // to referencing this statically allocated string constant, in order to
35   // prevent unnecessary allocations
36 
37   static constexpr char const * const multi_line_string_ = R"__FBTHRIFT_STRL(This
38 is a
39 multi line string.
40 )__FBTHRIFT_STRL";
41 
multi_line_stringmodule_constants42   static constexpr char const * multi_line_string() {
43     return multi_line_string_;
44   }
45 
46   static ::std::vector<::std::map<::std::string, ::std::int32_t>> const& states();
47 
48   static constexpr double const x_ = static_cast<double>(1);
49 
xmodule_constants50   static constexpr double x() {
51     return x_;
52   }
53 
54   static constexpr double const y_ = static_cast<double>(1000000);
55 
ymodule_constants56   static constexpr double y() {
57     return y_;
58   }
59 
60   static constexpr double const z_ = static_cast<double>(1000000000);
61 
zmodule_constants62   static constexpr double z() {
63     return z_;
64   }
65 
66   static constexpr double const zeroDoubleValue_ = static_cast<double>(0);
67 
zeroDoubleValuemodule_constants68   static constexpr double zeroDoubleValue() {
69     return zeroDoubleValue_;
70   }
71 
72   static constexpr double const longDoubleValue_ = static_cast<double>(2.59961000990301e-05);
73 
longDoubleValuemodule_constants74   static constexpr double longDoubleValue() {
75     return longDoubleValue_;
76   }
77 
78   static constexpr ::cpp2::MyCompany const my_company_ =  ::cpp2::Company::FACEBOOK;
79 
my_companymodule_constants80   static constexpr ::cpp2::MyCompany my_company() {
81     return my_company_;
82   }
83 
84   // consider using folly::StringPiece instead of std::string whenever possible
85   // to referencing this statically allocated string constant, in order to
86   // prevent unnecessary allocations
87 
88   static constexpr char const * const foo_ = "foo";
89 
foomodule_constants90   static constexpr char const * foo() {
91     return foo_;
92   }
93 
94   static constexpr ::cpp2::MyIntIdentifier const bar_ = static_cast<::cpp2::MyIntIdentifier>(42);
95 
barmodule_constants96   static constexpr ::cpp2::MyIntIdentifier bar() {
97     return bar_;
98   }
99 
100   static ::cpp2::MyMapIdentifier const& mymap();
101 
102   static ::cpp2::Internship const& instagram();
103 
104   static ::cpp2::Internship const& partial_const();
105 
106   static ::std::vector<::cpp2::Range> const& kRanges();
107 
108   static ::std::vector<::cpp2::Internship> const& internList();
109 
110   static ::cpp2::struct1 const& pod_0();
111 
112   static ::cpp2::struct1 const& pod_s_0();
113 
114   static ::cpp2::struct1 const& pod_1();
115 
116   static ::cpp2::struct1 const& pod_s_1();
117 
118   static ::cpp2::struct2 const& pod_2();
119 
120   static ::cpp2::struct2 const& pod_trailing_commas();
121 
122   static ::cpp2::struct2 const& pod_s_2();
123 
124   static ::cpp2::struct3 const& pod_3();
125 
126   static ::cpp2::struct3 const& pod_s_3();
127 
128   static ::cpp2::struct4 const& pod_4();
129 
130   static ::cpp2::union1 const& u_1_1();
131 
132   static ::cpp2::union1 const& u_1_2();
133 
134   static ::cpp2::union1 const& u_1_3();
135 
136   static ::cpp2::union2 const& u_2_1();
137 
138   static ::cpp2::union2 const& u_2_2();
139 
140   static ::cpp2::union2 const& u_2_3();
141 
142   static ::cpp2::union2 const& u_2_4();
143 
144   static ::cpp2::union2 const& u_2_5();
145 
146   static ::cpp2::union2 const& u_2_6();
147 
148   // consider using folly::StringPiece instead of std::string whenever possible
149   // to referencing this statically allocated string constant, in order to
150   // prevent unnecessary allocations
151 
152   static constexpr char const * const apostrophe_ = "'";
153 
apostrophemodule_constants154   static constexpr char const * apostrophe() {
155     return apostrophe_;
156   }
157 
158   // consider using folly::StringPiece instead of std::string whenever possible
159   // to referencing this statically allocated string constant, in order to
160   // prevent unnecessary allocations
161 
162   static constexpr char const * const tripleApostrophe_ = "'''";
163 
tripleApostrophemodule_constants164   static constexpr char const * tripleApostrophe() {
165     return tripleApostrophe_;
166   }
167 
168   // consider using folly::StringPiece instead of std::string whenever possible
169   // to referencing this statically allocated string constant, in order to
170   // prevent unnecessary allocations
171 
172   static constexpr char const * const quotationMark_ = "\"";
173 
quotationMarkmodule_constants174   static constexpr char const * quotationMark() {
175     return quotationMark_;
176   }
177 
178   // consider using folly::StringPiece instead of std::string whenever possible
179   // to referencing this statically allocated string constant, in order to
180   // prevent unnecessary allocations
181 
182   static constexpr char const * const backslash_ = "\\";
183 
backslashmodule_constants184   static constexpr char const * backslash() {
185     return backslash_;
186   }
187 
188   // consider using folly::StringPiece instead of std::string whenever possible
189   // to referencing this statically allocated string constant, in order to
190   // prevent unnecessary allocations
191 
192   static constexpr char const * const escaped_a_ = "\x61";
193 
escaped_amodule_constants194   static constexpr char const * escaped_a() {
195     return escaped_a_;
196   }
197 
198   static ::std::map<::std::string, ::std::int32_t> const& char2ascii();
199 
200   static ::std::vector<::std::string> const& escaped_strings();
201 
202   static constexpr bool const false_c_ = static_cast<bool>(false);
203 
false_cmodule_constants204   static constexpr bool false_c() {
205     return false_c_;
206   }
207 
208   static constexpr bool const true_c_ = static_cast<bool>(true);
209 
true_cmodule_constants210   static constexpr bool true_c() {
211     return true_c_;
212   }
213 
214   static constexpr ::std::int8_t const zero_byte_ = static_cast<::std::int8_t>(0);
215 
zero_bytemodule_constants216   static constexpr ::std::int8_t zero_byte() {
217     return zero_byte_;
218   }
219 
220   static constexpr ::std::int16_t const zero16_ = static_cast<::std::int16_t>(0);
221 
zero16module_constants222   static constexpr ::std::int16_t zero16() {
223     return zero16_;
224   }
225 
226   static constexpr ::std::int32_t const zero32_ = static_cast<::std::int32_t>(0);
227 
zero32module_constants228   static constexpr ::std::int32_t zero32() {
229     return zero32_;
230   }
231 
232   static constexpr ::std::int64_t const zero64_ = static_cast<::std::int64_t>(0);
233 
zero64module_constants234   static constexpr ::std::int64_t zero64() {
235     return zero64_;
236   }
237 
238   static constexpr double const zero_dot_zero_ = static_cast<double>(0);
239 
zero_dot_zeromodule_constants240   static constexpr double zero_dot_zero() {
241     return zero_dot_zero_;
242   }
243 
244   // consider using folly::StringPiece instead of std::string whenever possible
245   // to referencing this statically allocated string constant, in order to
246   // prevent unnecessary allocations
247 
248   static constexpr char const * const empty_string_ = "";
249 
empty_stringmodule_constants250   static constexpr char const * empty_string() {
251     return empty_string_;
252   }
253 
254   static ::std::vector<::std::int32_t> const& empty_int_list();
255 
256   static ::std::vector<::std::string> const& empty_string_list();
257 
258   static ::std::set<::std::int32_t> const& empty_int_set();
259 
260   static ::std::set<::std::string> const& empty_string_set();
261 
262   static ::std::map<::std::int32_t, ::std::int32_t> const& empty_int_int_map();
263 
264   static ::std::map<::std::int32_t, ::std::string> const& empty_int_string_map();
265 
266   static ::std::map<::std::string, ::std::int32_t> const& empty_string_int_map();
267 
268   static ::std::map<::std::string, ::std::string> const& empty_string_string_map();
269 
270 };
271 
272 } // cpp2
273