00001 #ifndef FCAM_ACTION_H
00002 #define FCAM_ACTION_H
00003
00004 #include <stdio.h>
00005
00013 namespace FCam {
00015 class Action {
00016 public:
00017 Action() : owned(false) {}
00018 ~Action();
00021 int time;
00022
00024 int latency;
00025
00031 virtual void doAction() = 0;
00032
00038 virtual Action *copy() = 0;
00039
00040 private:
00041
00042 friend class Shot;
00043
00044
00045
00046 bool owned;
00047 };
00048
00054 template<typename Derived>
00055 class CopyableAction : public Action {
00056 public:
00059 Action *copy() {
00060 return new Derived(*((Derived *)this));
00061 }
00062 };
00063
00064 }
00065
00066
00067 #endif