15 #ifndef _DATAT_BITS_INCLUDE_TAG
16 #error Must only be included from sag_connectivity_cpp.hpp, use that instead
42 class data_t:
protected sag_underlying_data_t
52 memset(
this, 0,
sizeof(sag_underlying_data_t));
59 memset(
this, 0,
sizeof(sag_underlying_data_t));
61 swap(std::move(other));
71 data_t tmp(std::move(other));
171 swap(std::move(tmp));
184 swap(std::move(tmp));
197 swap(std::move(tmp));
215 swap(std::move(tmp));
228 swap(std::move(tmp));
234 explicit data_t(
const char *s,
size_t n);
237 explicit data_t(
const char *s);
240 explicit data_t(
const std::string &s);
247 swap(std::move(tmp));
257 swap(std::move(tmp));
272 swap(std::move(tmp));
287 swap(std::move(tmp));
302 swap(std::move(tmp));
data_t & operator=(int64_t d)
Assign an int64_t to this, freeing the existing contents of this.
Definition: data_t.hpp:168
sag_data_tag
A descriminator for the content of the data_t union.
Definition: sag_connectivity_c.h:33
byte-array (8-bit signed int)
Definition: sag_connectivity_c.h:52
list of data
Definition: sag_connectivity_c.h:48
A list class which implements many of the functions on std::vector.
Definition: list_t.hpp:34
A container for an payload and associated metadata.
Definition: message.hpp:27
A map class which implements many of the functions on std::map.
Definition: map_t.hpp:36
data_t(bool b)
Create a data_t from a bool.
Definition: data_t.hpp:175
const char * type_name() const
Return the name of the contained type as a string (mainly useful for debugging)
Definition: data_t.hpp:131
data_t(data_t &&other)
Construct a data_t, move the contents from another data_t.
Definition: data_t.hpp:57
data_t & operator=(buffer_t &&d)
Assign this to a buffer_t, freeing the existing contents.
Definition: data_t.hpp:299
data_t(decimal_t d)
Create a data_t from a decimal.
Definition: data_t.hpp:219
sag_underlying_decimal_t decimal_t
Decimals are implemented with an underlying 64bit int conforming to IEEE 754 decimal 64...
Definition: sag_connectivity_cpp.hpp:49
bool operator==(const data_t &other) const
Returns true if two data_ts are deep-equals.
64-bit signed int
Definition: sag_connectivity_c.h:42
data_t & operator=(const std::string &s)
Assign this to a string, freeing the existing contents (copies the string).
Definition: data_t.hpp:254
64-bit IEEE-754 decimal
Definition: sag_connectivity_c.h:44
map of data:data
Definition: sag_connectivity_c.h:50
V::result_type apply_visitor(const V &v) const
Apply a visitor (using the boost::static_visitor pattern) to this data_t.
A wrapper type for holding arbitrary objects inside a data_t.
Definition: custom_t.hpp:42
data_t & operator=(decimal_t d)
Assign this to a decimal, freeing the existing contents.
Definition: data_t.hpp:225
data_t & operator=(map_t &&d)
Assign this to a map_t, freeing the existing contents.
Definition: data_t.hpp:284
data_t()
Construct an empty data_t.
Definition: data_t.hpp:50
A class that holds an untyped byte buffer.
Definition: buffer_t.hpp:27
bool empty() const
Returns true if this is the empty data_t.
Definition: data_t.hpp:80
data_t copy() const
Return a deep copy of this data_t.
void swap(data_t &&other)
Swap the contents of this data_t with another.
data_t(double d)
Create a data_t from a double.
Definition: data_t.hpp:188
data_t & operator=(const char *s)
Assign this to a string, freeing the existing contents (copies the string).
Definition: data_t.hpp:244
bool operator!=(const data_t &other) const
Returns true if two data_ts are non-equal (deep equality)
Definition: data_t.hpp:88
data_t & operator=(data_t &&other)
Move-assignment from another data_t.
Definition: data_t.hpp:69
data_t & operator=(list_t &&d)
Assign this to a list_t, freeing the existing contents.
Definition: data_t.hpp:269
a void* + deleter and copy function pointers
Definition: sag_connectivity_c.h:54
Bool.
Definition: sag_connectivity_c.h:38
utf8-encoded const char*
Definition: sag_connectivity_c.h:46
A variant type which can be one of the following:
Definition: data_t.hpp:42
data_t(int64_t d)
Create a data_t from an int64_t.
Definition: data_t.hpp:162
data_t & operator=(custom_t< T > &&d)
Assign this to a custom value, freeing the existing contents This is a move constructor and will leav...
Definition: data_t.hpp:212
data_t & operator=(bool b)
Assign a bool to this, freeing the existing contents of this.
Definition: data_t.hpp:181
64-bit float
Definition: sag_connectivity_c.h:40
Empty.
Definition: sag_connectivity_c.h:36
data_t & operator=(double d)
Assign a double to this, freeing the existing contents of this.
Definition: data_t.hpp:194
~data_t()
For non-primitives free the underlying memory.
sag_data_tag type_tag() const
Return the descriminator for this union (as an enum of the possible values)
Definition: data_t.hpp:152