Tizen Native API
4.0
|
TypeInfo class for instantiation of registered types and introspection of their actions and signals. More...
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. | |
TypeInfo & | operator= (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
typedef BaseHandle(* Dali::TypeInfo::CreateFunction)() |
Function signature for creating an instance of the associated object type.
- Since:
- 3.0, DALi version 1.0.0
typedef Property::Value(* Dali::TypeInfo::GetPropertyFunction)(BaseObject *object, Property::Index index) |
Callback to get the value of an event-thread only property.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] object The object whose property value is required [in] index The 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] object The object whose property should be set [in] index The index of the property being set [in] value The 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] object The object providing the signal [in] tracker Used to disconnect the signal [in] signalName The signal to connect to [in] functor A 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] handle A reference to the copied handle
Member Function Documentation
BaseHandle Dali::TypeInfo::CreateInstance | ( | ) | const |
Creates an object from this type.
- Since:
- 3.0, DALi version 1.0.0
- Returns:
- The BaseHandle for the newly created object
size_t Dali::TypeInfo::GetActionCount | ( | ) | const |
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] index Index 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
CreateFunction Dali::TypeInfo::GetCreator | ( | ) | const |
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
size_t Dali::TypeInfo::GetPropertyCount | ( | ) | const |
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
void Dali::TypeInfo::GetPropertyIndices | ( | Property::IndexContainer & | indices | ) | const |
Retrieves all the property indices for this type.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[out] indices Container 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] index The property index
- Returns:
- The name of the property at the given index
- Exceptions:
-
DaliException If index is not valid.
size_t Dali::TypeInfo::GetSignalCount | ( | ) | const |
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] index Index to lookup
- Returns:
- Signal name or empty string where index is invalid