Code Search for Developers
 
 
  

IReflectedValue.h from osgDesigner at Krugle


Show IReflectedValue.h syntax highlighted

#ifndef __IREFLECTEDVALUE_H__
#define __IREFLECTEDVALUE_H__

#include <string>
#include <osg/Referenced>
#include <osgIntrospection/Type>

#include <osgIntrospectionToolKit/Export.h>

namespace osgIntrospectionToolKit
{   
    class OSGINTROSPECTIONTOOLKIT_EXPORT IReflectedValue: public osg::Referenced
    {
        public:
            IReflectedValue()
            :   osg::Referenced()
            {}
            
            enum Scope
            {
                Instance,
                Pointer,
                RefPointer
            };
            
            virtual Scope                                               valueScope() const = 0;
            
            virtual void                                                getValue(std::string& value) const = 0;
            
            virtual const osgIntrospection::Type&                       type() const = 0;
            virtual const osgIntrospection::Type&                       instanceType() const = 0;
            virtual const osgIntrospection::Type&                       pointedType() const
            {
                return (type().getPointedType());
            }
            
            void                                                        getTypeName(std::string& typeName) const
            {
                const osgIntrospection::Type& t = type();
                typeName = ( (t.isDefined()) ? (t.getQualifiedName()) : (t.getStdTypeInfo().name()) );
            }
            
            void                                                        getInstanceTypeName(std::string& typeName) const
            {
                const osgIntrospection::Type& t = instanceType();
                typeName = ( (t.isDefined()) ? (t.getQualifiedName()) : (t.getStdTypeInfo().name()) );
            }
            
            void                                                        getPointedTypeName(std::string& typeName) const
            {
                if (type().isDefined())
                {
                    const osgIntrospection::Type& tp = type().getPointedType();
                
                    typeName = ((tp.isDefined()) ? (tp.getQualifiedName()) : (tp.getStdTypeInfo().name()));
                }
                else
                    typeName = type().getStdTypeInfo().name();
            }
        protected:
            virtual ~IReflectedValue()
            {}
    };
}

#endif // ** __IREFLECTEDVALUE_H__ ** //




See more files for this project here

osgDesigner

osgDesigner is a graphical tool used to modify an OpenSceneGraph (OSG) scene using the osgIntrospection framework. OpenSceneGraph developpers will be able to extend osgDesigner at need using (editor | render | osgIntrospection wrapper) plugin system.

Project homepage: http://sourceforge.net/projects/osgdesigner
Programming language(s): C++,Shell Script
License: other

  CArrayItemLink.h
  CIndexedItemLink.h
  CPropertyExtractor.h
  CReflectedInstance.h
  CReflectedPointer.h
  CReflectedRefPointer.h
  CReflectedValueLinkExtractor.h
  CValueTree.h
  CValueTreeFunctor.h
  CValueTreeModifier.h
  CommonStdType.h
  ControlList.h
  ExceptionUtility.h
  Export.h
  IGraph.h
  IReflectedValue.h
  IReflectedValueLink.h
  SMemoryManager.h
  STypeGraph.h
  SWrapperManager.h
  signalslib.hpp