Inheritance diagram for osgIntrospection::PropertyInfo:
Public Member Functions | |
PropertyInfo (const Type &decltype, const Type &ptype, const std::string &name, const MethodInfo *getm, const MethodInfo *setm) | |
PropertyInfo (const Type &decltype, const Type &ptype, const std::string &name, const MethodInfo *getm, const MethodInfo *setm, const MethodInfo *numm, const MethodInfo *addm, const MethodInfo *remm) | |
int | getNumIndices () const |
Returns the number of indices. | |
virtual const std::string & | getName () const |
Returns the name of the property being described. | |
virtual const Type & | getDeclaringType () const |
Returns the type that declares the property. | |
const Type & | getPropertyType () const |
Returns the type of the reflected property. | |
const MethodInfo * | getGetMethod () const |
Returns the getter method. | |
const MethodInfo * | getSetMethod () const |
Returns the setter method. | |
const MethodInfo * | getCountMethod () const |
Returns the counter method. | |
const MethodInfo * | getAddMethod () const |
Returns the adder method. | |
const MethodInfo * | getRemoveMethod () const |
Returns the remover method. | |
bool | canGet () const |
Returns whether the property's value can be retrieved. | |
bool | canSet () const |
Returns whether the property's value can be set. | |
bool | canCount () const |
Returns whether the property's array of values can be counted. | |
bool | canAdd () const |
Returns whether items can be added to the array property. | |
bool | canRemove () const |
Returns whether items can be removed from the array property. | |
bool | isSimple () const |
Returns whether the property is simple. | |
bool | isIndexed () const |
Returns whether the property is indexed. | |
bool | isArray () const |
Returns whether the property is an array. | |
const ParameterInfoList & | getIndexParameters () const |
void | getIndexValueSet (int whichindex, const Value &instance, ValueList &values) const |
Value | getValue (const Value &instance) const |
Value | getValue (Value &instance) const |
void | setValue (Value &instance, const Value &value) const |
Value | getIndexedValue (Value &instance, ValueList &indices) const |
Value | getIndexedValue (const Value &instance, ValueList &indices) const |
void | setIndexedValue (Value &instance, ValueList &indices, const Value &value) const |
int | getNumArrayItems (const Value &instance) const |
Value | getArrayItem (const Value &instance, int i) const |
Value | getArrayItem (Value &instance, int i) const |
void | setArrayItem (Value &instance, int i, const Value &value) const |
void | addArrayItem (Value &instance, const Value &value) const |
void | removeArrayItem (Value &instance, int i) const |
Value | getDefaultValue () const |
Protected Member Functions | |
virtual void | getInheritedProviders (CustomAttributeProviderList &providers) const |
osgIntrospection::PropertyInfo::PropertyInfo | ( | const Type & | decltype, | |
const Type & | ptype, | |||
const std::string & | name, | |||
const MethodInfo * | getm, | |||
const MethodInfo * | setm | |||
) | [inline] |
Direct initialization constructor for simple and indexed properties. You must pass the Type object associated to the class that declares the property, the Type object that describes the type of the property's value, the property name and the getter/setter methods. Either the setter or the getter can be null, meaning a restricted access. If both are null, the user is expected to add a custom accessor attribute to this PropertyInfo object. If the getter method has parameters, the property is considered to be indexed. The same is true if the getter is null and the setter has more than one parameter.
osgIntrospection::PropertyInfo::PropertyInfo | ( | const Type & | decltype, | |
const Type & | ptype, | |||
const std::string & | name, | |||
const MethodInfo * | getm, | |||
const MethodInfo * | setm, | |||
const MethodInfo * | numm, | |||
const MethodInfo * | addm, | |||
const MethodInfo * | remm | |||
) | [inline] |
Invokes the adder method on the given instance and adds an item to the array property. If a custom adder attribute is defined, it will be invoked instead.
bool osgIntrospection::PropertyInfo::canAdd | ( | ) | const [inline] |
Returns whether items can be added to the array property.
bool osgIntrospection::PropertyInfo::canCount | ( | ) | const [inline] |
Returns whether the property's array of values can be counted.
bool osgIntrospection::PropertyInfo::canGet | ( | ) | const [inline] |
Returns whether the property's value can be retrieved.
bool osgIntrospection::PropertyInfo::canRemove | ( | ) | const [inline] |
Returns whether items can be removed from the array property.
bool osgIntrospection::PropertyInfo::canSet | ( | ) | const [inline] |
Returns whether the property's value can be set.
const MethodInfo* osgIntrospection::PropertyInfo::getAddMethod | ( | ) | const [inline] |
Returns the adder method.
Invokes the getter method on the given instance and returns the i-th item of the array property. If a custom getter attribute us defined, it will be invoked instead.
Invokes the getter method on the given const instance and returns the i-th item of the array property. If a custom getter attribute us defined, it will be invoked instead.
const MethodInfo* osgIntrospection::PropertyInfo::getCountMethod | ( | ) | const [inline] |
Returns the counter method.
virtual const Type& osgIntrospection::PropertyInfo::getDeclaringType | ( | ) | const [inline, virtual] |
Returns the type that declares the property.
Value osgIntrospection::PropertyInfo::getDefaultValue | ( | ) | const |
Returns the default value associated to the reflected property. If no default value has been specified, this method tries to create an instance of the property type and then returns its value. There are some attributes that change the behavior of this method, for example NoDefaultValueAttribute.
const MethodInfo* osgIntrospection::PropertyInfo::getGetMethod | ( | ) | const [inline] |
Returns the getter method.
Value osgIntrospection::PropertyInfo::getIndexedValue | ( | const Value & | instance, | |
ValueList & | indices | |||
) | const |
Invokes the getter method on the given instance passing a list of indices and returns the indexed property's value. If a custom getter attribute is defined, it will be invoked instead.
Value osgIntrospection::PropertyInfo::getIndexedValue | ( | Value & | instance, | |
ValueList & | indices | |||
) | const |
Invokes the getter method on the given const instance passing a list of indices and returns the indexed property's value. If a custom getter attribute is defined, it will be invoked instead.
const ParameterInfoList& osgIntrospection::PropertyInfo::getIndexParameters | ( | ) | const |
Returns the list of index parameters. If the property is not indexed, this list is empty. If neither the get method nor the set method are defined, this list is empty unless a custom indexing attribute is defined.
void osgIntrospection::PropertyInfo::getIndexValueSet | ( | int | whichindex, | |
const Value & | instance, | |||
ValueList & | values | |||
) | const |
Returns a list of valid values that can be used for the specified index. If a custom indexing attribute is defined for this property, then it will be queried for the index set, otherwise the index will be treated as an enumeration and the set of enumeration values will be returned.
virtual void osgIntrospection::PropertyInfo::getInheritedProviders | ( | CustomAttributeProviderList & | providers | ) | const [protected, virtual] |
Implements osgIntrospection::CustomAttributeProvider.
virtual const std::string& osgIntrospection::PropertyInfo::getName | ( | ) | const [inline, virtual] |
Returns the name of the property being described.
int osgIntrospection::PropertyInfo::getNumArrayItems | ( | const Value & | instance | ) | const |
Invokes the counter method on the given instance and returns the number of items of the array property. If a custom counter attribute is defined, it will be invoked instead.
int osgIntrospection::PropertyInfo::getNumIndices | ( | ) | const [inline] |
Returns the number of indices.
const Type& osgIntrospection::PropertyInfo::getPropertyType | ( | ) | const [inline] |
Returns the type of the reflected property.
const MethodInfo* osgIntrospection::PropertyInfo::getRemoveMethod | ( | ) | const [inline] |
Returns the remover method.
const MethodInfo* osgIntrospection::PropertyInfo::getSetMethod | ( | ) | const [inline] |
Returns the setter method.
Invokes the getter method on the given instance and returns the property's value. If a custom getter attribute is defined, it will be invoked instead.
Invokes the getter method on the given const instance and returns the property's value. If a custom getter attribute is defined, it will be invoked instead.
bool osgIntrospection::PropertyInfo::isArray | ( | ) | const [inline] |
Returns whether the property is an array.
bool osgIntrospection::PropertyInfo::isIndexed | ( | ) | const [inline] |
Returns whether the property is indexed.
bool osgIntrospection::PropertyInfo::isSimple | ( | ) | const [inline] |
Returns whether the property is simple.
void osgIntrospection::PropertyInfo::removeArrayItem | ( | Value & | instance, | |
int | i | |||
) | const |
Invokes the remover method on the given instance and removes an item from the array property. If a custom remover attribute is defined, it will be invoked instead.
void osgIntrospection::PropertyInfo::setArrayItem | ( | Value & | instance, | |
int | i, | |||
const Value & | value | |||
) | const |
Invokes the setter method on the given instance and sets the i-th item of the array property. If a custom setter attribute is defined, it will be invoked instead.
void osgIntrospection::PropertyInfo::setIndexedValue | ( | Value & | instance, | |
ValueList & | indices, | |||
const Value & | value | |||
) | const |
Invokes the setter method on the given instance passing a list of indices and sets the indexed property's value. If a custom setter attribute is defined, it will be invoked instead.
Invokes the setter method on the given instance and sets the property's value. If a custom setter attribute is defined, it will be invoked instead.