Tizen Native API  3.0
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
 Retrieves the type name for this type.
const std::string & GetBaseName () const
 Retrieves the base type name for this type.
BaseHandle CreateInstance () const
 Creates an object from this type.
CreateFunction GetCreator () const
 Retrieves the creator function for this type.
size_t GetActionCount () const
 Retrieves the number of actions for this type.
std::string GetActionName (size_t index)
 Retrieves the action name for the index.
size_t GetSignalCount () const
 Retrieves the number of signals for this type.
std::string GetSignalName (size_t index)
 Retrieves the signal name for the index.
size_t GetPropertyCount () const
 Retrieves the number of event side type registered properties for this type.
void GetPropertyIndices (Property::IndexContainer &indices) const
 Retrieves 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:
3.0, DALi version 1.0.0

Member Typedef Documentation

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

Function signature for creating scriptable actions.

Since:
3.0, DALi version 1.0.0

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

Since:
3.0, DALi version 1.0.0

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

Since:
3.0, DALi version 1.0.0
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:
3.0, DALi version 1.0.0
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:
3.0, DALi version 1.0.0
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:
3.0, DALi version 1.0.0

Destructor.

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

Since:
3.0, DALi version 1.0.0
Dali::TypeInfo::TypeInfo ( const TypeInfo handle)

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

Since:
3.0, DALi version 1.0.0
Parameters:
[in]handleA reference to the copied handle

Member Function Documentation

Creates an object from this type.

Since:
3.0, DALi version 1.0.0
Returns:
The BaseHandle for the newly created object

Retrieves the number of actions for this type.

Since:
3.0, DALi version 1.0.0
Returns:
The count
std::string Dali::TypeInfo::GetActionName ( size_t  index)

Retrieves the action name for the index.

Since:
3.0, DALi version 1.0.0
Parameters:
[in]indexIndex to lookup
Returns:
Action name or empty string where index is invalid
const std::string& Dali::TypeInfo::GetBaseName ( ) const

Retrieves the base type name for this type.

Since:
3.0, DALi version 1.0.0
Returns:
String of base name

Retrieves the creator function for this type.

Since:
3.0, DALi version 1.0.0
Returns:
The creator function
const std::string& Dali::TypeInfo::GetName ( ) const

Retrieves the type name for this type.

Since:
3.0, DALi version 1.0.0
Returns:
String name

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

This count does not include all properties.

Since:
3.0, DALi version 1.0.0
Returns:
The count

Retrieves all the property indices for this type.

Since:
3.0, DALi version 1.0.0
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:
3.0, DALi version 1.0.0
Parameters:
[in]indexThe property index
Returns:
The name of the property at the given index
Exceptions:
DaliExceptionIf index is not valid.

Retrieves the number of signals for this type.

Since:
3.0, DALi version 1.0.0
Returns:
The count
std::string Dali::TypeInfo::GetSignalName ( size_t  index)

Retrieves the signal name for the index.

Since:
3.0, DALi version 1.0.0
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:
3.0, DALi version 1.0.0
Parameters:
[in]rhsA reference to the copied handle
Returns:
A reference to this