Show CReflectedInstance.h syntax highlighted
#ifndef __CREFLECTEDINSTANCE_H__
#define __CREFLECTEDINSTANCE_H__ 1
#include <string>
#include <osgIntrospectionToolKit/Export.h>
#include <osgIntrospectionToolKit/IReflectedValue.h>
namespace osgIntrospectionToolKit
{
class OSGINTROSPECTIONTOOLKIT_EXPORT CReflectedInstance: public IReflectedValue
{
public:
CReflectedInstance(const osgIntrospection::Type& type)
: IReflectedValue(),
_type(&type)
{}
CReflectedInstance(const osgIntrospection::Type& type, std::string value)
: IReflectedValue(),
_type(&type),
_value(value)
{}
void init(const osgIntrospection::Type& type, std::string value)
{
_type = &type;
_value = value;
}
virtual Scope valueScope() const
{ return (IReflectedValue::Instance); }
virtual void getValue(std::string& value) const
{ value = _value; }
virtual const osgIntrospection::Type& type() const
{ return (*_type); }
virtual const osgIntrospection::Type& instanceType() const
{ return (*_type); }
protected:
virtual ~CReflectedInstance()
{}
private:
const osgIntrospection::Type* _type;
std::string _value;
};
}
#endif // ** __CREFLECTEDINSTANCE_H__ ** //
See more files for this project here