00001 #ifndef __FISH_FIELDOPERATOROBJECT_HPP
00002 #define __FISH_FIELDOPERATOROBJECT_HPP
00003
00004 #include "fishboneDllApi.h"
00005
00006 #include <ocean/plankton/VCreator.hpp>
00007 #include <ocean/shrimp/VObjectStatus.hpp>
00008 #include <bundle/Bundle.hpp>
00009
00010 #include "FishSkeleton.hpp"
00011 #include "FishField.hpp"
00012
00013 namespace Wizt
00014 {
00015
00026 class fishbone_API FieldOperatorObject : public virtual VObject,
00027 public virtual Fish<Fiber::Field>,
00028 public StatusIndicator
00029 {
00030 public:
00039 FieldOperatorObject(const string&name,
00040 const string&fieldname,
00041 int p = 0, const RefPtr<VCreationPreferences>&VP = NullPtr());
00042
00043
00050 void publishInputField();
00051
00053 ~FieldOperatorObject();
00054
00055 static RefPtr<VAcceptInfo> accept(const RefPtr<VObject>&vobj);
00056
00057 bool update(VRequest&R, double precision);
00058
00059 virtual bool preFieldOperation(VRequest&Context);
00060
00069 virtual bool FieldOperation(VRequest&Context, Fiber::Field&,
00070 Fiber::Representation&, Fiber::Representation&FieldIDSource) = 0;
00071
00072 virtual bool postFieldOperation(VRequest&Context);
00073
00074 };
00075
00076
00081 template <class FieldOperationObject>
00082 struct FieldOperationCreator : VCreator<FieldOperationObject, AcceptList<Fiber::Field> >
00083 {
00084 typedef VCreator<FieldOperationObject, AcceptList<Fiber::Field> > Base_t;
00085
00089 FieldOperationCreator(const string&name, int p=0,
00090 const RefPtr<VCreationPreferences>&VP=NullPtr() )
00091 : Base_t(name, p, VP)
00092 {}
00093
00097 template <unsigned ID>
00098 FieldOperationCreator(const VCreatorProperty<ID>&CreatorProperties, int p = 0,
00099 const RefPtr<VCreationPreferences>&VP=NullPtr() )
00100 : Base_t(CreatorProperties, p, VP)
00101 {}
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114 };
00115
00116
00117 }
00118
00119 #endif
00120
00121