/* -*-c++-*- osgPython - Copyright (C) 2006 Miguel Escriva Gregori * * This library is open source and may be redistributed and/or modified under * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or * (at your option) any later version. The full license is in LICENSE file * included with this distribution, and on the openscenegraph.org website. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * OpenSceneGraph Public License for more details. */ #ifndef OSGPYTHON_VALUE #define OSGPYTHON_VALUE 1 #include "Base.h" #include #include #include #include namespace osgPython { class Value : public Base { public: Value(const osgIntrospection::Value& value); virtual boost::python::object getAttr(const std::string&); inline osgIntrospection::Value& getValue() { return _value;} inline const osgIntrospection::Value& getValue() const { return _value;} virtual std::string __str__() const; virtual std::string __repr__() const; boost::python::object __getitem__(const std::string&); void __setitem__(const std::string& idx, boost::python::object &val); static void setTextValue(Value*, const std::string&); static std::string getTextValue(boost::python::object &v); protected: virtual ~Value() { } osgIntrospection::Value _value; osg::ref_ptr _referenced; }; } //end of osgPython namespace #endif