Open Inventor Reference
SoOutputData.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved.
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * Further, this software is distributed without any warranty that it is
16  * free of the rightful claim of any third person regarding infringement
17  * or the like. Any license provided herein, whether implied or
18  * otherwise, applies only to this software file. Patent licenses, if
19  * any, provided herein do not apply to combinations of this program with
20  * other software, or any other product whatsoever.
21  *
22  * You should have received a copy of the GNU Lesser General Public
23  * License along with this library; if not, write to the Free Software
24  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25  *
26  * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
27  * Mountain View, CA 94043, or:
28  *
29  * http://www.sgi.com
30  *
31  * For further information regarding this notice, see:
32  *
33  * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
34  *
35  */
36 
37 
38 /*
39  * Copyright (C) 1990,91 Silicon Graphics, Inc.
40  *
41  _______________________________________________________________________
42  ______________ S I L I C O N G R A P H I C S I N C . ____________
43  |
44  | $Revision: 1.1.1.1 $
45  |
46  | Description:
47  | Definition of the SoEngineOutputData class, which is used by
48  | engines to store information about their outputs. Based on
49  | SoFieldData.
50  |
51  | Author(s) : Paul S. Strauss, Nick Thompson, Gavin Bell
52  |
53  ______________ S I L I C O N G R A P H I C S I N C . ____________
54  _______________________________________________________________________
55  */
56 
57 
58 #ifndef _SO_OUTPUT_DATA_
59 #define _SO_OUTPUT_DATA_
60 
61 #include <Inventor/misc/SoBasic.h>
62 #include <Inventor/SbPList.h>
63 #include <Inventor/SbString.h>
64 #include <Inventor/SoType.h>
65 
66 class SoEngine;
67 class SoFieldContainer;
68 class SoInput;
69 class SoOutput;
70 class SoEngineOutput;
71 
85 
87  public:
90 
92 
94  SoEngineOutputData(int numOutputs) : outputs(numOutputs)
95  { }
96 
99 
102  void addOutput(const SoEngine *defEngine,
103  const char *outputName,
104  const SoEngineOutput *output,
105  SoType type);
106 
108  int getNumOutputs() const { return outputs.getLength(); }
109 
111  const SbName & getOutputName(int index) const;
112 
115  int index) const;
116 
119  int getIndex(const SoEngine *engine,
120  const SoEngineOutput *output) const;
121 
123  const SoType & getType(int index) const;
124 
127  SoEngine *engine) const;
129  SoEngine *engine) const;
130  private:
131  SbPList outputs;
132 };
133 
134 #endif /* _SO_OUTPUT_DATA_ */
#define SoINTERNAL
Definition: SbBasic.h:155
#define INVENTOR_API
Disable some annoying warnings on MSVC 6.
Definition: SbSystem.h:81
Character string stored in a hash table.
Definition: SbString.h:264
List of generic (void *) pointers.
Definition: SbPList.h:78
The SoEngineOutputData class holds data about engine outputs: the number of outputs the engine has,...
Definition: SoOutputData.h:86
void writeDescriptions(SoOutput *out, SoEngine *engine) const
SoEngineOutput * getOutput(const SoEngine *engine, int index) const
Returns pointer to output with given index within given object instance.
~SoEngineOutputData()
Destructor.
SoEngineOutputData()
Default constructor.
Definition: SoOutputData.h:89
int getNumOutputs() const
Returns number of outputs.
Definition: SoOutputData.h:108
int getIndex(const SoEngine *engine, const SoEngineOutput *output) const
Returns index of output, given the output and the engine it is in.
SoEngineOutputData(const SoEngineOutputData *)
const SoType & getType(int index) const
Returns type of output with given index.
const SbName & getOutputName(int index) const
Returns name of output with given index.
void addOutput(const SoEngine *defEngine, const char *outputName, const SoEngineOutput *output, SoType type)
Adds an output to current data, given name of output, a pointer to field within the engine,...
bool readDescriptions(SoInput *in, SoEngine *engine) const
Methods to read and write the output descriptions.
SoEngineOutputData(int numOutputs)
Constructor that takes number of fields as a hint.
Definition: SoOutputData.h:94
Class for all engine outputs.
Definition: SoEngine.h:228
Base class for all engines.
Definition: SoEngine.h:102
Abstract base class for objects that contain fields.
Used to read Inventor data files.
Definition: SoInput.h:128
Used to write Inventor data files.
Definition: SoOutput.h:90
SoType has no virtual functions to keep it small...
Definition: SoType.h:103