aboutsummaryrefslogtreecommitdiff
path: root/src/variable.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/variable.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/variable.h b/src/variable.h
index 260c96a..241393e 100644
--- a/src/variable.h
+++ b/src/variable.h
@@ -21,7 +21,8 @@ public:
21 typeVersion, 21 typeVersion,
22 typeString, 22 typeString,
23 typeList, 23 typeList,
24 typeRef /**< Reference by name, it's just a string. */ 24 typeRef, /**< Reference by name, it's just a string. */
25 typeOpaque /**< Only useful to functions. */
25 }; 26 };
26 27
27public: 28public:
@@ -41,6 +42,7 @@ public:
41 */ 42 */
42 Variable( const StrList &lst ); 43 Variable( const StrList &lst );
43 Variable( const VarList &lst ); 44 Variable( const VarList &lst );
45 Variable( void *oVal );
44 virtual ~Variable(); 46 virtual ~Variable();
45 47
46 static Variable mkRef( const Bu::String &sVal ); 48 static Variable mkRef( const Bu::String &sVal );
@@ -54,6 +56,7 @@ public:
54 bool getBool() const; 56 bool getBool() const;
55 const Bu::String &getString() const; 57 const Bu::String &getString() const;
56 const VarList &getList() const; 58 const VarList &getList() const;
59 const void *getOpaque() const;
57 60
58 // Conversion functions, they'll return the requested type, maybe an error 61 // Conversion functions, they'll return the requested type, maybe an error
59 // if the source data is really bad 62 // if the source data is really bad
@@ -77,6 +80,7 @@ public:
77 const Variable &operator=( const double &rhs ); 80 const Variable &operator=( const double &rhs );
78 const Variable &operator=( const bool &rhs ); 81 const Variable &operator=( const bool &rhs );
79 const Variable &operator=( const Bu::String &rhs ); 82 const Variable &operator=( const Bu::String &rhs );
83 const Variable &operator=( void *rhs );
80 84
81 const Variable &operator+=( const Variable &rhs ); 85 const Variable &operator+=( const Variable &rhs );
82 const Variable &operator<<( const Variable &rhs ); 86 const Variable &operator<<( const Variable &rhs );
@@ -102,6 +106,7 @@ private:
102 bool bVal; 106 bool bVal;
103 Bu::String *sVal; 107 Bu::String *sVal;
104 VarList *lVal; 108 VarList *lVal;
109 void *oVal;
105 } uVal; 110 } uVal;
106 111
107 void reset( Type eType ); 112 void reset( Type eType );