OpenSceneGraph  3.5.1
Classes | Namespaces | Macros | Typedefs | Functions
Serializer File Reference
#include <osg/ref_ptr>
#include <osg/Notify>
#include <osg/Object>
#include <osgDB/InputStream>
#include <osgDB/OutputStream>
#include <string>
#include <sstream>
#include <limits.h>

Classes

class  osgDB::IntLookup
 
class  osgDB::UserLookupTableProxy
 
class  osgDB::BaseSerializer
 
class  osgDB::UserSerializer< C >
 
class  osgDB::TemplateSerializer< P >
 
class  osgDB::PropByValSerializer< C, P >
 
class  osgDB::PropByRefSerializer< C, P >
 
class  osgDB::MatrixSerializer< C >
 
class  osgDB::GLenumSerializer< C, P >
 
class  osgDB::StringSerializer< C >
 
class  osgDB::ObjectSerializer< C, P >
 
class  osgDB::ImageSerializer< C, P >
 
class  osgDB::EnumSerializer< C, P, B >
 
class  osgDB::ListSerializer< C, P >
 
class  osgDB::VectorBaseSerializer
 
class  osgDB::VectorSerializer< C, P >
 
class  osgDB::IsAVectorSerializer< C >
 
class  osgDB::MapIteratorObject
 
class  osgDB::MapBaseSerializer
 
class  osgDB::MapSerializer< C, P >
 
struct  osgDB::MapSerializer< C, P >::MapIterator
 
struct  osgDB::MapSerializer< C, P >::ReverseMapIterator
 
class  osgDB::BitFlagsSerializer< C, P >
 

Namespaces

 osgDB
 The osgDB library provides support for reading and writing scene graphs, providing a plugin framework and file utility classes.
 

Macros

#define OSGDB__SERIALIZER
 
#define OBJECT_CAST   static_cast
 
#define BEGIN_USER_TABLE(NAME, CLASS)
 
#define ADD_USER_VALUE(VALUE)   lookup->add(#VALUE, MyClass::VALUE)
 
#define END_USER_TABLE()   }
 
#define USER_READ_FUNC(NAME, FUNCNAME)
 
#define USER_WRITE_FUNC(NAME, FUNCNAME)
 
#define ADD_SERIALIZER(S)   wrapper->addSerializer( (S) )
 
#define ADD_USER_SERIALIZER(PROP)
 
#define ADD_BOOL_SERIALIZER(PROP, DEF)
 
#define ADD_CHAR_SERIALIZER(PROP, DEF)
 
#define ADD_UCHAR_SERIALIZER(PROP, DEF)
 
#define ADD_SHORT_SERIALIZER(PROP, DEF)
 
#define ADD_USHORT_SERIALIZER(PROP, DEF)
 
#define ADD_HEXSHORT_SERIALIZER(PROP, DEF)
 
#define ADD_INT_SERIALIZER(PROP, DEF)
 
#define ADD_INT_SERIALIZER_NO_SET(PROP, DEF)
 
#define ADD_UINT_SERIALIZER(PROP, DEF)
 
#define ADD_UINT_SERIALIZER_NO_SET(PROP, DEF)
 
#define ADD_GLINT_SERIALIZER(PROP, DEF)
 
#define ADD_HEXINT_SERIALIZER(PROP, DEF)
 
#define ADD_FLOAT_SERIALIZER(PROP, DEF)
 
#define ADD_DOUBLE_SERIALIZER(PROP, DEF)
 
#define ADD_REF_BOOL_SERIALIZER(PROP, DEF)
 
#define ADD_REF_CHAR_SERIALIZER(PROP, DEF)
 
#define ADD_REF_UCHAR_SERIALIZER(PROP, DEF)
 
#define ADD_REF_SHORT_SERIALIZER(PROP, DEF)
 
#define ADD_REF_USHORT_SERIALIZER(PROP, DEF)
 
#define ADD_REF_HEXSHORT_SERIALIZER(PROP, DEF)
 
#define ADD_REF_INT_SERIALIZER(PROP, DEF)
 
#define ADD_REF_UINT_SERIALIZER(PROP, DEF)
 
#define ADD_REF_GLINT_SERIALIZER(PROP, DEF)
 
#define ADD_REF_HEXINT_SERIALIZER(PROP, DEF)
 
