| http://www.sim.no/ http://www.coin3d.org/

SoEngine.h
1 /**************************************************************************\
2 *
3 * This file is part of the Coin 3D visualization library.
4 * Copyright (C) by Kongsberg Oil & Gas Technologies.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * ("GPL") version 2 as published by the Free Software Foundation.
9 * See the file LICENSE.GPL at the root directory of this source
10 * distribution for additional information about the GNU GPL.
11 *
12 * For using Coin with software that can not be combined with the GNU
13 * GPL, and for taking advantage of the additional benefits of our
14 * support services, please contact Kongsberg Oil & Gas Technologies
15 * about acquiring a Coin Professional Edition License.
16 *
17 * See http://www.coin3d.org/ for more information.
18 *
19 * Kongsberg Oil & Gas Technologies, Bygdoy Alle 5, 0257 Oslo, NORWAY.
20 * http://www.sim.no/ sales@sim.no coin-support@coin3d.org
21 *
22 \**************************************************************************/
23
24 #ifndef COIN_SOENGINE_H
25 #define COIN_SOENGINE_H
26
27 #include <Inventor/fields/SoFieldContainer.h>
28
29 class SoEngineList;
30 class SoEngineOutput;
31 class SoEngineOutputList;
32 class SoEngineOutputData;
33
34 class COIN_DLL_API SoEngine : public SoFieldContainer {
35 typedef SoFieldContainer inherited;
36
37 public:
38 static void initClass(void);
39 static void initClasses(void);
40 static SoType getClassTypeId(void);
41
42 void evaluateWrapper(void);
43
44 virtual int getOutputs(SoEngineOutputList & l) const;
45 SoEngineOutput * getOutput(const SbName & outputname) const;
46 SbBool getOutputName(const SoEngineOutput * output, SbName & outputname) const;
47 virtual const SoEngineOutputData * getOutputData(void) const = 0;
48 static SoEngine * getByName(const SbName & name);
49 static int getByName(const SbName & name, SoEngineList & el);
50
51 SbBool isNotifying(void) const;
52 virtual void notify(SoNotList * nl);
53
54 SoEngine * copy(void) const;
55 virtual SoFieldContainer * copyThroughConnection(void) const;
56 SbBool shouldCopy(void) const;
57
58 virtual void writeInstance(SoOutput * out);
59
60
61 protected:
62 SoEngine(void);
63 virtual ~SoEngine(void);
64 virtual void evaluate(void) = 0;
65
66 virtual SbBool readInstance(SoInput * in, unsigned short flags);
67 virtual void inputChanged(SoField * which);
68
69 static const SoFieldData ** getInputDataPtr(void);
70 static const SoEngineOutputData ** getOutputDataPtr(void);
71
72 void writeOutputTypes(SoOutput * out);
73
74 private:
75 virtual void destroy(void); // overrides SoBase::destroy()
76
77 static SoType classTypeId;
78
79 enum InternalEngineFlags {
80 FLAG_ISNOTIFYING = (1 << 0),
81 FLAG_ISDIRTY = (1 << 1)
82 };
83
84 unsigned int flags;
85
86 // needed for handling connections from SoEngineOutput
87 friend class SoEngineOutput;
88 void setDirty(void);
89 };
90
91 #if !defined(COIN_INTERNAL)
92 #include <Inventor/engines/SoEngineOutput.h>
93 #endif // COIN_INTERNAL
94
95 #endif // !COIN_SOENGINE_H
SoFieldContainer::writeInstance
virtual void writeInstance(SoOutput *out)
Definition: SoFieldContainer.cpp:715
SoOutput
The SoOutput class is an abstraction of an output stream.SoOutput offers the ability to write basic t...
Definition: SoOutput.h:42
SoEngine
SoEngine is the base class for Coin engines.Engines enables the application programmers to make compl...
Definition: SoEngine.h:34
SoFieldContainer
The SoFieldContainer class is a base class for all classes that contain fields.The classes containing...
Definition: SoFieldContainer.h:34
SoField
The SoField class is the top-level abstract base class for fields.Fields is the mechanism used throug...
Definition: SoField.h:38
SoEngineList
The SoEngineList class is a container for SoEngine objects.As this class inherits SoBaseList...
Definition: SoEngineList.h:31
SoFieldContainer::copyThroughConnection
virtual SoFieldContainer * copyThroughConnection(void) const
Definition: SoFieldContainer.cpp:804
SoEngineOutputList
The SoEngineOutputList class is a container for SoEngineOutput objects.
Definition: SoEngineOutputList.h:31
SoFieldContainer::notify
virtual void notify(SoNotList *l)
Definition: SoFieldContainer.cpp:636
SoBase::destroy
virtual void destroy(void)
Definition: SoBase.cpp:286
SoFieldContainer::readInstance
virtual SbBool readInstance(SoInput *in, unsigned short flags)
Definition: SoFieldContainer.cpp:1038
SoEngineOutput
The SoEngineOutput class is the output slots in SoEngine instances.SoEngineOutput has methods for con...
Definition: SoEngineOutput.h:36
SoEngineOutputData
The SoEngineOutputData class is a container for a prototype set of outputs.This class is instantiated...
Definition: SoOutputData.h:40
SoInput
The SoInput class is an abstraction of file import functionality.This class takes care of most of the...
Definition: SoInput.h:52
SoFieldData
The SoFieldData class is a container for a prototype set of fields.This class is instantiated once fo...
Definition: SoFieldData.h:39
SoNotList
The SoNotList class is a list of SoNotRec notification records.
Definition: SoNotification.h:34
SoType
The SoType class is the basis for the run-time type system in Coin.Many of the classes in the Coin li...
Definition: SoType.h:50
SbName
The SbName class stores strings by reference.The class is used by Coin for storing keywords...
Definition: SbName.h:31

Copyright © 1998-2010 by Kongsberg Oil & Gas Technologies. All rights reserved.