|
4 | 4 |
|
5 | 5 | #pragma once
|
6 | 6 |
|
| 7 | +#include "_exports.h" |
7 | 8 | #include <string>
|
8 | 9 | #include <vector>
|
9 | 10 | #include <map>
|
@@ -33,152 +34,152 @@ namespace signalr
|
33 | 34 | /**
|
34 | 35 | * Create an object representing a value_type::null value.
|
35 | 36 | */
|
36 |
| - value(); |
| 37 | + SIGNALRCLIENT_API value(); |
37 | 38 |
|
38 | 39 | /**
|
39 | 40 | * Create an object representing a value_type::null value.
|
40 | 41 | */
|
41 |
| - value(std::nullptr_t); |
| 42 | + SIGNALRCLIENT_API value(std::nullptr_t); |
42 | 43 |
|
43 | 44 | /**
|
44 | 45 | * Create an object representing a default value for the given value_type.
|
45 | 46 | */
|
46 |
| - value(value_type t); |
| 47 | + SIGNALRCLIENT_API value(value_type t); |
47 | 48 |
|
48 | 49 | /**
|
49 | 50 | * Create an object representing a value_type::boolean with the given bool value.
|
50 | 51 | */
|
51 |
| - value(bool val); |
| 52 | + SIGNALRCLIENT_API value(bool val); |
52 | 53 |
|
53 | 54 | /**
|
54 | 55 | * Create an object representing a value_type::float64 with the given double value.
|
55 | 56 | */
|
56 |
| - value(double val); |
| 57 | + SIGNALRCLIENT_API value(double val); |
57 | 58 |
|
58 | 59 | /**
|
59 | 60 | * Create an object representing a value_type::string with the given string value.
|
60 | 61 | */
|
61 |
| - value(const std::string& val); |
| 62 | + SIGNALRCLIENT_API value(const std::string& val); |
62 | 63 |
|
63 | 64 | /**
|
64 | 65 | * Create an object representing a value_type::string with the given string value.
|
65 | 66 | */
|
66 |
| - value(std::string&& val); |
| 67 | + SIGNALRCLIENT_API value(std::string&& val); |
67 | 68 |
|
68 | 69 | /**
|
69 | 70 | * Create an object representing a value_type::string with the given string value.
|
70 | 71 | */
|
71 |
| - value(const char* val); |
| 72 | + SIGNALRCLIENT_API value(const char* val); |
72 | 73 |
|
73 | 74 | /**
|
74 | 75 | * Create an object representing a value_type::string with the given string value.
|
75 | 76 | */
|
76 |
| - value(const char* val, size_t length); |
| 77 | + SIGNALRCLIENT_API value(const char* val, size_t length); |
77 | 78 |
|
78 | 79 | /**
|
79 | 80 | * Create an object representing a value_type::array with the given vector of value's.
|
80 | 81 | */
|
81 |
| - value(const std::vector<value>& val); |
| 82 | + SIGNALRCLIENT_API value(const std::vector<value>& val); |
82 | 83 |
|
83 | 84 | /**
|
84 | 85 | * Create an object representing a value_type::array with the given vector of value's.
|
85 | 86 | */
|
86 |
| - value(std::vector<value>&& val); |
| 87 | + SIGNALRCLIENT_API value(std::vector<value>&& val); |
87 | 88 |
|
88 | 89 | /**
|
89 | 90 | * Create an object representing a value_type::map with the given map of string-value's.
|
90 | 91 | */
|
91 |
| - value(const std::map<std::string, value>& map); |
| 92 | + SIGNALRCLIENT_API value(const std::map<std::string, value>& map); |
92 | 93 |
|
93 | 94 | /**
|
94 | 95 | * Create an object representing a value_type::map with the given map of string-value's.
|
95 | 96 | */
|
96 |
| - value(std::map<std::string, value>&& map); |
| 97 | + SIGNALRCLIENT_API value(std::map<std::string, value>&& map); |
97 | 98 |
|
98 | 99 | /**
|
99 | 100 | * Copies an existing value.
|
100 | 101 | */
|
101 |
| - value(const value& rhs); |
| 102 | + SIGNALRCLIENT_API value(const value& rhs); |
102 | 103 |
|
103 | 104 | /**
|
104 | 105 | * Moves an existing value.
|
105 | 106 | */
|
106 |
| - value(value&& rhs) noexcept; |
| 107 | + SIGNALRCLIENT_API value(value&& rhs) noexcept; |
107 | 108 |
|
108 | 109 | /**
|
109 | 110 | * Cleans up the resources associated with the value.
|
110 | 111 | */
|
111 |
| - ~value(); |
| 112 | + SIGNALRCLIENT_API ~value(); |
112 | 113 |
|
113 | 114 | /**
|
114 | 115 | * Copies an existing value.
|
115 | 116 | */
|
116 |
| - value& operator=(const value& rhs); |
| 117 | + SIGNALRCLIENT_API value& operator=(const value& rhs); |
117 | 118 |
|
118 | 119 | /**
|
119 | 120 | * Moves an existing value.
|
120 | 121 | */
|
121 |
| - value& operator=(value&& rhs) noexcept; |
| 122 | + SIGNALRCLIENT_API value& operator=(value&& rhs) noexcept; |
122 | 123 |
|
123 | 124 | /**
|
124 | 125 | * True if the object stored is a Key-Value pair.
|
125 | 126 | */
|
126 |
| - bool is_map() const; |
| 127 | + SIGNALRCLIENT_API bool is_map() const; |
127 | 128 |
|
128 | 129 | /**
|
129 | 130 | * True if the object stored is a double.
|
130 | 131 | */
|
131 |
| - bool is_double() const; |
| 132 | + SIGNALRCLIENT_API bool is_double() const; |
132 | 133 |
|
133 | 134 | /**
|
134 | 135 | * True if the object stored is a string.
|
135 | 136 | */
|
136 |
| - bool is_string() const; |
| 137 | + SIGNALRCLIENT_API bool is_string() const; |
137 | 138 |
|
138 | 139 | /**
|
139 | 140 | * True if the object stored is empty.
|
140 | 141 | */
|
141 |
| - bool is_null() const; |
| 142 | + SIGNALRCLIENT_API bool is_null() const; |
142 | 143 |
|
143 | 144 | /**
|
144 | 145 | * True if the object stored is an array of signalr::value's.
|
145 | 146 | */
|
146 |
| - bool is_array() const; |
| 147 | + SIGNALRCLIENT_API bool is_array() const; |
147 | 148 |
|
148 | 149 | /**
|
149 | 150 | * True if the object stored is a bool.
|
150 | 151 | */
|
151 |
| - bool is_bool() const; |
| 152 | + SIGNALRCLIENT_API bool is_bool() const; |
152 | 153 |
|
153 | 154 | /**
|
154 | 155 | * Returns the stored object as a double. This will throw if the underlying object is not a signalr::type::float64.
|
155 | 156 | */
|
156 |
| - double as_double() const; |
| 157 | + SIGNALRCLIENT_API double as_double() const; |
157 | 158 |
|
158 | 159 | /**
|
159 | 160 | * Returns the stored object as a bool. This will throw if the underlying object is not a signalr::type::boolean.
|
160 | 161 | */
|
161 |
| - bool as_bool() const; |
| 162 | + SIGNALRCLIENT_API bool as_bool() const; |
162 | 163 |
|
163 | 164 | /**
|
164 | 165 | * Returns the stored object as a string. This will throw if the underlying object is not a signalr::type::string.
|
165 | 166 | */
|
166 |
| - const std::string& as_string() const; |
| 167 | + SIGNALRCLIENT_API const std::string& as_string() const; |
167 | 168 |
|
168 | 169 | /**
|
169 | 170 | * Returns the stored object as an array of signalr::value's. This will throw if the underlying object is not a signalr::type::array.
|
170 | 171 | */
|
171 |
| - const std::vector<value>& as_array() const; |
| 172 | + SIGNALRCLIENT_API const std::vector<value>& as_array() const; |
172 | 173 |
|
173 | 174 | /**
|
174 | 175 | * Returns the stored object as a map of property name to signalr::value. This will throw if the underlying object is not a signalr::type::map.
|
175 | 176 | */
|
176 |
| - const std::map<std::string, value>& as_map() const; |
| 177 | + SIGNALRCLIENT_API const std::map<std::string, value>& as_map() const; |
177 | 178 |
|
178 | 179 | /**
|
179 | 180 | * Returns the signalr::type that represents the stored object.
|
180 | 181 | */
|
181 |
| - value_type type() const; |
| 182 | + SIGNALRCLIENT_API value_type type() const; |
182 | 183 |
|
183 | 184 | private:
|
184 | 185 | value_type mType;
|
|
0 commit comments