#define ADD_REF_FLOAT_SERIALIZER(PROP, DEF)
 
#define ADD_REF_DOUBLE_SERIALIZER(PROP, DEF)
 
#define ADD_VEC2B_SERIALIZER(PROP, DEF)
 
#define ADD_VEC2UB_SERIALIZER(PROP, DEF)
 
#define ADD_VEC2S_SERIALIZER(PROP, DEF)
 
#define ADD_VEC2US_SERIALIZER(PROP, DEF)
 
#define ADD_VEC2I_SERIALIZER(PROP, DEF)
 
#define ADD_VEC2UI_SERIALIZER(PROP, DEF)
 
#define ADD_VEC2F_SERIALIZER(PROP, DEF)
 
#define ADD_VEC2D_SERIALIZER(PROP, DEF)
 
#define ADD_VEC2_SERIALIZER(PROP, DEF)   ADD_VEC2F_SERIALIZER(PROP, DEF)
 
#define ADD_VEC3B_SERIALIZER(PROP, DEF)
 
#define ADD_VEC3UB_SERIALIZER(PROP, DEF)
 
#define ADD_VEC3S_SERIALIZER(PROP, DEF)
 
#define ADD_VEC3US_SERIALIZER(PROP, DEF)
 
#define ADD_VEC3I_SERIALIZER(PROP, DEF)
 
#define ADD_VEC3UI_SERIALIZER(PROP, DEF)
 
#define ADD_VEC3F_SERIALIZER(PROP, DEF)
 
#define ADD_VEC3D_SERIALIZER(PROP, DEF)
 
#define ADD_VEC3_SERIALIZER(PROP, DEF)   ADD_VEC3F_SERIALIZER(PROP, DEF)
 
#define ADD_VEC4B_SERIALIZER(PROP, DEF)
 
#define ADD_VEC4UB_SERIALIZER(PROP, DEF)
 
#define ADD_VEC4S_SERIALIZER(PROP, DEF)
 
#define ADD_VEC4US_SERIALIZER(PROP, DEF)
 
#define ADD_VEC4I_SERIALIZER(PROP, DEF)
 
#define ADD_VEC4UI_SERIALIZER(PROP, DEF)
 
#define ADD_VEC4F_SERIALIZER(PROP, DEF)
 
#define ADD_VEC4D_SERIALIZER(PROP, DEF)
 
#define ADD_VEC4_SERIALIZER(PROP, DEF)   ADD_VEC4F_SERIALIZER(PROP, DEF)
 
#define ADD_QUAT_SERIALIZER(PROP, DEF)
 
#define ADD_PLANE_SERIALIZER(PROP, DEF)
 
#define ADD_MATRIXF_SERIALIZER(PROP, DEF)
 
#define ADD_MATRIXD_SERIALIZER(PROP, DEF)
 
#define ADD_MATRIX_SERIALIZER(PROP, DEF)
 
#define ADD_BOUNDINGBOXF_SERIALIZER(PROP, DEF)
 
#define ADD_BOUNDINGBOXD_SERIALIZER(PROP, DEF)
 
#define ADD_BOUNDINGSPHEREF_SERIALIZER(PROP, DEF)
 
#define ADD_BOUNDINGSPHERED_SERIALIZER(PROP, DEF)
 
#define ADD_GLENUM_SERIALIZER(PROP, TYPE, DEF)
 
#define ADD_GLENUM_SERIALIZER_NO_SET(PROP, TYPE, DEF)
 
#define ADD_STRING_SERIALIZER(PROP, DEF)
 
#define ADD_OBJECT_SERIALIZER(PROP, TYPE, DEF)
 
#define ADD_OBJECT_SERIALIZER_NO_SET(PROP, TYPE, DEF)
 
#define ADD_IMAGE_SERIALIZER(PROP, TYPE, DEF)
 
#define ADD_LIST_SERIALIZER(PROP, TYPE)
 
#define ADD_VECTOR_SERIALIZER(PROP, TYPE, ELEMENTTYPE, NUMELEMENTSONROW)
 
#define ADD_ISAVECTOR_SERIALIZER(PROP, ELEMENTTYPE, NUMELEMENTSONROW)   wrapper->addSerializer( new osgDB::IsAVectorSerializer< MyClass >( #PROP, ELEMENTTYPE, NUMELEMENTSONROW), osgDB::BaseSerializer::RW_VECTOR )
 
