diff options
Diffstat (limited to 'lib/data.h')
| -rw-r--r-- | lib/data.h | 32 |
1 files changed, 32 insertions, 0 deletions
| diff --git a/lib/data.h b/lib/data.h index 0d599c4..b8b12b9 100644 --- a/lib/data.h +++ b/lib/data.h | |||
| @@ -343,6 +343,38 @@ namespace verbly { | |||
| 343 | }; | 343 | }; |
| 344 | }; | 344 | }; |
| 345 | 345 | ||
| 346 | class binding { | ||
| 347 | public: | ||
| 348 | enum class type { | ||
| 349 | integer, | ||
| 350 | string | ||
| 351 | }; | ||
| 352 | |||
| 353 | type get_type() const; | ||
| 354 | binding(const binding& other); | ||
| 355 | ~binding(); | ||
| 356 | binding& operator=(const binding& other); | ||
| 357 | |||
| 358 | // Integer | ||
| 359 | binding(int _arg); | ||
| 360 | int get_integer() const; | ||
| 361 | void set_integer(int _arg); | ||
| 362 | binding& operator=(int _arg); | ||
| 363 | |||
| 364 | // String | ||
| 365 | binding(std::string _arg); | ||
| 366 | std::string get_string() const; | ||
| 367 | void set_string(std::string _arg); | ||
| 368 | binding& operator=(std::string _arg); | ||
| 369 | |||
| 370 | private: | ||
| 371 | union { | ||
| 372 | int _integer; | ||
| 373 | std::string _string; | ||
| 374 | }; | ||
| 375 | type _type; | ||
| 376 | }; | ||
| 377 | |||
| 346 | }; | 378 | }; |
| 347 | 379 | ||
| 348 | #endif /* end of include guard: DATA_H_C4AEC3DD */ | 380 | #endif /* end of include guard: DATA_H_C4AEC3DD */ |
