Tizen Native API
Dali::TypeInfo Class Reference

TypeInfo class for instantiation of registered types and introspection of their actions and signals. More...

Inheritance diagram for Dali::TypeInfo:
Dali::BaseHandle

Public Types

typedef BaseHandle(* CreateFunction )()
 Function signature for creating an instance of the associated object type.
typedef bool(* ActionFunction )(BaseObject *, const std::string &, const Property::Map &)
 Function signature for creating scriptable actions.
typedef bool(* SignalConnectorFunction )(BaseObject *object, ConnectionTrackerInterface *tracker, const std::string &signalName, FunctorDelegate *functor)
 Connects a callback function with the object's signals.
typedef void(* SetPropertyFunction )(BaseObject *object, Property::Index index, const Property::Value &value)
 Callback to set an event-thread only property.
typedef Property::Value(* GetPropertyFunction )(BaseObject *object, Property::Index index)
 Callback to get the value of an event-thread only property.

Public Member Functions

 TypeInfo ()
 Allows the creation of an empty TypeInfo handle.
 ~TypeInfo ()
 Destructor.
 TypeInfo (const TypeInfo &handle)
 This copy constructor is required for (smart) pointer semantics.
TypeInfooperator= (const TypeInfo &rhs)
 This assignment operator is required for (smart) pointer semantics.
const std::string & GetName () const
 Retrieve the type name for this type.
const std::string & GetBaseName () const
 Retrieve the base type name for this type.
BaseHandle CreateInstance () const
 Create an object from this type.
CreateFunction GetCreator () const
 Retrieve the creator function for this type.
size_t GetActionCount () const
 Retrieve the number of actions for this type.
std::string GetActionName (size_t index)
 Retrieve the action name for the index.
size_t GetSignalCount () const
 Retrieve the number of signals for this type.
std::string GetSignalName (size_t index)
 Retrieve the signal name for the index.
size_t GetPropertyCount () const
 Retrieve the number of event side type registered properties for this type.
void GetPropertyIndices (Property::IndexContainer &indices) const
 Retrieve all the property indices for this type.
const std::string & GetPropertyName (Property::Index index) const
 Given a property index, retrieve the property name associated with it.

Detailed Description

TypeInfo class for instantiation of registered types and introspection of their actions and signals.

See TypeRegistry for methods of type registration and TypeInfo retrieval.

Since :
2.4

Member Typedef Documentation

typedef bool(* Dali::TypeInfo::ActionFunction)(BaseObject *, const std::string &, const Property::Map &)

Function signature for creating scriptable actions.

Since :
2.4

Function signature for creating an instance of the associated object type.

Since :
2.4

Callback to get the value of an event-thread only property.

Since :
2.4
Parameters:
[in]objectThe object whose property value is required.
[in]indexThe index of the property required.
Returns:
The current value of the property for the object specified.
See also:
PropertyRegistration.
typedef void(* Dali::TypeInfo::SetPropertyFunction)(BaseObject *object, Property::Index index, const Property::Value &value)

Callback to set an event-thread only property.

Since :
2.4
Parameters:
[in]objectThe object whose property should be set.
[in]indexThe index of the property being set.
[in]valueThe new value of the property for the object specified.
See also:
PropertyRegistration.
typedef bool(* Dali::TypeInfo::SignalConnectorFunction)(BaseObject *object, ConnectionTrackerInterface *tracker, const std::string &signalName, FunctorDelegate *functor)

Connects a callback function with the object's signals.

Since :
2.4
Parameters:
[in]objectThe object providing the signal.
[in]trackerUsed to disconnect the signal.
[in]signalNameThe signal to connect to.
[in]functorA newly allocated FunctorDelegate.
Returns:
True if the signal was connected.
Postcondition:
If a signal was connected, ownership of functor was passed to CallbackBase. Otherwise the caller is responsible for deleting the unused functor.

Constructor & Destructor Documentation

Allows the creation of an empty TypeInfo handle.

Since :
2.4

Destructor.

This is non-virtual since derived Handle types must not contain data or virtual methods.

Since :
2.4
Dali::TypeInfo::TypeInfo ( const TypeInfo handle)

This copy constructor is required for (smart) pointer semantics.

Since :
2.4
Parameters:
[in]handleA reference to the copied handle

Member Function Documentation

Create an object from this type.

Since :
2.4
Returns:
the BaseHandle for the newly created object

Retrieve the number of actions for this type.

Since :
2.4
Returns:
The count
std::string Dali::TypeInfo::GetActionName ( size_t  index)

Retrieve the action name for the index.

Since :
2.4
Parameters:
[in]indexIndex to lookup
Returns:
action name or empty string where index is invalid
const std::string& Dali::TypeInfo::GetBaseName ( ) const

Retrieve the base type name for this type.

Since :
2.4
Returns:
string of base name

Retrieve the creator function for this type.

Since :
2.4
Returns:
the creator function
const std::string& Dali::TypeInfo::GetName ( ) const

Retrieve the type name for this type.

Since :
2.4
Returns:
string name

Retrieve the number of event side type registered properties for this type.

This count does not include all properties

Since :
2.4
Returns:
The count

Retrieve all the property indices for this type.

Since :
2.4
Parameters:
[out]indicesContainer of property indices
Note:
The container will be cleared
const std::string& Dali::TypeInfo::GetPropertyName ( Property::Index  index) const

Given a property index, retrieve the property name associated with it.

Since :
2.4
Parameters:
[in]indexThe property index.
Returns:
The name of the property at the given index.
Exceptions:
DaliExceptionIf index is not valid.

Retrieve the number of signals for this type.

Since :
2.4
Returns:
The count
std::string Dali::TypeInfo::GetSignalName ( size_t  index)

Retrieve the signal name for the index.

Since :
2.4
Parameters:
[in]indexIndex to lookup
Returns:
signal name or empty string where index is invalid
TypeInfo& Dali::TypeInfo::operator= ( const TypeInfo rhs)

This assignment operator is required for (smart) pointer semantics.

Since :
2.4
Parameters:
[in]rhsA reference to the copied handle
Returns:
A reference to this