Show
Ignore:
Timestamp:
11/09/10 14:23:43 (3 years ago)
Author:
robert
Message:

Refactored the versioning of serializers so it now uses a _firstVersion and _lastVersion make it possible
to specify what range of versions support each serializer.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/include/osgDB/Serializer

    r11902 r11903  
    2121#include <osgDB/InputStream> 
    2222#include <osgDB/OutputStream> 
     23 
    2324#include <string> 
    2425#include <sstream> 
    25  
     26#include <limits.h> 
    2627 
    2728namespace osgDB 
     
    127128    }; 
    128129 
    129     BaseSerializer() : _version(0) {} 
     130    BaseSerializer() : _firstVersion(0), _lastVersion(INT_MAX) {} 
     131 
    130132    virtual bool read( InputStream&, osg::Object& ) = 0; 
    131133    virtual bool write( OutputStream&, const osg::Object& ) = 0; 
     
    133135 
    134136protected: 
    135     int _version;  // Library version when the serializer is added, or removed (neg value) 
     137    int _firstVersion;  // Library version when the serializer is first introduced 
     138    int _lastVersion;  // Library version when the serializer is last required. 
    136139}; 
    137140