Open Inventor Reference
|
00001 /* 00002 * 00003 * Copyright (C) 2000 Silicon Graphics, Inc. All Rights Reserved. 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Lesser General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2.1 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Lesser General Public License for more details. 00014 * 00015 * Further, this software is distributed without any warranty that it is 00016 * free of the rightful claim of any third person regarding infringement 00017 * or the like. Any license provided herein, whether implied or 00018 * otherwise, applies only to this software file. Patent licenses, if 00019 * any, provided herein do not apply to combinations of this program with 00020 * other software, or any other product whatsoever. 00021 * 00022 * You should have received a copy of the GNU Lesser General Public 00023 * License along with this library; if not, write to the Free Software 00024 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00025 * 00026 * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, 00027 * Mountain View, CA 94043, or: 00028 * 00029 * http://www.sgi.com 00030 * 00031 * For further information regarding this notice, see: 00032 * 00033 * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ 00034 * 00035 */ 00036 00037 00038 /* 00039 * Copyright (C) 1990,91 Silicon Graphics, Inc. 00040 * 00041 _______________________________________________________________________ 00042 ______________ S I L I C O N G R A P H I C S I N C . ____________ 00043 | 00044 | $Revision: 1.1.1.1 $ 00045 | 00046 | Description: 00047 | Defines the SoNodekitParts class. An instance of this class is 00048 | created for each instance of an Nodekit. 00049 | Its function is to describe which 'parts' the nodekit has created 00050 | from its class' SoNodekitCatalog. 00051 | An SoNodekitParts contains a pointer to an SoNodekitCatalog and 00052 | a correlated list of nodes. 00053 | 00054 | If a new part is asked for, this class uses the catalog as a 00055 | guide to create the part. 00056 | 00057 | Author(s) : Paul Isaacs, Thad Beier 00058 | 00059 ______________ S I L I C O N G R A P H I C S I N C . ____________ 00060 _______________________________________________________________________ 00061 */ 00062 00063 #ifndef _SO_NODEKIT_PARTS 00064 #define _SO_NODEKIT_PARTS 00065 00066 #include <Inventor/nodekits/SoNodekitCatalog.h> 00067 00068 class SoNodeKitListPart; 00069 class SoBaseKit; 00070 class SoNode; 00071 class SoFullPath; 00072 class SoSFNode; 00073 00077 SoEXTENDER class INVENTOR_API SoNodekitParts { 00078 00079 SoEXTENDER public: 00081 00083 SoNodekitParts( SoBaseKit *rootOfKit ); 00084 00086 ~SoNodekitParts(); 00087 00088 friend class SoBaseKit; 00089 00090 private: 00091 const SoNodekitCatalog *catalog; 00092 00093 int numEntries; 00094 00095 SoBaseKit *rootPointer; 00096 SoSFNode **fieldList; 00097 00098 00099 SbBool makePart( const int partNum ); 00100 SbBool replacePart( const int partNum, SoNode *newPartNode ); 00101 void unregisterDescendants( const int partNum ); 00102 00103 SoNode *getPartFromThisCatalog( const int partNum, SbBool makeIfNeeded, 00104 SbBool leafCheck, SbBool publicCheck, 00105 SbBool &existedBefore ); 00106 SoFullPath *createPathToPartFromThisCatalog( const int partNum, 00107 SbBool makeIfNeeded, SbBool leafCheck, 00108 SbBool publicCheck, SbBool &existedBefore ); 00109 SbBool setPartFromThisCatalog( const int partNum, 00110 SoNode *newPartNode, 00111 SbBool anyPart ); 00112 00113 SoNode *getSingleNamePart( const SbName &nameOfPart, SbBool makeIfNeeded, 00114 SbBool leafCheck, SbBool publicCheck, 00115 SbBool &existedBefore ); 00116 SoFullPath *getSingleNamePathToPart( const SbName &nameOfPart, 00117 SbBool makeIfNeeded, SbBool leafCheck, 00118 SbBool publicCheck, SbBool &existedBefore ); 00119 SbBool setSingleNamePart( const SbName &nameOfPart, SoNode *newPartNode, 00120 SbBool anyPart ); 00121 00126 SoNode *getAnyPart( const SbName &nameOfPart, SbBool makeIfNeeded, 00127 SbBool leafCheck, SbBool publicCheck ); 00128 SoNode *getAnyPart( const SbName &nameOfPart, SbBool makeIfNeeded, 00129 SbBool leafCheck, SbBool publicCheck, 00130 SbBool &existedBefore); 00131 SoFullPath *createPathToAnyPart( const SbName &nameOfPart, 00132 SbBool makeIfNeeded, SbBool leafCheck, SbBool publicCheck ); 00133 SoFullPath *createPathToAnyPart( const SbName &nameOfPart, 00134 SbBool makeIfNeeded, SbBool leafCheck, 00135 SbBool publicCheck, SbBool &existedBefore ); 00136 SbBool setAnyPart( const SbName &nameOfPart, SoNode *newPartNode, 00137 SbBool anyPart); 00138 00143 SbBool parseListItem( char *parseString, int &index ); 00144 00146 SbBool partIsNonLeafAndMayBeDeleted( int partNum ); 00147 00149 SbBool partFoundCheck( int partNum ); 00150 SbBool partIsLeafCheck( int partNum ); 00151 SbBool partIsPublicCheck( int partNum ); 00152 SbBool verifyPartExistence( int partNum ); 00153 00156 SoFullPath *createPathDownTo( const SbName &nameOfPart, SoNode *theNode ); 00157 00160 SoFullPath *addPaths( const SoFullPath *pathA, 00161 const SoFullPath *pathB ) const; 00162 }; 00163 00164 #endif /* _SO_NODEKIT_PARTS */