Dali 3D User Interface Engine
Namespaces | Macros
type-registry-helper.h File Reference
#include <dali/public-api/common/compile-time-assert.h>
#include <dali/public-api/object/type-registry.h>
Include dependency graph for type-registry-helper.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Dali
 The top level DALi namespace.
 
namespace  Dali::Internal
 

Macros

#define DALI_TOKEN_PASTE_EXPAND(x, y)   x ## y
 These macros are used to use the type-registry to register properties and signals. More...
 
#define DALI_TOKEN_PASTE(x, y)   DALI_TOKEN_PASTE_EXPAND(x, y)
 
#define DALI_PROPERTY_REGISTRATION_INTERNAL(count, typeRegistrationObject, objectNamespace, objectType, text, valueType, enumIndex)
 
#define DALI_ANIMATABLE_PROPERTY_REGISTRATION_INTERNAL(count, typeRegistrationObject, objectNamespace, objectType, text, valueType, enumIndex)   AnimatablePropertyRegistration DALI_TOKEN_PASTE( property, count ) ( typeRegistrationObject, text, objectNamespace::objectType::Property::enumIndex, Property::valueType );
 
#define DALI_ANIMATABLE_PROPERTY_REGISTRATION_WITH_DEFAULT_INTERNAL(count, typeRegistrationObject, objectNamespace, objectType, text, value, enumIndex)   AnimatablePropertyRegistration DALI_TOKEN_PASTE( property, count ) ( typeRegistrationObject, text, objectNamespace::objectType::Property::enumIndex, value );
 
#define DALI_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION_INTERNAL(count, typeRegistrationObject, objectNamespace, objectType, text, enumIndex, baseEnumIndex, componentIndex)   AnimatablePropertyComponentRegistration DALI_TOKEN_PASTE( property, count ) ( typeRegistrationObject, text, objectNamespace::objectType::Property::enumIndex, objectNamespace::objectType::Property::baseEnumIndex, componentIndex );
 
#define DALI_SIGNAL_REGISTRATION_INTERNAL(count, typeRegistrationObject, objectNamespace, objectType, text, textVariable)
 
#define DALI_ACTION_REGISTRATION_INTERNAL(count, typeRegistrationObject, objectNamespace, objectType, text, textVariable)
 
#define DALI_TYPE_REGISTRATION_BEGIN(thisType, baseType, createFunction)   TypeRegistration typeRegistration( typeid( thisType ), typeid( baseType ), createFunction );
 
#define DALI_TYPE_REGISTRATION_BEGIN_CREATE(thisType, baseType, createFunction, createAtStartup)   TypeRegistration typeRegistration( typeid( thisType ), typeid( baseType ), createFunction, createAtStartup );
 
#define DALI_PROPERTY_REGISTRATION(objectNamespace, objectType, text, valueType, enumIndex)   DALI_PROPERTY_REGISTRATION_INTERNAL( __COUNTER__, typeRegistration, objectNamespace, objectType, text, valueType, enumIndex )
 
#define DALI_ANIMATABLE_PROPERTY_REGISTRATION(objectNamespace, objectType, text, valueType, enumIndex)   DALI_ANIMATABLE_PROPERTY_REGISTRATION_INTERNAL( __COUNTER__, typeRegistration, objectNamespace, objectType, text, valueType, enumIndex )
 
#define DALI_ANIMATABLE_PROPERTY_REGISTRATION_WITH_DEFAULT(objectNamespace, objectType, text, value, enumIndex)   DALI_ANIMATABLE_PROPERTY_REGISTRATION_WITH_DEFAULT_INTERNAL( __COUNTER__, typeRegistration, objectNamespace, objectType, text, value, enumIndex )
 
#define DALI_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION(objectNamespace, objectType, text, enumIndex, baseEnumIndex, componentIndex)   DALI_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION_INTERNAL( __COUNTER__, typeRegistration, objectNamespace, objectType, text, enumIndex, baseEnumIndex, componentIndex )
 
#define DALI_SIGNAL_REGISTRATION(objectNamespace, objectType, text, textVariable)   DALI_SIGNAL_REGISTRATION_INTERNAL( __COUNTER__, typeRegistration, objectNamespace, objectType, text, textVariable )
 
#define DALI_ACTION_REGISTRATION(objectNamespace, objectType, text, textVariable)   DALI_ACTION_REGISTRATION_INTERNAL( __COUNTER__, typeRegistration, objectNamespace, objectType, text, textVariable )
 
#define DALI_TYPE_REGISTRATION_END()
 

Macro Definition Documentation

#define DALI_ACTION_REGISTRATION (   objectNamespace,
  objectType,
  text,
  textVariable 
)    DALI_ACTION_REGISTRATION_INTERNAL( __COUNTER__, typeRegistration, objectNamespace, objectType, text, textVariable )

Definition at line 86 of file type-registry-helper.h.

#define DALI_ACTION_REGISTRATION_INTERNAL (   count,
  typeRegistrationObject,
  objectNamespace,
  objectType,
  text,
  textVariable 
)
Value:
const char* const textVariable = text; \
TypeAction DALI_TOKEN_PASTE( signalConnector, count ) ( typeRegistrationObject, text, &objectNamespace::Internal::objectType::DoAction );

Definition at line 59 of file type-registry-helper.h.

#define DALI_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION (   objectNamespace,
  objectType,
  text,
  enumIndex,
  baseEnumIndex,
  componentIndex 
)    DALI_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION_INTERNAL( __COUNTER__, typeRegistration, objectNamespace, objectType, text, enumIndex, baseEnumIndex, componentIndex )

