diff options
Diffstat (limited to '')
-rw-r--r-- | src/stringprocbuild.cpp | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/src/stringprocbuild.cpp b/src/stringprocbuild.cpp deleted file mode 100644 index 419d819..0000000 --- a/src/stringprocbuild.cpp +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | #include "stringprocbuild.h" | ||
2 | #include "build.h" | ||
3 | |||
4 | StringProcBuild::StringProcBuild( Build *pBld ) : | ||
5 | StringProc( pBld ) | ||
6 | { | ||
7 | } | ||
8 | |||
9 | StringProcBuild::~StringProcBuild() | ||
10 | { | ||
11 | } | ||
12 | |||
13 | std::string StringProcBuild::replVars( const std::string &sSrc, const StringList *pCont, VarMap *mExtra ) | ||
14 | { | ||
15 | std::string sDes, sBuf; | ||
16 | int nMode = 0; | ||
17 | |||
18 | int nLen = sSrc.size(); | ||
19 | for( int j = 0; j < nLen; j++ ) | ||
20 | { | ||
21 | if( sSrc[j] == '{' ) | ||
22 | { | ||
23 | sBuf = ""; | ||
24 | nMode = 1; | ||
25 | } | ||
26 | else if( nMode == 0 ) | ||
27 | { | ||
28 | sDes += sSrc[j]; | ||
29 | } | ||
30 | else if( nMode == 1 ) | ||
31 | { | ||
32 | if( sSrc[j] == '}' ) | ||
33 | { | ||
34 | sDes += getBuild()->getVar( pCont, sBuf, mExtra ); | ||
35 | nMode = 0; | ||
36 | } | ||
37 | else | ||
38 | { | ||
39 | sBuf += sSrc[j]; | ||
40 | } | ||
41 | } | ||
42 | } | ||
43 | |||
44 | if( nMode == 1 ) | ||
45 | { | ||
46 | throw BuildException( | ||
47 | "Unterminated variable replacement found: \"%s\"", | ||
48 | sSrc.c_str() | ||
49 | ); | ||
50 | } | ||
51 | |||
52 | return sDes; | ||
53 | } | ||
54 | |||