00001 /*======================================================================= 00002 * Copyright 1991-1996, Silicon Graphics, Inc. 00003 * ALL RIGHTS RESERVED 00004 * 00005 * UNPUBLISHED -- Rights reserved under the copyright laws of the United 00006 * States. Use of a copyright notice is precautionary only and does not 00007 * imply publication or disclosure. 00008 * 00009 * U.S. GOVERNMENT RESTRICTED RIGHTS LEGEND: 00010 * Use, duplication or disclosure by the Government is subject to restrictions 00011 * as set forth in FAR 52.227.19(c)(2) or subparagraph (c)(1)(ii) of the Rights 00012 * in Technical Data and Computer Software clause at DFARS 252.227-7013 and/or 00013 * in similar or successor clauses in the FAR, or the DOD or NASA FAR 00014 * Supplement. Contractor/manufacturer is Silicon Graphics, Inc., 00015 * 2011 N. Shoreline Blvd. Mountain View, CA 94039-7311. 00016 * 00017 * THE CONTENT OF THIS WORK CONTAINS CONFIDENTIAL AND PROPRIETARY 00018 * INFORMATION OF SILICON GRAPHICS, INC. ANY DUPLICATION, MODIFICATION, 00019 * DISTRIBUTION, OR DISCLOSURE IN ANY FORM, IN WHOLE, OR IN PART, IS STRICTLY 00020 * PROHIBITED WITHOUT THE PRIOR EXPRESS WRITTEN PERMISSION OF SILICON 00021 * GRAPHICS, INC. 00022 **=======================================================================*/ 00023 /*======================================================================= 00024 ** Author : Dave Immel (MMM yyyy) 00025 ** Modified by : Paul S. Strauss (MMM yyyy) 00026 ** Modified by : Gavin Bell (MMM yyyy) 00027 **=======================================================================*/ 00028 /*======================================================================= 00029 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), *** 00030 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. *** 00031 *** *** 00032 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS *** 00033 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR *** 00034 *** WRITTEN AUTHORIZATION OF FEI S.A.S. *** 00035 *** *** 00036 *** RESTRICTED RIGHTS LEGEND *** 00037 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS *** 00038 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN *** 00039 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT *** 00040 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN *** 00041 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. *** 00042 *** *** 00043 *** COPYRIGHT (C) 1996-2020 BY FEI S.A.S, *** 00044 *** BORDEAUX, FRANCE *** 00045 *** ALL RIGHTS RESERVED *** 00046 **=======================================================================*/ 00047 /*======================================================================= 00048 ** Modified by : VSG (MMM YYYY) 00049 **=======================================================================*/ 00050 00051 00052 #ifndef _SO_UNKNOWN_NODE_ 00053 #define _SO_UNKNOWN_NODE_ 00054 00055 #include <Inventor/fields/SoFieldData.h> 00056 #include <Inventor/nodes/SoGroup.h> 00057 #include <Inventor/nodes/SoSubNode.h> 00058 00059 class SoSFNode; 00060 class SoMFString; 00061 class SoChildList; 00062 00064 // 00065 // Class: SoUnknownNode 00066 // 00067 // The Unknown Node! This node is created during file reading when a 00068 // node is read that is unrecognized by Inventor and a DSO cannot be found 00069 // for it. Note that even though it is derived from SoGroup, we lie 00070 // and tell SoType that it is derived from SoNode. This, along with 00071 // the fact that users are not shipped this header file (so they 00072 // can't call SoGroup methods directly), has the effect of making the 00073 // normally public children hidden. 00074 // 00076 00077 SoUnknownNode : public SoGroup { 00078 00079 SO_NODE_HEADER(SoUnknownNode); 00080 00081 public: 00082 // Constructor 00083 SoUnknownNode(); 00084 00085 private: 00086 virtual void write(SoWriteAction *action); 00087 00088 private: 00089 static void initClass(); 00090 static void exitClass(); 00091 void setClassName(const SbString& name); 00092 00093 private: 00094 // Reads field type information, fields, and children. 00095 virtual SbBool readInstance(SoInput *in, unsigned short flags); 00096 00097 // Override search so we don't search alternateRep 00098 virtual void search(SoSearchAction *action); 00099 00100 // Returns file format name 00101 virtual const char* getFileFormatName() const; 00102 00103 // Recursively adds this node and all nodes under it to the copy 00104 // dictionary. Returns the copy of this node. 00105 virtual SoNode * addToCopyDict() const; 00106 00107 // Copies the contents of the given node into this instance 00108 virtual void copyContents(const SoFieldContainer *fromFC, 00109 SbBool copyConnections); 00110 00111 private: 00112 // Used during reading to create an alternateRep from an isA 00113 // specification. 00114 void createFromIsA(SoMFString *isA); 00115 00116 // Per-instance field data 00117 SoFieldData *instanceFieldData; 00118 00119 // Real class name 00120 SbString className; 00121 00122 // List of hidden children. 00123 SoChildList* hiddenChildren; 00124 00125 // Destructor 00126 virtual ~SoUnknownNode(); 00127 00128 // Will be true if read in with children 00129 SbBool hasChildren; 00130 00131 //force group alternate representation 00132 static bool s_forceGroupAlternateRep; 00133 }; 00134 00135 #endif /* _SO_UNKNOWN_NODE_ */ 00136 00137 00138