root/OpenSceneGraph/trunk/src/osgWrappers/serializers/osg/ValueObject.cpp @ 13041

Revision 13041, 2.6 kB (checked in by robert, 2 years ago)

Ran script to remove trailing spaces and tabs

Line 
1#include <osg/ValueObject>
2#include <osgDB/ObjectWrapper>
3#include <osgDB/InputStream>
4#include <osgDB/OutputStream>
5#include <osg/Notify>
6#include <string.h>
7
8#define WRAPVALUEOBJECT( TYPE, INHERITANCE_STRING, SERIALIZER_TYPE, DEFAULT) \
9    namespace Wrap##TYPE \
10    { \
11        REGISTER_OBJECT_WRAPPER( TYPE, \
12                                new osg::TYPE, \
13                                osg::TYPE, \
14                                INHERITANCE_STRING ) \
15        { \
16            SERIALIZER_TYPE( Value, DEFAULT ); \
17        } \
18    } \
19
20
21WRAPVALUEOBJECT( BoolValueObject, "osg::Object osg::BoolValueObject", ADD_REF_BOOL_SERIALIZER, 0)
22WRAPVALUEOBJECT( CharValueObject, "osg::Object osg::CharValueObject", ADD_REF_CHAR_SERIALIZER, 0)
23WRAPVALUEOBJECT( UCharValueObject, "osg::Object osg::UCharValueObject", ADD_REF_UCHAR_SERIALIZER, 0u)
24WRAPVALUEOBJECT( ShortValueObject, "osg::Object osg::ShortValueObject", ADD_REF_SHORT_SERIALIZER, 0)
25WRAPVALUEOBJECT( UShortValueObject, "osg::Object osg::UShortValueObject", ADD_REF_USHORT_SERIALIZER, 0u)
26WRAPVALUEOBJECT( IntValueObject, "osg::Object osg::IntValueObject", ADD_REF_INT_SERIALIZER, 0)
27WRAPVALUEOBJECT( UIntValueObject, "osg::Object osg::UIntValueObject", ADD_REF_UINT_SERIALIZER, 0u)
28WRAPVALUEOBJECT( FloatValueObject, "osg::Object osg::FloatValueObject", ADD_REF_FLOAT_SERIALIZER, 0.0f)
29WRAPVALUEOBJECT( DoubleValueObject, "osg::Object osg::DoubleValueObject", ADD_REF_DOUBLE_SERIALIZER, 0.0)
30
31WRAPVALUEOBJECT( StringValueObject, "osg::Object osg::StringValueObject", ADD_STRING_SERIALIZER, std::string())
32
33WRAPVALUEOBJECT( Vec2fValueObject, "osg::Object osg::Vec2fValueObject", ADD_VEC2F_SERIALIZER, osg::Vec2f())
34WRAPVALUEOBJECT( Vec3fValueObject, "osg::Object osg::Vec3fValueObject", ADD_VEC3F_SERIALIZER, osg::Vec3f())
35WRAPVALUEOBJECT( Vec4fValueObject, "osg::Object osg::Vec4fValueObject", ADD_VEC4F_SERIALIZER, osg::Vec4f())
36
37WRAPVALUEOBJECT( Vec2dValueObject, "osg::Object osg::Vec2dValueObject", ADD_VEC2D_SERIALIZER, osg::Vec2d())
38WRAPVALUEOBJECT( Vec3dValueObject, "osg::Object osg::Vec3dValueObject", ADD_VEC3D_SERIALIZER, osg::Vec3d())
39WRAPVALUEOBJECT( Vec4dValueObject, "osg::Object osg::Vec4dValueObject", ADD_VEC4D_SERIALIZER, osg::Vec4d())
40
41WRAPVALUEOBJECT( PlaneValueObject, "osg::Object osg::PlaneValueObject", ADD_PLANE_SERIALIZER, osg::Plane())
42WRAPVALUEOBJECT( QuatValueObject, "osg::Object osg::QuatValueObject", ADD_QUAT_SERIALIZER, osg::Quat())
43
44WRAPVALUEOBJECT( MatrixfValueObject, "osg::Object osg::MatrixfValueObject", ADD_MATRIXF_SERIALIZER, osg::Matrixf())
45WRAPVALUEOBJECT( MatrixdValueObject, "osg::Object osg::MatrixdValueObject", ADD_MATRIXD_SERIALIZER, osg::Matrixd())
Note: See TracBrowser for help on using the browser.