Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

osgIntrospection Namespace Reference

The osgIntrospection library provides the an introspection/reflection framework for non intrusive run-time querying and calling of class properties and methods. More...


Classes

class  NoDefaultValueAttribute
 By adding this attribute to a PropertyInfo you specify that there is no default value for that property. More...

class  DefaultValueAttribute
 By adding this attribute to a PropertyInfo you specify a custom default value for that property. More...

struct  PropertyGetter
 Base struct for custom property getters. More...

class  CustomPropertyGetAttribute
 By setting an attribute of this class you can specify a custom object that will be used to retrieve the value of a property instead of the default getter method. More...

struct  PropertySetter
 Base struct for custom property setters. More...

class  CustomPropertySetAttribute
 By setting an attribute of this class you can specify a custom object that will be used to set the value of a property instead of the default setter method. More...

struct  PropertyCounter
 Base struct for custom array property counters. More...

class  CustomPropertyCountAttribute
 By setting an attribute of this class you can specify a custom object that will be used to count the number of items in an array property. More...

struct  PropertyAdder
 Base struct for custom array property adders. More...

class  CustomPropertyAddAttribute
 By setting an attribute of this class you can specify a custom object that will be used to add a new item to an array property. More...

struct  PropertyRemover
 Base struct for custom array property removers. More...

class  CustomPropertyRemoveAttribute
 By setting an attribute of this class you can specify a custom object that will be used to remove an item from an array property. More...

struct  IndexInfo
 This struct allows customization of an indexed property's index set. More...

class  CustomIndexAttribute
 By default each index in an indexed property is assumed to be an enumeration. More...

class  PropertyTypeAttribute
 Attribute for overriding the type of a property with a custom type. More...

class  IndexTypeAttribute
 Attribute for overriding the type of an index (of an indexed property) with a custom type. More...

struct  Comparator
struct  TotalOrderComparator
struct  PartialOrderComparator
class  ConstructorInfo
struct  Converter
class  CompositeConverter
struct  StaticConverter
struct  DynamicConverter
struct  ReinterpretConverter
struct  ConverterProxy
class  CustomAttribute
 The base class for custom attributes. More...

class  CustomAttributeProvider
 This is the base class for custom attribute providers, that is objects that can be assigned a list of custom attributes. More...

class  Exception
struct  ReflectionException
struct  TypeNotDefinedException
struct  TypeIsAbstractException
struct  ConstructorNotFoundException
struct  InvokeNotImplementedException
struct  InvalidFunctionPointerException
struct  ConstIsConstException
struct  EmptyValueException
struct  TypeNotFoundException
struct  MethodNotFoundException
struct  StreamWriteErrorException
struct  StreamReadErrorException
class  StreamingNotSupportedException
struct  TypeConversionException
class  PropertyAccessException
struct  IndexValuesNotDefinedException
struct  ComparisonNotPermittedException
struct  ComparisonOperatorNotSupportedException
struct  ObjectInstanceCreator
 The ObjectInstanceCreator struct template is a collection of static methods that provide the means for creating instances of object types dynamically. More...

struct  ValueInstanceCreator
struct  DummyInstanceCreator
class  MethodInfo
 Class MethodInfo stores information about a class method. More...

class  ParameterInfo
 This class stores information about a function parameter. More...

class  PropertyInfo
 This class keeps information about a class' property. More...

class  ReaderWriter
 This is the base class for reader/writer objects. More...

class  ReaderWriter::Options
class  StdReaderWriter
 This class template provides basic default streaming capabilities for all types that define streaming operators (<< and >>). More...

class  EnumReaderWriter
 This ReaderWriter can be used to read and write enumeration values. More...

class  PtrReaderWriter
 This is a ReaderWriter class that can be used to read and write pointer values. More...

struct  TypeInfoCmp
 This predicate compares two instances of std::type_info for equality. More...

class  Reflection
 This class provides basic reflection services such as registration of new types and queries on the global type map. More...

struct  Reflection::StaticData
struct  is_polymorphic
 Compile-time polymorphism detector. More...

struct  is_polymorphic::dummy1
struct  is_polymorphic::dummy2
class  Reflector
 A Reflector is a proxy class that is used to create a new description of a given type. More...

