From 113fc467a7170a8a564049c64d1036dd10e6abac Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Sun, 30 Jul 2006 09:07:20 +0000 Subject: 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. --- src/action.cpp | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 src/action.cpp (limited to 'src/action.cpp') 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 @@ +#include "action.h" +#include "command.h" + +Action::Action() : + bDefault( true ), + sName("") +{ +} + +Action::Action( const char *sName ) : + bDefault( false ), + sName( sName ) +{ +} + +Action::~Action() +{ +} + +void Action::add( Command *pCmd ) +{ + lCommand.push_back( pCmd ); +} + +void Action::debug() +{ + if( bDefault ) + printf("action default:\n"); + else + printf("action \"%s\":\n", sName.getString() ); + + for( std::list::iterator i = lCommand.begin(); + i != lCommand.end(); i++ ) + { + (*i)->debug(); + } +} + -- cgit v1.2.3