diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-05-02 22:45:11 -0400 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2016-05-02 22:45:11 -0400 |
commit | bd398509575af0362e53ce6b805eaa210406b9fd (patch) | |
tree | e699624ca6934f591241d5dfa95a91b839ce6bc7 /lib/data.h | |
parent | 499dbc410174602a5985bd75b600fbec5cd086f1 (diff) | |
parent | 965a3206df834f846f2c560438c80a707dcee4cb (diff) | |
download | verbly-bd398509575af0362e53ce6b805eaa210406b9fd.tar.gz verbly-bd398509575af0362e53ce6b805eaa210406b9fd.tar.bz2 verbly-bd398509575af0362e53ce6b805eaa210406b9fd.zip |
Merge branch 'master' of https://github.com/hatkirby/verbly
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 */ |