summaryrefslogtreecommitdiffstats
path: root/src/common/util/Atom.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-09-30 06:47:00 +0000
committerDavid Robillard <d@drobilla.net>2006-09-30 06:47:00 +0000
commit35a5d92cfcf6815553a0939c3e2bf77c1108fd31 (patch)
tree456351b4b18d48aba25a2db7218df9be09d4047e /src/common/util/Atom.h
parentd82dcd232f201b531a0be165ee44aede1bc8a1df (diff)
downloadingen-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.h12
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)); }