#define BEGIN_ENUM_SERIALIZER(PROP, DEF)
 
#define BEGIN_ENUM_SERIALIZER2(PROP, TYPE, DEF)
 
#define BEGIN_ENUM_SERIALIZER3(PROP, DEF)
 
#define BEGIN_ENUM_SERIALIZER4(PROPERTIES_CLASS, PROP, DEF)
 
#define BEGIN_ENUM_SERIALIZER_NO_SET(PROP, DEF)
 
#define ADD_ENUM_VALUE(VALUE)   serializer->add(#VALUE, MyClass::VALUE)
 
#define ADD_ENUM_CLASS_VALUE(CLASS, VALUE)   serializer->add(#VALUE, CLASS::VALUE)
 
#define END_ENUM_SERIALIZER()   wrapper->addSerializer(serializer.get(), osgDB::BaseSerializer::RW_ENUM); }
 
#define BEGIN_BITFLAGS_SERIALIZER(PROP, DEF)
 defaults to uint bitfield type. More...
 
#define BEGIN_UINT_BITFLAGS_SERIALIZER(PROP, DEF)
 
#define BEGIN_INT_BITFLAGS_SERIALIZER(PROP, DEF)
 
#define ADD_BITFLAG_VALUE(VALUE_NAME, VALUE)   serializer->add(#VALUE_NAME, VALUE)
 
#define END_BITFLAGS_SERIALIZER()   wrapper->addSerializer(serializer.get(), osgDB::BaseSerializer::RW_INT); }
 
#define UPDATE_TO_VERSION(VER)   wrapper->setUpdatedVersion( (VER) );
 
#define UPDATE_TO_VERSION_SCOPED(VER)   osgDB::UpdateWrapperVersionProxy uwvp(wrapper, (VER));
 
#define REMOVE_SERIALIZER(PROP)   wrapper->markSerializerAsRemoved( #PROP );
 
#define ADD_MAP_SERIALIZER(PROP, TYPE, KEYTYPE, ELEMENTTYPE)
 
#define ADD_METHOD_OBJECT(METHODNAME, METHODOBJECTCLASS)   wrapper->addMethodObject(METHODNAME, new METHODOBJECTCLASS());
 
#define ADD_METHOD(METHODNAME)
 
#define SET_USAGE(VALUE)   wrapper->getLastSerializer()->setUsage(VALUE)
 

Typedefs

typedef std::vector< std::string > osgDB::StringList
 

Functions

OSGDB_EXPORT void osgDB::split (const std::string &src, StringList &list, char separator=' ')
 

Macro Definition Documentation

#define ADD_BITFLAG_VALUE (   VALUE_NAME,
  VALUE 
)    serializer->add(#VALUE_NAME, VALUE)
#define ADD_BOOL_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, bool >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_BOOL )
#define ADD_BOUNDINGBOXD_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::BoundingBoxd >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_BOUNDINGBOXD )
#define ADD_BOUNDINGBOXF_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::BoundingBoxf >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_BOUNDINGBOXF )
#define ADD_BOUNDINGSPHERED_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::BoundingSphered >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_BOUNDINGSPHERED )
#define ADD_BOUNDINGSPHEREF_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::BoundingSpheref >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_BOUNDINGSPHEREF )
#define ADD_CHAR_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, char >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_CHAR )
#define ADD_DOUBLE_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, double >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_DOUBLE )
#define ADD_ENUM_CLASS_VALUE (   CLASS,
  VALUE 
)    serializer->add(#VALUE, CLASS::VALUE)
#define ADD_ENUM_VALUE (   VALUE)    serializer->add(#VALUE, MyClass::VALUE)
#define ADD_FLOAT_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, float >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_FLOAT )
#define ADD_GLENUM_SERIALIZER (   PROP,
  TYPE,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::GLenumSerializer< MyClass, TYPE >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_GLENUM )
