diff options
author | Mike Buland <eichlan@xagasoft.com> | 2006-09-08 19:45:14 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2006-09-08 19:45:14 +0000 |
commit | b6d1a440d3885480e6f2e2209434e633689a4bf6 (patch) | |
tree | b859be4f3cd8c31733e252083389b14cb5748d1c | |
parent | 71cc260a3ca6d3d0594fd4cadb0711ae3f142932 (diff) | |
download | build-b6d1a440d3885480e6f2e2209434e633689a4bf6.tar.gz build-b6d1a440d3885480e6f2e2209434e633689a4bf6.tar.bz2 build-b6d1a440d3885480e6f2e2209434e633689a4bf6.tar.xz build-b6d1a440d3885480e6f2e2209434e633689a4bf6.zip |
Getting steaddily closer.
Diffstat (limited to '')
-rw-r--r-- | src/perform.cpp | 11 | ||||
-rw-r--r-- | src/perform.h | 4 | ||||
-rw-r--r-- | src/performcommand.cpp | 8 | ||||
-rw-r--r-- | src/performcommand.h | 2 |
4 files changed, 25 insertions, 0 deletions
diff --git a/src/perform.cpp b/src/perform.cpp index 4e4a78e..20ad51a 100644 --- a/src/perform.cpp +++ b/src/perform.cpp | |||
@@ -1,4 +1,5 @@ | |||
1 | #include "perform.h" | 1 | #include "perform.h" |
2 | #include "build.h" | ||
2 | 3 | ||
3 | Perform::Perform() | 4 | Perform::Perform() |
4 | { | 5 | { |
@@ -13,3 +14,13 @@ void Perform::addParam( const char *sParam ) | |||
13 | lParam.push_back( sParam ); | 14 | lParam.push_back( sParam ); |
14 | } | 15 | } |
15 | 16 | ||
17 | void Perform::copyData( Perform *pSrc, Build &bld, const std::string &cont ) | ||
18 | { | ||
19 | lParam.clear(); | ||
20 | for( std::list<std::string>::iterator i = pSrc->lParam.begin(); | ||
21 | i != pSrc->lParam.end(); i++ ) | ||
22 | { | ||
23 | lParam.push_back( bld.replVars( *i, cont ) ); | ||
24 | } | ||
25 | } | ||
26 | |||
diff --git a/src/perform.h b/src/perform.h index 020af42..5a961e2 100644 --- a/src/perform.h +++ b/src/perform.h | |||
@@ -5,6 +5,8 @@ | |||
5 | #include <list> | 5 | #include <list> |
6 | #include <string> | 6 | #include <string> |
7 | 7 | ||
8 | class Build; | ||
9 | |||
8 | class Perform | 10 | class Perform |
9 | { | 11 | { |
10 | public: | 12 | public: |
@@ -12,6 +14,8 @@ public: | |||
12 | virtual ~Perform(); | 14 | virtual ~Perform(); |
13 | 15 | ||
14 | void addParam( const char *sParam ); | 16 | void addParam( const char *sParam ); |
17 | virtual Perform *duplicate( Build &bld, const std::string &cont ) = 0; | ||
18 | void copyData( Perform *pSrc, Build &bld, const std::string &cont ); | ||
15 | 19 | ||
16 | private: | 20 | private: |
17 | std::list<std::string> lParam; | 21 | std::list<std::string> lParam; |
diff --git a/src/performcommand.cpp b/src/performcommand.cpp index 7c7dd42..7505061 100644 --- a/src/performcommand.cpp +++ b/src/performcommand.cpp | |||
@@ -10,3 +10,11 @@ PerformCommand::PerformCommand() | |||
10 | PerformCommand::~PerformCommand() | 10 | PerformCommand::~PerformCommand() |
11 | { | 11 | { |
12 | } | 12 | } |
13 | |||
14 | Perform *PerformCommand::duplicate( Build &bld, const std::string &cont ) | ||
15 | { | ||
16 | Perform *pRet = new PerformCommand(); | ||
17 | pRet->copyData( this, bld, cont ); | ||
18 | return pRet; | ||
19 | } | ||
20 | |||
diff --git a/src/performcommand.h b/src/performcommand.h index 219ae28..b6f7f11 100644 --- a/src/performcommand.h +++ b/src/performcommand.h | |||
@@ -11,6 +11,8 @@ public: | |||
11 | PerformCommand(); | 11 | PerformCommand(); |
12 | virtual ~PerformCommand(); | 12 | virtual ~PerformCommand(); |
13 | 13 | ||
14 | virtual Perform *duplicate( Build &bld, const std::string &cont ); | ||
15 | |||
14 | private: | 16 | private: |
15 | 17 | ||
16 | }; | 18 | }; |