A piece of data with some type. More...
#include <Atom.hpp>
Public Types | |
enum | Type { NIL, INT, FLOAT, BOOL, URI, STRING, BLOB } |
Public Member Functions | |
Atom (int32_t val) | |
Atom (float val) | |
Atom (bool val) | |
Atom (const char *val) | |
Atom (Type t, const std::string &val) | |
Atom (const char *type_uri, size_t size, void *val) | |
Atom (const Atom ©) | |
Atom & | operator= (const Atom &other) |
bool | operator== (const Atom &other) const |
bool | operator!= (const Atom &other) const |
bool | operator< (const Atom &other) const |
size_t | data_size () const |
bool | is_valid () const |
Type | type () const |
Type of this atom. | |
int32_t | get_int32 () const |
float | get_float () const |
bool | get_bool () const |
const char * | get_string () const |
const char * | get_uri () const |
const char * | get_blob_type () const |
const void * | get_blob () const |
A piece of data with some type.
Atoms can be of various primitive types (integer, float, etc) as well as a string or primitive. The primitive types are entirely contained within the Atom, i.e. the Atom is POD. String, URI, and blob atoms are not POD.
Type Raul::Atom::type | ( | ) | const [inline] |
Type of this atom.
Always check this before attempting to get the value - attempting to get the incorrectly typed value is a fatal error.
Referenced by Raul::AtomRDF::atom_to_node(), and Raul::AtomLiblo::lo_message_add_atom().