summaryrefslogtreecommitdiff
path: root/src/variable.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/variable.cpp')
-rw-r--r--src/variable.cpp38
1 files changed, 36 insertions, 2 deletions
diff --git a/src/variable.cpp b/src/variable.cpp
index 3954ccd..fab0c46 100644
--- a/src/variable.cpp
+++ b/src/variable.cpp
@@ -1,12 +1,46 @@
1#include "variable.h" 1#include "variable.h"
2 2
3Variable::Variable() : 3Variable::Variable() :
4 eType( Undef ), 4 eType( Null ),
5 bNull( true ),
6 iValue( 0 ) 5 iValue( 0 )
7{ 6{
8} 7}
9 8
9Variable::Variable( Type eType ) :
10 eType( eType ),
11 iValue( 0 )
12{
13 if( eType == String )
14 {
15 sValue = new Bu::String();
16 }
17}
18
19Variable::Variable( int64_t iValue ) :
20 eType( Int ),
21 iValue( iValue )
22{
23}
24
25Variable::Variable( double fValue ) :
26 eType( Float ),
27 fValue( fValue )
28{
29}
30
31Variable::Variable( bool bValue ) :
32 eType( Bool ),
33 bValue( bValue )
34{
35}
36
37Variable::Variable( const Bu::String &sValue ) :
38 eType( String ),
39 iValue( 0 )
40{
41 this->sValue = new Bu::String( sValue );
42}
43
10Variable::~Variable() 44Variable::~Variable()
11{ 45{
12 if( eType == String ) 46 if( eType == String )