aboutsummaryrefslogtreecommitdiff
path: root/src/action.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2006-07-30 09:07:20 +0000
committerMike Buland <eichlan@xagasoft.com>2006-07-30 09:07:20 +0000
commit113fc467a7170a8a564049c64d1036dd10e6abac (patch)
treee4719817a3e0175a9f7cbd4e07fc994ff41f8ef6 /src/action.cpp
parent900976d2d74e0de57858b265c2ef0d17a29e921a (diff)
downloadbuild-113fc467a7170a8a564049c64d1036dd10e6abac.tar.gz
build-113fc467a7170a8a564049c64d1036dd10e6abac.tar.bz2
build-113fc467a7170a8a564049c64d1036dd10e6abac.tar.xz
build-113fc467a7170a8a564049c64d1036dd10e6abac.zip
It's starting to look pretty good, just trying to figure out how to get through
everything that needs to be made modular and general.
Diffstat (limited to 'src/action.cpp')
-rw-r--r--src/action.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/action.cpp b/src/action.cpp
new file mode 100644
index 0000000..7a7bbb8
--- /dev/null
+++ b/src/action.cpp
@@ -0,0 +1,38 @@
1#include "action.h"
2#include "command.h"
3
4Action::Action() :
5 bDefault( true ),
6 sName("")
7{
8}
9
10Action::Action( const char *sName ) :
11 bDefault( false ),
12 sName( sName )
13{
14}
15
16Action::~Action()
17{
18}
19
20void Action::add( Command *pCmd )
21{
22 lCommand.push_back( pCmd );
23}
24
25void Action::debug()
26{
27 if( bDefault )
28 printf("action default:\n");
29 else
30 printf("action \"%s\":\n", sName.getString() );
31
32 for( std::list<Command *>::iterator i = lCommand.begin();
33 i != lCommand.end(); i++ )
34 {
35 (*i)->debug();
36 }
37}
38