Definition at line 80 of file type-registry-helper.h.

#define DALI_ANIMATABLE_PROPERTY_COMPONENT_REGISTRATION_INTERNAL (   count,
  typeRegistrationObject,
  objectNamespace,
  objectType,
  text,
  enumIndex,
  baseEnumIndex,
  componentIndex 
)    AnimatablePropertyComponentRegistration DALI_TOKEN_PASTE( property, count ) ( typeRegistrationObject, text, objectNamespace::objectType::Property::enumIndex, objectNamespace::objectType::Property::baseEnumIndex, componentIndex );

Definition at line 52 of file type-registry-helper.h.

#define DALI_ANIMATABLE_PROPERTY_REGISTRATION (   objectNamespace,
  objectType,
  text,
  valueType,
  enumIndex 
)    DALI_ANIMATABLE_PROPERTY_REGISTRATION_INTERNAL( __COUNTER__, typeRegistration, objectNamespace, objectType, text, valueType, enumIndex )

Definition at line 74 of file type-registry-helper.h.

#define DALI_ANIMATABLE_PROPERTY_REGISTRATION_INTERNAL (   count,
  typeRegistrationObject,
  objectNamespace,
  objectType,
  text,
  valueType,
  enumIndex 
)    AnimatablePropertyRegistration DALI_TOKEN_PASTE( property, count ) ( typeRegistrationObject, text, objectNamespace::objectType::Property::enumIndex, Property::valueType );

Definition at line 46 of file type-registry-helper.h.

#define DALI_ANIMATABLE_PROPERTY_REGISTRATION_WITH_DEFAULT (   objectNamespace,
  objectType,
  text,
  value,
  enumIndex 
)    DALI_ANIMATABLE_PROPERTY_REGISTRATION_WITH_DEFAULT_INTERNAL( __COUNTER__, typeRegistration, objectNamespace, objectType, text, value, enumIndex )

Definition at line 77 of file type-registry-helper.h.

#define DALI_ANIMATABLE_PROPERTY_REGISTRATION_WITH_DEFAULT_INTERNAL (   count,
  typeRegistrationObject,
  objectNamespace,
  objectType,
  text,
  value,
  enumIndex 
)    AnimatablePropertyRegistration DALI_TOKEN_PASTE( property, count ) ( typeRegistrationObject, text, objectNamespace::objectType::Property::enumIndex, value );

Definition at line 49 of file type-registry-helper.h.

#define DALI_PROPERTY_REGISTRATION (   objectNamespace,
  objectType,
  text,
  valueType,
  enumIndex 
)    DALI_PROPERTY_REGISTRATION_INTERNAL( __COUNTER__, typeRegistration, objectNamespace, objectType, text, valueType, enumIndex )

Definition at line 71 of file type-registry-helper.h.

#define DALI_PROPERTY_REGISTRATION_INTERNAL (   count,
  typeRegistrationObject,
  objectNamespace,
  objectType,
  text,
  valueType,
  enumIndex 
)
Value:
PropertyRegistration DALI_TOKEN_PASTE( property, count ) ( typeRegistrationObject, text, objectNamespace::objectType::Property::enumIndex, Property::valueType, &objectType::SetProperty, &objectType::GetProperty ); \
DALI_COMPILE_TIME_ASSERT( ( objectNamespace::objectType::Property::enumIndex - objectNamespace::objectType::PROPERTY_START_INDEX ) == count );

Definition at line 42 of file type-registry-helper.h.

#define DALI_SIGNAL_REGISTRATION (   objectNamespace,
  objectType,
  text,
  textVariable 
)    DALI_SIGNAL_REGISTRATION_INTERNAL( __COUNTER__, typeRegistration, objectNamespace, objectType, text, textVariable )

Definition at line 83 of file type-registry-helper.h.

#define DALI_SIGNAL_REGISTRATION_INTERNAL (   count,
  typeRegistrationObject,
  objectNamespace,
  objectType,
  text,
  textVariable 
)
Value:
const char* const textVariable = text; \
SignalConnectorType DALI_TOKEN_PASTE( signalConnector, count ) ( typeRegistrationObject, text, &objectNamespace::Internal::objectType::DoConnectSignal );

Definition at line 55 of file type-registry-helper.h.

#define DALI_TOKEN_PASTE (   x,
 
)    DALI_TOKEN_PASTE_EXPAND(x, y)

Definition at line 40 of file type-registry-helper.h.

#define DALI_TOKEN_PASTE_EXPAND (   x,
 
)    x ## y

These macros are used to use the type-registry to register properties and signals.

This forces registration to be done in a standard way across actors and controls and facilitates future compile-time checks to be added.

Note: Currently a compile time check is done for the order of the properties. The order is not critical to registration, but helps maintain the ordering between the header and implementations to avoid properties being added out of place.

Note: The signal macro also generates string const chars.

Definition at line 39 of file type-registry-helper.h.

#define DALI_TYPE_REGISTRATION_BEGIN (   thisType,
  baseType,
  createFunction 
)    TypeRegistration typeRegistration( typeid( thisType ), typeid( baseType ), createFunction );

Definition at line 65 of file type-registry-helper.h.

#define DALI_TYPE_REGISTRATION_BEGIN_CREATE (   thisType,
  baseType,
  createFunction,
  createAtStartup 
)    TypeRegistration typeRegistration( typeid( thisType ), typeid( baseType ), createFunction, createAtStartup );

Definition at line 68 of file type-registry-helper.h.

#define DALI_TYPE_REGISTRATION_END ( )

Definition at line 89 of file type-registry-helper.h.

Dali Docs Home
Read more about Dali