summaryrefslogtreecommitdiff
path: root/src/variable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/variable.cpp')
-rw-r--r--src/variable.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/variable.cpp b/src/variable.cpp
index db7726c..1e5cc9b 100644
--- a/src/variable.cpp
+++ b/src/variable.cpp
@@ -210,6 +210,23 @@ Variable Variable::to( Type e ) const
210 eType, e ); 210 eType, e );
211} 211}
212 212
213void Variable::insert( const Variable &vKey, const Variable &vValue )
214{
215 if( eType != tDictionary )
216 throw Bu::ExceptionBase("Insert on non-dictionary.");
217 hValue->insert( vKey, vValue );
218}
219
220bool Variable::has( const Variable &vKey )
221{
222 if( eType == tDictionary )
223 return hValue->has( vKey );
224// else if( eType == tList )
225// return lValue->contains( vKey );
226 else
227 throw Bu::ExceptionBase("Insert on non-dictionary.");
228}
229
213Variable &Variable::operator=( const Variable &rhs ) 230Variable &Variable::operator=( const Variable &rhs )
214{ 231{
215 deinitType(); 232 deinitType();