@@ -33,79 +33,54 @@ namespace signalr
33
33
};
34
34
35
35
/* *
36
- * Create an object representing a value_type ::null value.
36
+ * Create an object representing a value::type ::null value.
37
37
*/
38
38
SIGNALRCLIENT_API value ();
39
39
40
40
/* *
41
- * Create an object representing a value_type ::null value.
41
+ * Create an object representing a value::type ::null value.
42
42
*/
43
43
SIGNALRCLIENT_API value (std::nullptr_t );
44
44
45
45
/* *
46
- * Create an object representing a default value for the given value_type .
46
+ * Create an object representing a default value for the given value::type .
47
47
*/
48
48
SIGNALRCLIENT_API value (type t);
49
49
50
50
/* *
51
- * Create an object representing a value_type ::boolean with the given bool value.
51
+ * Create an object representing a value::type ::boolean with the given bool value.
52
52
*/
53
53
SIGNALRCLIENT_API value (bool val);
54
54
55
55
/* *
56
- * Create an object representing a value_type ::float64 with the given double value.
56
+ * Create an object representing a value::type ::float64 with the given double value.
57
57
*/
58
58
SIGNALRCLIENT_API value (double val);
59
59
60
60
/* *
61
- * Create an object representing a value_type ::string with the given string value.
61
+ * Create an object representing a value::type ::string with the given string value.
62
62
*/
63
- SIGNALRCLIENT_API value (const std::string& val);
63
+ SIGNALRCLIENT_API value (std::string val);
64
64
65
65
/* *
66
- * Create an object representing a value_type::string with the given string value.
67
- */
68
- SIGNALRCLIENT_API value (std::string&& val);
69
-
70
- /* *
71
- * Create an object representing a value_type::string with the given string value.
66
+ * Create an object representing a value::type::string with the given string value.
72
67
*/
73
68
SIGNALRCLIENT_API value (const char * val);
74
69
75
70
/* *
76
- * Create an object representing a value_type::string with the given string value.
77
- */
78
- SIGNALRCLIENT_API value (const char * val, size_t length);
79
-
80
- /* *
81
- * Create an object representing a value_type::array with the given vector of value's.
82
- */
83
- SIGNALRCLIENT_API value (const std::vector<value>& val);
84
-
85
- /* *
86
- * Create an object representing a value_type::array with the given vector of value's.
87
- */
88
- SIGNALRCLIENT_API value (std::vector<value>&& val);
89
-
90
- /* *
91
- * Create an object representing a value_type::map with the given map of string-value's.
92
- */
93
- SIGNALRCLIENT_API value (const std::map<std::string, value>& map);
94
-
95
- /* *
96
- * Create an object representing a value_type::map with the given map of string-value's.
71
+ * Create an object representing a value::type::array with the given vector of value's.
97
72
*/
98
- SIGNALRCLIENT_API value (std::map<std::string, value>&& map );
73
+ SIGNALRCLIENT_API value (std::vector< value> val );
99
74
100
75
/* *
101
- * Create an object representing a value_type::binary with the given array of byte 's.
76
+ * Create an object representing a value::type::map with the given map of string-value 's.
102
77
*/
103
- SIGNALRCLIENT_API value (const std::vector< uint8_t >& bin );
78
+ SIGNALRCLIENT_API value (std::map<std::string, value> map );
104
79
105
80
/* *
106
- * Create an object representing a value_type ::binary with the given array of byte's.
81
+ * Create an object representing a value::type ::binary with the given array of byte's.
107
82
*/
108
- SIGNALRCLIENT_API value (std::vector<uint8_t >&& bin);
83
+ SIGNALRCLIENT_API value (std::vector<uint8_t > bin);
109
84
110
85
/* *
111
86
* Copies an existing value.
@@ -120,7 +95,7 @@ namespace signalr
120
95
/* *
121
96
* Cleans up the resources associated with the value.
122
97
*/
123
- SIGNALRCLIENT_API ~value ();
98
+ SIGNALRCLIENT_API ~value () noexcept ;
124
99
125
100
/* *
126
101
* Copies an existing value.
@@ -135,70 +110,70 @@ namespace signalr
135
110
/* *
136
111
* True if the object stored is a Key-Value pair.
137
112
*/
138
- SIGNALRCLIENT_API bool is_map () const ;
113
+ SIGNALRCLIENT_API bool is_map () const noexcept ;
139
114
140
115
/* *
141
116
* True if the object stored is a double.
142
117
*/
143
- SIGNALRCLIENT_API bool is_double () const ;
118
+ SIGNALRCLIENT_API bool is_double () const noexcept ;
144
119
145
120
/* *
146
121
* True if the object stored is a string.
147
122
*/
148
- SIGNALRCLIENT_API bool is_string () const ;
123
+ SIGNALRCLIENT_API bool is_string () const noexcept ;
149
124
150
125
/* *
151
126
* True if the object stored is empty.
152
127
*/
153
- SIGNALRCLIENT_API bool is_null () const ;
128
+ SIGNALRCLIENT_API bool is_null () const noexcept ;
154
129
155
130
/* *
156
131
* True if the object stored is an array of signalr::value's.
157
132
*/
158
- SIGNALRCLIENT_API bool is_array () const ;
133
+ SIGNALRCLIENT_API bool is_array () const noexcept ;
159
134
160
135
/* *
161
136
* True if the object stored is a bool.
162
137
*/
163
- SIGNALRCLIENT_API bool is_bool () const ;
138
+ SIGNALRCLIENT_API bool is_bool () const noexcept ;
164
139
165
140
/* *
166
141
* True if the object stored is a binary blob.
167
142
*/
168
- SIGNALRCLIENT_API bool is_binary () const ;
143
+ SIGNALRCLIENT_API bool is_binary () const noexcept ;
169
144
170
145
/* *
171
- * Returns the stored object as a double. This will throw if the underlying object is not a signalr::type::float64.
146
+ * Returns the stored object as a double. This will throw if the underlying object is not a signalr::value:: type::float64.
172
147
*/
173
148
SIGNALRCLIENT_API double as_double () const ;
174
149
175
150
/* *
176
- * Returns the stored object as a bool. This will throw if the underlying object is not a signalr::type::boolean.
151
+ * Returns the stored object as a bool. This will throw if the underlying object is not a signalr::value:: type::boolean.
177
152
*/
178
153
SIGNALRCLIENT_API bool as_bool () const ;
179
154
180
155
/* *
181
- * Returns the stored object as a string. This will throw if the underlying object is not a signalr::type::string.
156
+ * Returns the stored object as a string. This will throw if the underlying object is not a signalr::value:: type::string.
182
157
*/
183
158
SIGNALRCLIENT_API const std::string& as_string () const ;
184
159
185
160
/* *
186
- * Returns the stored object as an array of signalr::value's. This will throw if the underlying object is not a signalr::type::array.
161
+ * Returns the stored object as an array of signalr::value's. This will throw if the underlying object is not a signalr::value:: type::array.
187
162
*/
188
163
SIGNALRCLIENT_API const std::vector<value>& as_array () const ;
189
164
190
165
/* *
191
- * 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.
166
+ * Returns the stored object as a map of property name to signalr::value. This will throw if the underlying object is not a signalr::value:: type::map.
192
167
*/
193
168
SIGNALRCLIENT_API const std::map<std::string, value>& as_map () const ;
194
169
195
170
/* *
196
- * Returns the stored object as an array of bytes. This will throw if the underlying object is not a signalr::type::binary.
171
+ * Returns the stored object as an array of bytes. This will throw if the underlying object is not a signalr::value:: type::binary.
197
172
*/
198
173
SIGNALRCLIENT_API const std::vector<uint8_t >& as_binary () const ;
199
174
200
175
/* *
201
- * Returns the signalr::type that represents the stored object.
176
+ * Returns the signalr::value:: type that represents the stored object.
202
177
*/
203
178
SIGNALRCLIENT_API type type () const ;
204
179
@@ -216,7 +191,7 @@ namespace signalr
216
191
217
192
// constructor of types in union are not implicitly called
218
193
// this is expected as we only construct a single type in the union once we know
219
- // what that type is when constructing the signalr_value type.
194
+ // what that type is when constructing the signalr::value type.
220
195
#pragma warning (push)
221
196
#pragma warning (disable: 4582)
222
197
storage () {}
0 commit comments