]> git.tdb.fi Git - libs/datafile.git/blobdiff - source/type.h
Recognize char pointers as strings
[libs/datafile.git] / source / type.h
index 701a5dc9786533f930e6c49778988f6816f83189..85cfec40f2afc9aa79f38d646baf64dea473cd0a 100644 (file)
@@ -52,6 +52,16 @@ struct SymbolType
        typedef Symbol Store;
 };
 
+const char valid_signatures[] =
+{
+       IntType::signature,
+       FloatType::signature,
+       BoolType::signature,
+       StringType::signature,
+       SymbolType::signature,
+       0
+};
+
 template<typename T>
 struct HasLoadType
 {
@@ -113,6 +123,12 @@ struct TypeInfo<bool, false>: BoolType { };
 template<>
 struct TypeInfo<std::string, false>: StringType { };
 
+template<>
+struct TypeInfo<char *, false>: StringType { };
+
+template<>
+struct TypeInfo<const char *, false>: StringType { };
+
 template<typename T>
 struct TypeInfo<const T, false>: TypeInfo<T> { };