From eb5481635b31a8517a2f443ca7b414e4ff515028 Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Fri, 6 May 2005 12:55:15 +0000 Subject: [PATCH] added more to action --- action.cpp | 18 ++++++++++++++++++ action.h | 14 ++++++++++---- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/action.cpp b/action.cpp index 2508b5c..695c74f 100644 --- a/action.cpp +++ b/action.cpp @@ -1,3 +1,21 @@ #include "action.h" +Action::Action(std::string executable, literals preconditions, literals effects){ + _execututable = executable; + _preconditions = preconditions; + _effects = effects; +} + +const literals Action::effects(){ + return _effects; +} + +const literals Action::preconditions(){ + return _preconditions; +} + +int Action::execute(){ + + return 0; +} diff --git a/action.h b/action.h index 4550771..60206a3 100644 --- a/action.h +++ b/action.h @@ -1,13 +1,19 @@ #ifndef __ACTION_H__ #define __ACTION_H__ +typedef literals std::vector; + class Action { + public: + Action(std::string executable, literals preconditions, literals effects); + const literals effects() const; + const literals preconditions() const; + int execute() const; protected: - std::string executable; - std::vector preconditions; - std::vector effects; - + std::string _executable; + literals _preconditions; + literals _effects; }; #endif -- 2.39.2