Open Inventor Release 2024.1.0
 
Loading...
Searching...
No Matches
SoUnknownNode.h
Go to the documentation of this file.
1/*=======================================================================
2 * Copyright 1991-1996, Silicon Graphics, Inc.
3 * ALL RIGHTS RESERVED
4 *
5 * UNPUBLISHED -- Rights reserved under the copyright laws of the United
6 * States. Use of a copyright notice is precautionary only and does not
7 * imply publication or disclosure.
8 *
9 * U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND:
10 * Use, duplication or disclosure by the Government is subject to restrictions
11 * as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights
12 * in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or
13 * in similar or successor clauses in the FAR, or the DOD or NASA FAR
14 * Supplement. Contractor/manufacturer is Silicon Graphics, Inc.,
15 * 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311.
16 *
17 * THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY
18 * INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION,
19 * DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY
20 * PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON
21 * GRAPHICS, INC.
22**=======================================================================*/
23/*=======================================================================
24** Author : Dave Immel (MMM yyyy)
25** Modified by : Paul S. Strauss (MMM yyyy)
26** Modified by : Gavin Bell (MMM yyyy)
27**=======================================================================*/
28/*=======================================================================
29 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
30 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
31 *** ***
32 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
33 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
34 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
35 *** ***
36 *** RESTRICTED RIGHTS LEGEND ***
37 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
38 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
39 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
40 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
41 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
42 *** ***
43 *** COPYRIGHT (C) 1996-2014 BY FEI S.A.S, ***
44 *** BORDEAUX, FRANCE ***
45 *** ALL RIGHTS RESERVED ***
46**=======================================================================*/
47/*=======================================================================
48** Modified by : VSG (MMM YYYY)
49**=======================================================================*/
50
51
52#ifndef _SO_UNKNOWN_NODE_
53#define _SO_UNKNOWN_NODE_
54
58
59class SoSFNode;
60class SoMFString;
61class SoChildList;
62
64//
65// Class: SoUnknownNode
66//
67// The Unknown Node! This node is created during file reading when a
68// node is read that is unrecognized by Inventor and a DSO cannot be found
69// for it. Note that even though it is derived from SoGroup, we lie
70// and tell SoType that it is derived from SoNode. This, along with
71// the fact that users are not shipped this header file (so they
72// can't call SoGroup methods directly), has the effect of making the
73// normally public children hidden.
74//
76
77{
78
80
81 public:
82 // Constructor
84
85 private:
86 virtual void write(SoWriteAction *action);
87
88 private:
89 static void initClass();
90 static void exitClass();
91 void setClassName(const SbString& name);
92
93 private:
94 // Reads field type information, fields, and children.
95 virtual SbBool readInstance(SoInput *in, unsigned short flags);
96
97 // Override search so we don't search alternateRep
98 virtual void search(SoSearchAction *action);
99
100 // Returns file format name
101 virtual const char* getFileFormatName() const;
102
103 // Recursively adds this node and all nodes under it to the copy
104 // dictionary. Returns the copy of this node.
105 virtual SoNode * addToCopyDict() const;
106
107 // Copies the contents of the given node into this instance
108 virtual void copyContents(const SoFieldContainer *fromFC,
109 SbBool copyConnections);
110
111 private:
112 // Used during reading to create an alternateRep from an isA
113 // specification.
114 void createFromIsA(SoMFString *isA);
115
116 // Per-instance field data
117 SoFieldData *instanceFieldData;
118
119 // Real class name
121
122 // List of hidden children.
123 SoChildList* hiddenChildren;
124
125 // Destructor
126 virtual ~SoUnknownNode();
127
128 // Will be true if read in with children
129 SbBool hasChildren;
130
131 //force group alternate representation
132 static bool s_forceGroupAlternateRep;
133};
134
135#endif /* _SO_UNKNOWN_NODE_ */
136
137
SoFieldData(const SoFieldData *)
#define SO_NODE_HEADER(className)
Definition SoSubNode.h:151
SoUnknownNode()
Class for smart character strings.
Definition SbString.h:202
Abstract base class for objects that contain fields.
Used to read Open Inventor data files.
Definition SoInput.h:363
Multiple-value field containing any number of strings.
Definition SoMFString.h:116
Abstract base class for all database nodes.
Definition SoNode.h:145
Field containing a a node.
Definition SoSFNode.h:97
Searches for nodes in a scene graph.
Writes a scene graph to a file.
int SbBool
Boolean type.
Definition SbBase.h:87
SoChildList(SoNode *parentNode, int size)