#define ADD_GLENUM_SERIALIZER_NO_SET (   PROP,
  TYPE,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::GLenumSerializer< MyClass, TYPE >( \
#PROP, DEF, &MyClass::get##PROP, 0), osgDB::BaseSerializer::RW_GLENUM )
#define ADD_GLINT_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, GLint >( \
#PROP, ((int)(DEF)), &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_INT )
#define ADD_HEXINT_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, unsigned int >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP, true), osgDB::BaseSerializer::RW_UINT )
#define ADD_HEXSHORT_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, unsigned short >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP, true), osgDB::BaseSerializer::RW_USHORT )
#define ADD_IMAGE_SERIALIZER (   PROP,
  TYPE,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::ImageSerializer< MyClass, TYPE >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_IMAGE )
#define ADD_INT_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, int >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_INT )
#define ADD_INT_SERIALIZER_NO_SET (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, int >( \
#PROP, DEF, &MyClass::get##PROP, 0), osgDB::BaseSerializer::RW_INT )
#define ADD_ISAVECTOR_SERIALIZER (   PROP,
  ELEMENTTYPE,
  NUMELEMENTSONROW 
)    wrapper->addSerializer( new osgDB::IsAVectorSerializer< MyClass >( #PROP, ELEMENTTYPE, NUMELEMENTSONROW), osgDB::BaseSerializer::RW_VECTOR )
#define ADD_LIST_SERIALIZER (   PROP,
  TYPE 
)
Value:
wrapper->addSerializer( new osgDB::ListSerializer< MyClass, TYPE >( \
#PROP, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_LIST )
#define ADD_MAP_SERIALIZER (   PROP,
  TYPE,
  KEYTYPE,
  ELEMENTTYPE 
)
Value:
wrapper->addSerializer( new osgDB::MapSerializer< MyClass, TYPE >( \
#PROP, &MyClass::get##PROP, &MyClass::get##PROP, &MyClass::set##PROP, KEYTYPE, ELEMENTTYPE), osgDB::BaseSerializer::RW_MAP )
#define ADD_MATRIX_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::MatrixSerializer< MyClass >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_MATRIX )
#define ADD_MATRIXD_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Matrixd >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_MATRIXD )
#define ADD_MATRIXF_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Matrixf >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_MATRIXF )
#define ADD_METHOD (   METHODNAME)
Value:
{ \
struct MethodCaller : public osgDB::MethodObject \
{ \
virtual bool run(void* objectPtr, osg::Parameters&, osg::Parameters&) const \
{ \
MyClass* obj = reinterpret_cast<MyClass*>(objectPtr); \
obj->METHODNAME(); \
return true; \
} \
}; \
wrapper->addMethodObject(#METHODNAME, new MethodCaller()); \
}
#define ADD_METHOD_OBJECT (   METHODNAME,
  METHODOBJECTCLASS 
)    wrapper->addMethodObject(METHODNAME, new METHODOBJECTCLASS());
#define ADD_OBJECT_SERIALIZER (   PROP,
  TYPE,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::ObjectSerializer< MyClass, TYPE >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_OBJECT )
#define ADD_OBJECT_SERIALIZER_NO_SET (   PROP,
  TYPE,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::ObjectSerializer< MyClass, TYPE >( \
#PROP, DEF, &MyClass::get##PROP, 0), osgDB::BaseSerializer::RW_OBJECT )
#define ADD_PLANE_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Plane >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_PLANE )
#define ADD_QUAT_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Quat >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_QUAT )
#define ADD_REF_BOOL_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, bool >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_BOOL )
#define ADD_REF_CHAR_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, char >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_CHAR )
#define ADD_REF_DOUBLE_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, double >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_DOUBLE )
#define ADD_REF_FLOAT_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, float >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_FLOAT )
#define ADD_REF_GLINT_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, GLint >( \
#PROP, ((int)(DEF)), &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_INT )
#define ADD_REF_HEXINT_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, unsigned int >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP, true), osgDB::BaseSerializer::RW_UINT )
#define ADD_REF_HEXSHORT_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, unsigned short >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP, true), osgDB::BaseSerializer::RW_USHORT )
#define ADD_REF_INT_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, int >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_INT )
#define ADD_REF_SHORT_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, short >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_SHORT )
#define ADD_REF_UCHAR_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, unsigned char >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_UCHAR )
#define ADD_REF_UINT_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, unsigned int >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_UINT )
#define ADD_REF_USHORT_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, unsigned short >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_USHORT )
#define ADD_SERIALIZER (   S)    wrapper->addSerializer( (S) )
#define ADD_SHORT_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, short >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_SHORT )
#define ADD_STRING_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::StringSerializer< MyClass >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_STRING )
#define ADD_UCHAR_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, unsigned char >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_UCHAR )
#define ADD_UINT_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, unsigned int >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_UINT )
#define ADD_UINT_SERIALIZER_NO_SET (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, unsigned int >( \
#PROP, DEF, &MyClass::get##PROP, 0), osgDB::BaseSerializer::RW_UINT )
#define ADD_USER_SERIALIZER (   PROP)
Value:
wrapper->addSerializer( new osgDB::UserSerializer<MyClass>( \
#PROP, &check##PROP, &read##PROP, &write##PROP), osgDB::BaseSerializer::RW_USER )
#define ADD_USER_VALUE (   VALUE)    lookup->add(#VALUE, MyClass::VALUE)
#define ADD_USHORT_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByValSerializer< MyClass, unsigned short >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_USHORT )
#define ADD_VEC2_SERIALIZER (   PROP,
  DEF 
)    ADD_VEC2F_SERIALIZER(PROP, DEF)
#define ADD_VEC2B_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec2b >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC2B )
#define ADD_VEC2D_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec2d >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC2D )
#define ADD_VEC2F_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec2f >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC2F )
#define ADD_VEC2I_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec2i >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC2I )
#define ADD_VEC2S_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec2s >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC2S )
#define ADD_VEC2UB_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec2ub >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC2UB )
#define ADD_VEC2UI_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec2ui >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC2UI )
#define ADD_VEC2US_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec2us >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC2US )
#define ADD_VEC3_SERIALIZER (   PROP,
  DEF 
)    ADD_VEC3F_SERIALIZER(PROP, DEF)
#define ADD_VEC3B_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec3b >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC3B )
#define ADD_VEC3D_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec3d >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC3D )
#define ADD_VEC3F_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec3f >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC3F )
#define ADD_VEC3I_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec3i >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC3I )
#define ADD_VEC3S_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec3s >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC3S )
#define ADD_VEC3UB_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec3ub >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC3UB )
#define ADD_VEC3UI_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec3ui >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC3UI )
#define ADD_VEC3US_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec3us >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC3US )
#define ADD_VEC4_SERIALIZER (   PROP,
  DEF 
)    ADD_VEC4F_SERIALIZER(PROP, DEF)
#define ADD_VEC4B_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec4b >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC4B )
#define ADD_VEC4D_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec4d >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC4D )
#define ADD_VEC4F_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec4f >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC4F )
#define ADD_VEC4I_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec4i >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC4I )
#define ADD_VEC4S_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec4s >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC4S )
#define ADD_VEC4UB_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec4ub >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC4UB )
#define ADD_VEC4UI_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec4ui >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC4UI )
#define ADD_VEC4US_SERIALIZER (   PROP,
  DEF 
)
Value:
wrapper->addSerializer( new osgDB::PropByRefSerializer< MyClass, osg::Vec4us >( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP), osgDB::BaseSerializer::RW_VEC4US )
#define ADD_VECTOR_SERIALIZER (   PROP,
  TYPE,
  ELEMENTTYPE,
  NUMELEMENTSONROW 
)
Value:
wrapper->addSerializer( new osgDB::VectorSerializer< MyClass, TYPE >( \
#PROP, &MyClass::get##PROP, &MyClass::get##PROP, &MyClass::set##PROP, ELEMENTTYPE, NUMELEMENTSONROW), osgDB::BaseSerializer::RW_VECTOR )
#define BEGIN_BITFLAGS_SERIALIZER (   PROP,
  DEF 
)
Value:
{ typedef osgDB::BitFlagsSerializer<MyClass> MySerializer; \
osg::ref_ptr<MySerializer> serializer = new MySerializer( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP)

defaults to uint bitfield type.

#define BEGIN_ENUM_SERIALIZER (   PROP,
  DEF 
)
Value:
{ typedef osgDB::EnumSerializer<MyClass, MyClass::PROP, void> MySerializer; \
osg::ref_ptr<MySerializer> serializer = new MySerializer( \
#PROP, MyClass::DEF, &MyClass::get##PROP, &MyClass::set##PROP)
#define BEGIN_ENUM_SERIALIZER2 (   PROP,
  TYPE,
  DEF 
)
Value:
{ typedef osgDB::EnumSerializer<MyClass, TYPE, void> MySerializer; \
osg::ref_ptr<MySerializer> serializer = new MySerializer( \
#PROP, MyClass::DEF, &MyClass::get##PROP, &MyClass::set##PROP)
#define BEGIN_ENUM_SERIALIZER3 (   PROP,
  DEF 
)
Value:
{ typedef osgDB::EnumSerializer<MyClass, MyClass::PROP, bool> MySerializer; \
osg::ref_ptr<MySerializer> serializer = new MySerializer( \
#PROP, MyClass::DEF, &MyClass::get##PROP, &MyClass::set##PROP)
#define BEGIN_ENUM_SERIALIZER4 (   PROPERTIES_CLASS,
  PROP,
  DEF 
)
Value:
{ typedef osgDB::EnumSerializer<MyClass, PROPERTIES_CLASS::PROP, void> MySerializer; \
osg::ref_ptr<MySerializer> serializer = new MySerializer( \
#PROP, PROPERTIES_CLASS::DEF, &MyClass::get##PROP, &MyClass::set##PROP)
#define BEGIN_ENUM_SERIALIZER_NO_SET (   PROP,
  DEF 
)
Value:
{ typedef osgDB::EnumSerializer<MyClass, MyClass::PROP, void> MySerializer; \
osg::ref_ptr<MySerializer> serializer = new MySerializer( \
#PROP, MyClass::DEF, &MyClass::get##PROP, 0)
#define BEGIN_INT_BITFLAGS_SERIALIZER (   PROP,
  DEF 
)
Value:
{ typedef osgDB::BitFlagsSerializer<MyClass, int> MySerializer; \
osg::ref_ptr<MySerializer> serializer = new MySerializer( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP)
#define BEGIN_UINT_BITFLAGS_SERIALIZER (   PROP,
  DEF 
)
Value:
{ typedef osgDB::BitFlagsSerializer<MyClass, unsigned int> MySerializer; \
osg::ref_ptr<MySerializer> serializer = new MySerializer( \
#PROP, DEF, &MyClass::get##PROP, &MyClass::set##PROP)
#define BEGIN_USER_TABLE (   NAME,
  CLASS 
)
Value:
static void add_user_value_func_##NAME(osgDB::IntLookup*); \
static osgDB::UserLookupTableProxy s_user_lookup_table_##NAME(&add_user_value_func_##NAME); \
static void add_user_value_func_##NAME(osgDB::IntLookup* lookup) { typedef CLASS MyClass
#define END_BITFLAGS_SERIALIZER ( )    wrapper->addSerializer(serializer.get(), osgDB::BaseSerializer::RW_INT); }
#define END_ENUM_SERIALIZER ( )    wrapper->addSerializer(serializer.get(), osgDB::BaseSerializer::RW_ENUM); }
#define END_USER_TABLE ( )    }
#define OBJECT_CAST   static_cast
#define OSGDB__SERIALIZER
#define REMOVE_SERIALIZER (   PROP)    wrapper->markSerializerAsRemoved( #PROP );
#define SET_USAGE (   VALUE)    wrapper->getLastSerializer()->setUsage(VALUE)
#define UPDATE_TO_VERSION (   VER)    wrapper->setUpdatedVersion( (VER) );
#define UPDATE_TO_VERSION_SCOPED (   VER)    osgDB::UpdateWrapperVersionProxy uwvp(wrapper, (VER));
#define USER_READ_FUNC (   NAME,
  FUNCNAME 
)
Value:
static int FUNCNAME(osgDB::InputStream& is) { \
int value; if (is.isBinary()) is >> value; \
else { std::string str; is >> str; \
value = (s_user_lookup_table_##NAME)._lookup.getValue(str.c_str()); } \
return value; }
#define USER_WRITE_FUNC (   NAME,
  FUNCNAME 
)
Value:
static void FUNCNAME(osgDB::OutputStream& os, int value) { \
if (os.isBinary()) os << value; \
else os << (s_user_lookup_table_##NAME)._lookup.getString(value); } \

osg logo
Generated at Wed Nov 11 2015 22:14:24 for the OpenSceneGraph by doxygen 1.8.10.