Changeset 1032 for branches/Carsten_PtrWork2/Source/System/FieldContainer/Attachments/OSGStringAttributeMapBase.cpp
- Timestamp:
- 12/12/07 18:00:42 (10 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/Carsten_PtrWork2/Source/System/FieldContainer/Attachments/OSGStringAttributeMapBase.cpp
r1020 r1032 92 92 */ 93 93 94 94 95 95 void StringAttributeMapBase::classDescInserter(TypeObject &oType) 96 96 { 97 97 FieldDescriptionBase *pDesc = NULL; 98 99 98 100 99 pDesc = new MFString::Description( … … 102 101 "keys", 103 102 "", 104 KeysFieldId, KeysFieldMask, 103 KeysFieldId, 104 KeysFieldMask, 105 105 false, 106 106 Field::MFDefaultFlags, 107 107 static_cast<FieldEditMethodSig>(&StringAttributeMapBase::editHandleKeys), 108 static_cast<FieldGetMethodSig >(&StringAttributeMapBase::getHandleKeys)); 109 110 oType.addInitialDesc(pDesc); 111 108 static_cast<FieldGetMethodSig >(&StringAttributeMapBase::getHandleKeys ) ); 109 110 oType.addInitialDesc(pDesc); 111 112 112 113 pDesc = new MFString::Description( 113 114 MFString::getClassType(), 114 115 "values", 115 116 "", 116 ValuesFieldId, ValuesFieldMask, 117 ValuesFieldId, 118 ValuesFieldMask, 117 119 false, 118 120 Field::MFDefaultFlags, 119 121 static_cast<FieldEditMethodSig>(&StringAttributeMapBase::editHandleValues), 120 static_cast<FieldGetMethodSig >(&StringAttributeMapBase::getHandleValues)); 121 122 oType.addInitialDesc(pDesc); 123 } 124 122 static_cast<FieldGetMethodSig >(&StringAttributeMapBase::getHandleValues ) ); 123 124 oType.addInitialDesc(pDesc); 125 126 127 } 125 128 126 129 StringAttributeMapBase::TypeObject StringAttributeMapBase::_type( … … 173 176 "whatever ways are appropriate.\n" 174 177 ); 175 178 176 179 /*------------------------------ get -----------------------------------*/ 177 180 … … 249 252 250 253 //! create a new instance of the class 251 StringAttributeMapPtr StringAttributeMapBase::create(void) 252 { 253 StringAttributeMapPtr fc; 254 StringAttributeMapBase::ObjRefPtr 255 StringAttributeMapBase::create(void) 256 { 257 ObjRefPtr pFC; 254 258 255 259 if(getClassType().getPrototype() != NullFC) 256 260 { 257 fc = dynamic_cast<StringAttributeMap::ObjPtr>(258 getClassType().getPrototype()-> shallowCopy());259 } 260 261 return fc;261 pFC = boost::dynamic_pointer_cast<StringAttributeMap>( 262 getClassType().getPrototype()->shallowCopy()); 263 } 264 265 return pFC; 262 266 } 263 267 … … 272 276 } 273 277 274 FieldContainerPtr StringAttributeMapBase::shallowCopy(void) const 275 { 276 StringAttributeMapPtr returnValue; 278 FieldContainerRefPtr 279 StringAttributeMapBase::shallowCopy(void) const 280 { 281 ObjPtr returnValue; 277 282 278 283 newPtr(returnValue, dynamic_cast<const StringAttributeMap *>(this)); 279 284 280 return returnValue;285 return FieldContainerRefPtr(returnValue); 281 286 } 282 287