struct  Reflector::PtrConstructor
struct  Reflector::ConstPtrConstructor
struct  ValueReflector
 This reflector ought to be used to describe types that can be created on the stack. More...

struct  AbstractObjectReflector
 This reflector is to be used to describe abstract types that can't be instantiated. More...

struct  ObjectReflector
 This reflector is to be used to describe types that ought to be created on the heap. More...

struct  AtomicValueReflector
 This reflector is a ValueReflector that should be used to define types that can be read and written from/to streams using the << and >> operators. More...

struct  EnumReflector
 This reflector is a ValueReflector that should be used to define enumerations. More...

struct  StdVectorReflector
 This class allows to define the means for reflecting STL containers such as std::deque and std::vector. More...

struct  StdVectorReflector::Getter
struct  StdVectorReflector::Setter
struct  StdVectorReflector::Counter
struct  StdVectorReflector::Adder
struct  StdVectorReflector::Remover
struct  StdSetReflector
 This class allows to define the means for reflecting STL containers such as std::set and std::multiset. More...

struct  StdSetReflector::Getter
struct  StdSetReflector::Counter
struct  StdSetReflector::Adder
struct  StdSetReflector::Remover
struct  StdListReflector
 This class allows to define the means for reflecting STL containers that cannot be indexed directly, such as std::list. More...

struct  StdListReflector::Getter
struct  StdListReflector::Setter
struct  StdListReflector::Counter
struct  StdListReflector::Adder
struct  StdListReflector::Remover
struct  StdMapReflector
 This class allows to define the means for reflecting STL associative containers which hold pairs of key+value, such as std::map. More...

struct  StdMapReflector::Getter
struct  StdMapReflector::Setter
struct  StdMapReflector::Indexer
struct  StdPairReflector
struct  StdPairReflector::Accessor
class  StaticMethodInfo0
 Class templates StaticMethodInfoN (where 0 <= N <= 16) are concrete implementations of MethodInfo. More...

class  StaticMethodInfo1
class  StaticMethodInfo2
class  StaticMethodInfo3
class  StaticMethodInfo4
class  StaticMethodInfo5
class  StaticMethodInfo6
class  StaticMethodInfo7
class  StaticMethodInfo8
class  StaticMethodInfo9
class  StaticMethodInfo10
class  StaticMethodInfo11
class  StaticMethodInfo12
class  StaticMethodInfo13
class  StaticMethodInfo14
class  StaticMethodInfo15
class  StaticMethodInfo16
class  StaticMethodInfo0< C, void >
class  StaticMethodInfo1< C, void, P0 >
class  StaticMethodInfo2< C, void, P0, P1 >
class  StaticMethodInfo3< C, void, P0, P1, P2 >
class  StaticMethodInfo4< C, void, P0, P1, P2, P3 >
class  StaticMethodInfo5< C, void, P0, P1, P2, P3, P4 >
class  StaticMethodInfo6< C, void, P0, P1, P2, P3, P4, P5 >
class  StaticMethodInfo7< C, void, P0, P1, P2, P3, P4, P5, P6 >
class  StaticMethodInfo8< C, void, P0, P1, P2, P3, P4, P5, P6, P7 >
class  StaticMethodInfo9< C, void, P0, P1, P2, P3, P4, P5, P6, P7, P8 >
class  StaticMethodInfo10< C, void, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9 >
class  StaticMethodInfo11< C, void, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10 >
class  StaticMethodInfo12< C, void, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11 >
class  StaticMethodInfo13< C, void, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12 >
class  StaticMethodInfo14< C, void, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13 >
class  StaticMethodInfo15< C, void, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14 >
class  StaticMethodInfo16< C, void, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15 >
class  Type
 Objects of class Type are used to maintain information about reflected types. More...

struct  TypedConstructorInfo0
struct  TypedConstructorInfo1
struct  TypedConstructorInfo2
struct  TypedConstructorInfo3
struct  TypedConstructorInfo4
struct  TypedConstructorInfo5
struct  TypedConstructorInfo6
struct  TypedConstructorInfo7
struct  TypedConstructorInfo8
struct  TypedConstructorInfo9
struct  TypedConstructorInfo10
struct  TypedConstructorInfo11
struct  TypedConstructorInfo12
struct  TypedConstructorInfo13
struct  TypedConstructorInfo14
struct  TypedConstructorInfo15
struct  TypedConstructorInfo16
class  TypedMethodInfo0
 Class templates TypedMethodInfoN (where 0 <= N <= 16) are concrete implementations of MethodInfo. More...

