00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef COIN_SOENGINE_H
00021 #define COIN_SOENGINE_H
00022
00023 #include <Inventor/fields/SoFieldContainer.h>
00024
00025 class SoEngineList;
00026 class SoEngineOutput;
00027 class SoEngineOutputList;
00028 class SoEngineOutputData;
00029
00030 class COIN_DLL_API SoEngine : public SoFieldContainer {
00031 typedef SoFieldContainer inherited;
00032
00033 public:
00034 static void initClass(void);
00035 static void initClasses(void);
00036 static SoType getClassTypeId(void);
00037
00038 void evaluateWrapper(void);
00039
00040 virtual int getOutputs(SoEngineOutputList & l) const;
00041 SoEngineOutput * getOutput(const SbName & outputname) const;
00042 SbBool getOutputName(const SoEngineOutput * output, SbName & outputname) const;
00043 virtual const SoEngineOutputData * getOutputData(void) const = 0;
00044 static SoEngine * getByName(const SbName & name);
00045 static int getByName(const SbName & name, SoEngineList & el);
00046
00047 SbBool isNotifying(void) const;
00048 virtual void notify(SoNotList * nl);
00049
00050 SoEngine * copy(void) const;
00051 virtual SoFieldContainer * copyThroughConnection(void) const;
00052 SbBool shouldCopy(void) const;
00053
00054 virtual void writeInstance(SoOutput * out);
00055
00056
00057 protected:
00058 SoEngine(void);
00059 virtual ~SoEngine();
00060 virtual void evaluate(void) = 0;
00061
00062 virtual SbBool readInstance(SoInput * in, unsigned short flags);
00063 virtual void inputChanged(SoField * which);
00064
00065 static const SoFieldData ** getInputDataPtr(void);
00066 static const SoEngineOutputData ** getOutputDataPtr(void);
00067
00068 void writeOutputTypes(SoOutput * out);
00069
00070 private:
00071 virtual void destroy(void);
00072
00073 static SoType classTypeId;
00074 unsigned int flags;
00075 };
00076
00077 #if !defined(COIN_INTERNAL)
00078 #include <Inventor/engines/SoEngineOutput.h>
00079 #endif // COIN_INTERNAL
00080
00081 #endif // !COIN_SOENGINE_H