Added a special AvailablerReaderWriterIterator class to handle the task

of iterating through the list of available reader writer, whilst handling
cases where the list itself changes size during iteration through the list.
Previous size changes during iteration was cause invalid iterators, which
in turn was causing a crash.
This commit is contained in:
Robert Osfield
2003-12-10 15:24:14 +00:00
parent cfb14b7490
commit 5011d994e8
2 changed files with 98 additions and 140 deletions

View File

@@ -206,12 +206,13 @@ class OSGDB_EXPORT Registry : public osg::Referenced
/** get the attached library with specified name.*/
DynamicLibrary* getLibrary(const std::string& fileName);
protected:
typedef std::vector< osg::ref_ptr<ReaderWriter> > ReaderWriterList;
protected:
virtual ~Registry();
typedef std::map< std::string, osg::ref_ptr<DotOsgWrapper> > DotOsgWrapperMap;
typedef std::vector< osg::ref_ptr<ReaderWriter> > ReaderWriterList;
typedef std::vector< osg::ref_ptr<DynamicLibrary> > DynamicLibraryList;
typedef std::map< std::string, std::string> ExtensionAliasMap;