summary refs log tree commit diff stats
path: root/lib/binding.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/binding.h')
-rw-r--r--lib/binding.h82
1 files changed, 0 insertions, 82 deletions
diff --git a/lib/binding.h b/lib/binding.h deleted file mode 100644 index 5da1e71..0000000 --- a/lib/binding.h +++ /dev/null
@@ -1,82 +0,0 @@
1#ifndef BINDING_H_CAE0B18E
2#define BINDING_H_CAE0B18E
3
4#include <string>
5
6namespace verbly {
7
8 class binding {
9 public:
10 enum class type {
11 invalid,
12 integer,
13 string,
14 field
15 };
16
17 // Default constructor
18
19 binding()
20 {
21 }
22
23 // Copy and move constructors
24
25 binding(const binding& other);
26 binding(binding&& other);
27
28 // Assignment
29
30 binding& operator=(binding other);
31
32 // Swap
33
34 friend void swap(binding& first, binding& second);
35
36 // Destructor
37
38 ~binding();
39
40 // Generic accessors
41
42 type getType() const
43 {
44 return type_;
45 }
46
47 // Integer
48
49 binding(int arg);
50
51 int getInteger() const;
52
53 // String
54
55 binding(std::string arg);
56
57 std::string getString() const;
58
59 // Field
60
61 binding(std::string table, std::string column);
62
63 std::string getTable() const;
64 std::string getColumn() const;
65
66 private:
67
68 union {
69 int integer_;
70 std::string string_;
71 struct {
72 std::string table_;
73 std::string column_;
74 } field_;
75 };
76
77 type type_ = type::invalid;
78 };
79
80};
81
82#endif /* end of include guard: BINDING_H_CAE0B18E */