Changeset 1032 for branches/Carsten_PtrWork2/Source/System/FieldContainer/Fields/OSGEditSFCPointerFieldHandle.inl
- Timestamp:
- 12/12/07 18:00:42 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/Carsten_PtrWork2/Source/System/FieldContainer/Fields/OSGEditSFCPointerFieldHandle.inl
r1017 r1032 1 /*---------------------------------------------------------------------------*\2 * OpenSG *3 * *4 * *5 * Copyright 2007 by OpenSG Forum *6 * *7 * contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de *8 * *9 \*---------------------------------------------------------------------------*/10 /*---------------------------------------------------------------------------*\11 * License *12 * *13 * This library is free software; you can redistribute it and/or modify it *14 * under the terms of the GNU Library General Public License as published *15 * by the Free Software Foundation, version 2. *16 * *17 * This library is distributed in the hope that it will be useful, but *18 * WITHOUT ANY WARRANTY; without even the implied warranty of *19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *20 * Library General Public License for more details. *21 * *22 * You should have received a copy of the GNU Library General Public *23 * License along with this library; if not, write to the Free Software *24 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. *25 * *26 \*---------------------------------------------------------------------------*/27 /*---------------------------------------------------------------------------*\28 * Changes *29 * *30 * *31 * *32 * *33 * *34 * *35 \*---------------------------------------------------------------------------*/36 37 1 /*---------------------------------------------------------------------------*\ 38 2 * OpenSG * … … 101 65 inline 102 66 EditSFCPointerFieldBaseHandle::EditSFCPointerFieldBaseHandle( 103 Field *pField, 67 Field *pField, 104 68 FieldDescriptionBase const *pDescription) 105 69 … … 159 123 Self const &other) 160 124 161 : Inherited(other) 125 : Inherited (other ), 126 _sfSetFunc(other._sfSetFunc) 162 127 { 163 128 } … … 166 131 inline 167 132 EditSFCPointerFieldHandle<FieldT>::EditSFCPointerFieldHandle( 168 Field *pField, 133 Field *pField, 169 134 FieldDescriptionBase const *pDescription) 170 135 171 : Inherited(pField, pDescription) 136 : Inherited (pField, pDescription), 137 _sfSetFunc( ) 172 138 { 173 139 } … … 256 222 257 223 /*-------------------------------------------------------------------------*/ 224 /* Setup */ 225 226 template <class FieldT> 227 inline void 228 EditSFCPointerFieldHandle<FieldT>::setSetFunc(SFSetFunction const &func) 229 { 230 _sfSetFunc = func; 231 } 232 233 /*-------------------------------------------------------------------------*/ 258 234 /* Operations */ 259 235 … … 269 245 EditSFCPointerFieldHandle<FieldT>::set(FieldContainer * const pNewValue) 270 246 { 271 HandledFieldValueType p CastNewValue =247 HandledFieldValueType pTypedNewValue = 272 248 dynamic_cast<HandledFieldValueType>(pNewValue); 273 274 if(pCastNewValue != NULL) 275 castFieldDown()->setValue(pCastNewValue); 249 250 if(pTypedNewValue != NULL) 251 { 252 _sfSetFunc(pTypedNewValue); 253 } 276 254 } 277 255
