diff options
author | David Robillard <d@drobilla.net> | 2006-09-30 06:47:00 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2006-09-30 06:47:00 +0000 |
commit | 35a5d92cfcf6815553a0939c3e2bf77c1108fd31 (patch) | |
tree | 456351b4b18d48aba25a2db7218df9be09d4047e /src/common/util/Atom.h | |
parent | d82dcd232f201b531a0be165ee44aede1bc8a1df (diff) | |
download | ingen-35a5d92cfcf6815553a0939c3e2bf77c1108fd31.tar.gz ingen-35a5d92cfcf6815553a0939c3e2bf77c1108fd31.tar.bz2 ingen-35a5d92cfcf6815553a0939c3e2bf77c1108fd31.zip |
Work on RDF serialization (only (partial) saving so far).
git-svn-id: http://svn.drobilla.net/lad/ingen@146 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/common/util/Atom.h')
-rw-r--r-- | src/common/util/Atom.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/common/util/Atom.h b/src/common/util/Atom.h index f28b9339..2a6ae982 100644 --- a/src/common/util/Atom.h +++ b/src/common/util/Atom.h @@ -20,6 +20,9 @@ #include <cstdlib> #include <cassert> #include <cstring> +#include <string> + +using std::string; /** An OSC atom (fundamental data types OSC messages are composed of). @@ -34,10 +37,11 @@ public: BLOB }; - Atom() : _type(NIL), _blob_val(0) {} - Atom(int32_t val) : _type(INT), _int_val(val) {} - Atom(float val) : _type(FLOAT), _float_val(val) {} - Atom(const char* val) : _type(STRING), _string_val(strdup(val)) {} + Atom() : _type(NIL), _blob_val(0) {} + Atom(int32_t val) : _type(INT), _int_val(val) {} + Atom(float val) : _type(FLOAT), _float_val(val) {} + Atom(const char* val) : _type(STRING), _string_val(strdup(val)) {} + Atom(const string& val) : _type(STRING), _string_val(strdup(val.c_str())) {} Atom(void* val) : _type(BLOB), _blob_size(sizeof(val)), _blob_val(malloc(_blob_size)) { memcpy(_blob_val, val, sizeof(_blob_size)); } |