diff options
Diffstat (limited to 'src/variable.cpp')
-rw-r--r-- | src/variable.cpp | 17 |
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 | ||
213 | void 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 | |||
220 | bool 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 | |||
213 | Variable &Variable::operator=( const Variable &rhs ) | 230 | Variable &Variable::operator=( const Variable &rhs ) |
214 | { | 231 | { |
215 | deinitType(); | 232 | deinitType(); |