class  TypedMethodInfo1
class  TypedMethodInfo2
class  TypedMethodInfo3
class  TypedMethodInfo4
class  TypedMethodInfo5
class  TypedMethodInfo6
class  TypedMethodInfo7
class  TypedMethodInfo8
class  TypedMethodInfo9
class  TypedMethodInfo10
class  TypedMethodInfo11
class  TypedMethodInfo12
class  TypedMethodInfo13
class  TypedMethodInfo14
class  TypedMethodInfo15
class  TypedMethodInfo16
class  TypedMethodInfo0< C, void >
class  TypedMethodInfo1< C, void, P0 >
class  TypedMethodInfo2< C, void, P0, P1 >
class  TypedMethodInfo3< C, void, P0, P1, P2 >
class  TypedMethodInfo4< C, void, P0, P1, P2, P3 >
class  TypedMethodInfo5< C, void, P0, P1, P2, P3, P4 >
class  TypedMethodInfo6< C, void, P0, P1, P2, P3, P4, P5 >
class  TypedMethodInfo7< C, void, P0, P1, P2, P3, P4, P5, P6 >
class  TypedMethodInfo8< C, void, P0, P1, P2, P3, P4, P5, P6, P7 >
class  TypedMethodInfo9< C, void, P0, P1, P2, P3, P4, P5, P6, P7, P8 >
class  TypedMethodInfo10< C, void, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9 >
class  TypedMethodInfo11< C, void, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10 >
class  TypedMethodInfo12< C, void, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11 >
class  TypedMethodInfo13< C, void, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12 >
class  TypedMethodInfo14< C, void, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13 >
class  TypedMethodInfo15< C, void, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14 >
class  TypedMethodInfo16< C, void, P0, P1, P2, P3, P4, P5, P6, P7, P8, P9, P10, P11, P12, P13, P14, P15 >
struct  TypeNameAliasProxy
class  Value
struct  Value::Instance_base
struct  Value::Instance
struct  Value::Instance_box_base
struct  Value::Instance_box
struct  Value::Ptr_instance_box

Typedefs

typedef std::vector< const
Converter * > 
ConverterList
typedef std::vector< const
CustomAttribute * > 
CustomAttributeList
typedef std::vector< const
CustomAttributeProvider * > 
CustomAttributeProviderList
typedef std::map< const std::type_info *,
Type *, TypeInfoCmp
TypeMap
 A map of types, indexed by their associated type_info structure.

typedef std::vector< const
MethodInfo * > 
MethodInfoList
typedef std::vector< const
PropertyInfo * > 
PropertyInfoList
typedef std::vector< const
ParameterInfo * > 
ParameterInfoList
typedef std::vector< const
ConstructorInfo * > 
ConstructorInfoList
typedef std::map< int, std::string > EnumLabelMap
typedef std::vector< ValueValueList
 A vector of values.


Functions

bool operator== (const Type &t1, const Type &t2)
 Equality test operator.

bool operator!= (const Type &t1, const Type &t2)
 Inequality test operator.

bool operator< (const Type &t1, const Type &t2)
 Less than operator.

bool operator>= (const Type &t1, const Type &t2)
 Greater than or equal to operator. Returns !operator<().

bool OSGINTROSPECTION_EXPORT areParametersCompatible (const ParameterInfoList &pl1, const ParameterInfoList &pl2)
bool OSGINTROSPECTION_EXPORT areArgumentsCompatible (const ValueList &vl, const ParameterInfoList &pl, float &match)
template<typename T> void convertArgument (ValueList &src, ValueList &dest, const ParameterInfoList &pl, int index)
template<typename T> const T & getInstance (const Value &instance)
template<typename T> T & getInstance (Value &instance)
template<typename T> T variant_cast (const Value &v)
 Tries to convert an instance of Value to an object of type T.

template<typename T> bool requires_conversion (const Value &v)
 Returns true if the Value passed as parameter can't be casted to the specified type without a (potentially slow) conversion.

