| 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 | * Copyright (C) 1990,91,92 Silicon Graphics, Inc. |
| 39 | * |
| 40 | _______________________________________________________________________ |
| 41 | ______________ S I L I C O N G R A P H I C S I N C . ____________ |
| 42 | | |
| 43 | | $Revision: 1.1.1.1 $ |
| 44 | | |
| 45 | | Classes: |
| 46 | | SoV1Text3 |
| 47 | | |
| 48 | | Author(s) : Gavin Bell |
| 49 | | |
| 50 | ______________ S I L I C O N G R A P H I C S I N C . ____________ |
| 51 | _______________________________________________________________________ |
| 52 | */ |
| 53 | |
| 54 | #include "SoV1Text3.h"cxx . . $ `<file>/lib/database/src/so/upgraders/SoV1Text3.h`/ |
| 55 | #include <Inventor/nodes/SoText3.h>cxx . . $ `<file>/lib/database/include/Inventor/nodes/SoText3.h`/ |
| 56 | |
| 57 | |
| 58 | SO_NODE_SOURCEcxx . . $ `lib/database/include/Inventor/nodes/SoSubNode.h:241:9`!(SoV1Text3); |
| 59 | |
| 60 | //////////////////////////////////////////////////////////////////////// |
| 61 | // |
| 62 | // Description: |
| 63 | // Default constructor |
| 64 | // |
| 65 | // Use: public |
| 66 | |
| 67 | SoV1Text3cxx . . $ SoV1Text3#::SoV1Text3cxx . . $ SoV1Text3#SoV1Text3(49f6e7a06ebc5aa8).() |
| 68 | // |
| 69 | //////////////////////////////////////////////////////////////////////// |
| 70 | { |
| 71 | SO_NODE_CONSTRUCTORcxx . . $ `lib/database/include/Inventor/nodes/SoSubNode.h:309:9`!(SoV1Text3); |
| 72 | |
| 73 | SO_NODE_ADD_FIELDcxx . . $ `lib/database/include/Inventor/nodes/SoSubNode.h:346:9`!(string, ("")); |
| 74 | SO_NODE_ADD_FIELDcxx . . $ `lib/database/include/Inventor/nodes/SoSubNode.h:346:9`!(spacing, (1.0)); |
| 75 | SO_NODE_ADD_FIELDcxx . . $ `lib/database/include/Inventor/nodes/SoSubNode.h:346:9`!(justification, (LEFT)); |
| 76 | SO_NODE_ADD_FIELDcxx . . $ `lib/database/include/Inventor/nodes/SoSubNode.h:346:9`!(parts, (FRONT)); |
| 77 | |
| 78 | // Set up static info for enumerated type field |
| 79 | SO_NODE_DEFINE_ENUM_VALUEcxx . . $ `lib/database/include/Inventor/nodes/SoSubNode.h:378:9`!(Justification, LEFT); |
| 80 | SO_NODE_DEFINE_ENUM_VALUEcxx . . $ `lib/database/include/Inventor/nodes/SoSubNode.h:378:9`!(Justification, RIGHT); |
| 81 | SO_NODE_DEFINE_ENUM_VALUEcxx . . $ `lib/database/include/Inventor/nodes/SoSubNode.h:378:9`!(Justification, CENTER); |
| 82 | |
| 83 | // Set up static info for enumerated type field |
| 84 | SO_NODE_DEFINE_ENUM_VALUEcxx . . $ `lib/database/include/Inventor/nodes/SoSubNode.h:378:9`!(Part, SIDES); |
| 85 | SO_NODE_DEFINE_ENUM_VALUEcxx . . $ `lib/database/include/Inventor/nodes/SoSubNode.h:378:9`!(Part, FRONT); |
| 86 | SO_NODE_DEFINE_ENUM_VALUEcxx . . $ `lib/database/include/Inventor/nodes/SoSubNode.h:378:9`!(Part, BACK); |
| 87 | SO_NODE_DEFINE_ENUM_VALUEcxx . . $ `lib/database/include/Inventor/nodes/SoSubNode.h:378:9`!(Part, ALL); |
| 88 | |
| 89 | // Set up info in enumerated type field |
| 90 | SO_NODE_SET_SF_ENUM_TYPEcxx . . $ `lib/database/include/Inventor/fields/SoSFEnum.h:155:9`!(justification, Justification); |
| 91 | SO_NODE_SET_SF_ENUM_TYPEcxx . . $ `lib/database/include/Inventor/fields/SoSFEnum.h:155:9`!(parts, Part); |
| 92 | |
| 93 | isBuiltIncxx . . $ SoFieldContainer#isBuiltIn. = TRUEcxx . . $ `lib/database/include/Inventor/SbBasic.h:80:12`!; |
| 94 | } |
| 95 | |
| 96 | //////////////////////////////////////////////////////////////////////// |
| 97 | // |
| 98 | // Description: |
| 99 | // Destructor. |
| 100 | // |
| 101 | // Use: private |
| 102 | |
| 103 | SoV1Text3cxx . . $ SoV1Text3#::~cxx . . $ SoV1Text3#`~SoV1Text3`(49f6e7a06ebc5aa8).SoV1Text3cxx . . $ SoV1Text3#() |
| 104 | // |
| 105 | //////////////////////////////////////////////////////////////////////// |
| 106 | { |
| 107 | } |
| 108 | |
| 109 | //////////////////////////////////////////////////////////////////////// |
| 110 | // |
| 111 | // Description: |
| 112 | // Create a version 2.1 SoText3. |
| 113 | // |
| 114 | // Use: private |
| 115 | |
| 116 | SoNodecxx . . $ SoNode# * |
| 117 | SoV1Text3cxx . . $ SoV1Text3#::createNewNodecxx . . $ SoV1Text3#createNewNode(37b0c20759e6fed3).() |
| 118 | // |
| 119 | //////////////////////////////////////////////////////////////////////// |
| 120 | { |
| 121 | SoText3cxx . . $ SoText3# *result = SO_UPGRADER_CREATE_NEWcxx . . $ `lib/database/include/Inventor/misc/upgraders/SoUpgrader.h:161:9`!(SoText3); |
| 122 | |
| 123 | // If the parts field is default, change it to ALL (since the |
| 124 | // default changed from ALL to FRONT from 1.0 to 2.0). |
| 125 | if (partscxx . . $ SoV1Text3#parts..isDefaultcxx . . $ SoField#isDefault(455f465bc33b4cdf).()) { |
| 126 | result->partscxx . . $ SoText3#parts..setValuecxx . . $ SoSFEnum#setValue(d4f767463ce0a6b3).(SoText3cxx . . $ SoText3#::ALLcxx . . $ SoText3#ALL.); |
| 127 | } else { |
| 128 | result->partscxx . . $ SoText3#parts..setValuecxx . . $ SoSFEnum#setValue(d4f767463ce0a6b3).(partscxx . . $ SoV1Text3#parts..getValuecxx . . $ SoSFEnum#getValue(455f465bc33b4cdf).()); |
| 129 | } |
| 130 | result->spacingcxx . . $ SoText3#spacing..setValuecxx . . $ SoSFFloat#setValue(9364e6e7bff7660).(spacingcxx . . $ SoV1Text3#spacing..getValuecxx . . $ SoSFFloat#getValue(5036dfe8d4170af2).()); |
| 131 | result->justificationcxx . . $ SoText3#justification..setValuecxx . . $ SoSFEnum#setValue(d4f767463ce0a6b3).(justificationcxx . . $ SoV1Text3#justification..getValuecxx . . $ SoSFEnum#getValue(455f465bc33b4cdf).()); |
| 132 | |
| 133 | for (int i = 0; i < stringcxx . . $ SoV1Text3#string..getNumcxx . . $ SoMField#getNum(455f465bc33b4cdf).(); i++) { |
| 134 | result->stringcxx . . $ SoText3#string..set1Valuecxx . . $ SoMFString#set1Value(443c7ea177b07959).(i, stringcxx . . $ SoV1Text3#string.[cxx . . $ SoMFString#`operator[]`(1f64d4776649c045).i]); |
| 135 | } |
| 136 | |
| 137 | return result; |
| 138 | } |