summaryrefslogtreecommitdiff
path: root/src/minimacro.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/minimacro.cpp')
-rw-r--r--src/minimacro.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/minimacro.cpp b/src/minimacro.cpp
index 3e69fe4..c6a868f 100644
--- a/src/minimacro.cpp
+++ b/src/minimacro.cpp
@@ -14,6 +14,14 @@ Bu::MiniMacro::MiniMacro()
14 hFuncs.insert("tolower", new FuncToLower() ); 14 hFuncs.insert("tolower", new FuncToLower() );
15} 15}
16 16
17Bu::MiniMacro::MiniMacro( const StrHash &sVarSrc )
18{
19 for( StrHash::const_iterator i = sVarSrc.begin(); i != sVarSrc.end(); i++ )
20 {
21 addVar( i.getKey(), i.getValue() );
22 }
23}
24
17Bu::MiniMacro::~MiniMacro() 25Bu::MiniMacro::~MiniMacro()
18{ 26{
19} 27}
@@ -163,11 +171,16 @@ bool Bu::MiniMacro::hasVar( const Bu::FString &sName )
163 return hVars.has( sName ); 171 return hVars.has( sName );
164} 172}
165 173
166const Bu::FString &Bu::MiniMacro::getvar( const Bu::FString &sName ) 174const Bu::FString &Bu::MiniMacro::getVar( const Bu::FString &sName )
167{ 175{
168 return hVars.get( sName ); 176 return hVars.get( sName );
169} 177}
170 178
179const Bu::StrHash &Bu::MiniMacro::getVars()
180{
181 return hVars;
182}
183
171int Bu::MiniMacro::getPosition() 184int Bu::MiniMacro::getPosition()
172{ 185{
173 return iLastPos; 186 return iLastPos;