- Timestamp:
- 01/16/08 16:07:40 (1 year ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/Carsten_PtrWork2/Source/System/FileIO/OSB/OSGNFIOBase.cpp
r1023 r1039 87 87 std::list<NFIOBase::fcInfo> NFIOBase::_fieldList; 88 88 89 std::list<FieldContainer Ptr>NFIOBase::_fcList;89 std::list<FieldContainerRefPtr> NFIOBase::_fcList; 90 90 std::set<UInt32> NFIOBase::_fcSet; 91 91 //NFIOBase::IdMap NFIOBase::_ids; … … 118 118 * This is the main entry point for loading data with the osb loader. 119 119 */ 120 Node Ptr NFIOBase::read(std::istream &is, const std::string &options)120 NodeTransitPtr NFIOBase::read(std::istream &is, const std::string &options) 121 121 { 122 122 _options.init(options); … … 124 124 _in = new BinaryReadHandler(is); 125 125 126 NodePtr node = NullFC; 127 128 FieldContainerPtr fc = readFieldContainer(); 129 node = dynamic_cast<NodePtr>(fc); 126 NodeRefPtr node; 127 128 FieldContainerRefPtr fc = readFieldContainer(); 129 130 node = boost::dynamic_pointer_cast<Node>(fc); 130 131 131 132 delete _in; 132 133 133 return node;134 return NodeTransitPtr(node); 134 135 } 135 136 … … 195 196 * Reads an entire "file" of binary data from the current binary reader. 196 197 */ 197 FieldContainer Ptr NFIOBase::readFieldContainer(void)198 FieldContainerTransitPtr NFIOBase::readFieldContainer(void) 198 199 { 199 200 FDEBUG(("NFIOBase::readFieldContainer\n")); … … 216 217 FWARNING(("NFIOBase::readFieldContainer : Couldn't load file " 217 218 "this is not a OpenSG binary file!\n")); 218 return NullFC;219 return FieldContainerTransitPtr(); 219 220 } 220 221 … … 231 232 std::string typeName; 232 233 UInt32 id; 233 FieldContainer Ptr root = NullFC;234 FieldContainer Ptr fc = NullFC;234 FieldContainerRefPtr root; 235 FieldContainerRefPtr fc; 235 236 236 237 // Keep reading field containers until end of file … … 298 299 SceneFileHandler::the()->updateReadProgress(100); 299 300 300 return root;301 return FieldContainerTransitPtr(root); 301 302 } 302 303 … … 676 677 // Note: list grows in reachability behind the scenes as side-effect of writeFC 677 678 FieldContainerPtr lfc; 678 for(std::list<FieldContainer Ptr>::iterator i = _fcList.begin();679 for(std::list<FieldContainerRefPtr>::iterator i = _fcList.begin(); 679 680 i != _fcList.end(); ++i) 680 681 { … … 889 890 { 890 891 _fcSet.insert(id); 891 _fcList.push_back( fc);892 _fcList.push_back(FieldContainerRefPtr(fc)); 892 893 } 893 894 }
