#ifndef __libeast_action_h__ #define __libeast_action_h__ /* #include #include "event.h" #include "object.h" class Object; // Note: Most of these classes I'd like to make absract, but I don't think I can // due to the way I run them through a try/throw/catch construct. The compiler // expects to be able to instantiate all of them. // Basic action; shouldn't be used // Abstract class Action: public Event { public: Action() {} virtual void throw_self() const {throw *this;} }; // An action that deals with one object // Abstract class ObjectAction: public Action { public: ObjectAction(Object* obj): my_obj(obj) {} virtual void throw_self() const {throw *this;} Object* obj() const {return my_obj;} protected: Object* my_obj; }; // An action that deals with several objects // Abstract class MObjectAction: public Action { public: MObjectAction(const deque& obj): my_obj(obj) {} virtual void throw_self() const {throw *this;} const deque& obj() const {return my_obj;} protected: deque my_obj; }; // Non-abstract classes follow // Add the object to the environment class AddObj: public ObjectAction { public: AddObj(Object* obj): ObjectAction(obj) {} virtual void throw_self() const {throw *this;} }; // Add several objects to the environment class MAddObj: public MObjectAction { public: MAddObj(const deque& obj): MObjectAction(obj) {} virtual void throw_self() const {throw *this;} }; // Remove the object from the environment class DelObj: public ObjectAction { public: DelObj(Object* obj): ObjectAction(obj) {} virtual void throw_self() const {throw *this;} }; // Remove several objects from the environment class MDelObj: public MObjectAction { public: MDelObj(const deque obj): MObjectAction(obj) {} virtual void throw_self() const {throw *this;} }; // Remove all objects from the environment class DelAllObj: public Action { public: DelAllObj() {} virtual void throw_self() const {throw *this;} }; */ #endif