template<typename T> T * extract_raw_data (Value &v)
 Returns a typed pointer to the data contained in a Value instance.

template<typename T> const T * extract_raw_data (const Value &v)
 Returns a typed pointer to the data contained in a const Value instance.


Detailed Description

The osgIntrospection library provides the an introspection/reflection framework for non intrusive run-time querying and calling of class properties and methods.

osgIntrospection is ideal for providing non native language binding to the OpenSceneGraph, convenient means for editing properties in a generic way, such as required in scene graph editors, and also facilitates the automatic serealization of objects.

osgIntrospection can be used to provide introspection support to 3rd Party libraries without the need to modify them to add this support, the wrappers providing the actual binding can be automatically generated by parsing header files via gen_wrapper utility. All the core OpenSceneGraph libraries have pre built wrappers available for you use.


Typedef Documentation

typedef std::vector<const ConstructorInfo* > osgIntrospection::ConstructorInfoList
 

typedef std::vector< const Converter * > osgIntrospection::ConverterList
 

typedef std::vector<const CustomAttribute* > osgIntrospection::CustomAttributeList
 

typedef std::vector<const CustomAttributeProvider *> osgIntrospection::CustomAttributeProviderList
 

typedef std::map<int, std::string> osgIntrospection::EnumLabelMap
 

typedef std::vector<const MethodInfo* > osgIntrospection::MethodInfoList
 

typedef std::vector<const ParameterInfo* > osgIntrospection::ParameterInfoList
 

typedef std::vector<const PropertyInfo* > osgIntrospection::PropertyInfoList
 

typedef std::map<const std::type_info* , Type* , TypeInfoCmp> osgIntrospection::TypeMap
 

A map of types, indexed by their associated type_info structure.

typedef std::vector<Value> osgIntrospection::ValueList
 

A vector of values.


Function Documentation

bool OSGINTROSPECTION_EXPORT areArgumentsCompatible const ValueList &  vl,
const ParameterInfoList &  pl,
float &  match
 

bool OSGINTROSPECTION_EXPORT areParametersCompatible const ParameterInfoList &  pl1,
const ParameterInfoList &  pl2
 

template<typename T>
void convertArgument ValueList &  src,
ValueList &  dest,
const ParameterInfoList &  pl,
int  index
 

template<typename T>
const T* extract_raw_data const Value &  v  ) 
 

Returns a typed pointer to the data contained in a const Value instance.

If the value's type is not identical to type T, a null pointer is returned.

template<typename T>
T* extract_raw_data Value &  v  ) 
 

Returns a typed pointer to the data contained in a Value instance.

If the value's type is not identical to type T, a null pointer is returned.

template<typename T>
T& getInstance Value &  instance  ) 
 

template<typename T>
const T& getInstance const Value &  instance  ) 
 

bool operator!= const Type &  t1,
const Type &  t2
[inline]
 

Inequality test operator.

Returns false if the two instances of Type describe the same type, true otherwise.

bool operator< const Type &  t1,
const Type &  t2
[inline]
 

Less than operator.

Returns true if the first type comes before the second one. The actual ordering is implementation-dependent.

bool operator== const Type &  t1,
const Type &  t2
[inline]
 

Equality test operator.

Returns true if the two instances of Type describe the same type, false otherwise.

bool operator>= const Type &  t1,
const Type &  t2
[inline]
 

Greater than or equal to operator. Returns !operator<().

template<typename T>
bool requires_conversion const Value &  v  ) 
 

Returns true if the Value passed as parameter can't be casted to the specified type without a (potentially slow) conversion.

Returns false otherwise.

template<typename T>
T variant_cast const Value &  v  ) 
 

Tries to convert an instance of Value to an object of type T.

If T is a plain type or a pointer type (either const or non-const), and it matches the type of the value contained in v, then the actual value of type T is returned. If T is a [const] reference type, and its base (non reference) type matches the internal value's type, then a [const] reference to the internal value is returned. If none of the above conditions are met, a conversion is attempted as described in Value::convert() and then variant_cast is called again with the converted value as parameter. If the conversion can't be completed, an exception is thrown. Conversions that attempt to make a const pointer non-const will fail.


Generated at Thu Nov 24 16:24:21 2005 for the OpenSceneGraph by doxygen 1.3.6.