-/**
- * These macros are used to define a table of property details per Actor object.
- * The index property is only compiled in for DEBUG_ENABLED builds and allows checking the table index VS the property enum index.
- * DALI_PROPERTY_TABLE_END Forces a run-time check that will happen once.
- */
-#define DALI_PROPERTY_TABLE_BEGIN const Internal::PropertyDetails DEFAULT_PROPERTY_DETAILS[] = {
-#ifdef DEBUG_ENABLED
-#define DALI_PROPERTY_TABLE_END( startIndex ) }; const int DEFAULT_PROPERTY_COUNT = sizeof( DEFAULT_PROPERTY_DETAILS ) / sizeof( Internal::PropertyDetails ); \
- struct PROPERTY_CHECK \
- { \
- PROPERTY_CHECK() \
- { \
- for( int i = 0; i < DEFAULT_PROPERTY_COUNT; i++ ) \
- { \
- if ( DEFAULT_PROPERTY_DETAILS[i].enumIndex != ( startIndex + i ) ) \
- { \
- DALI_LOG_ERROR( "Checking property failed: index:%d, enumIndex:%d == index+start:%d, (name:%s)\n", i, \
- DEFAULT_PROPERTY_DETAILS[i].enumIndex, (startIndex + i), DEFAULT_PROPERTY_DETAILS[i].name ); \
- DALI_ASSERT_DEBUG( false && "Property enumeration mismatch" ); \
- } \
- } \
- } \
- }; \
- static PROPERTY_CHECK PROPERTY_CHECK_INSTANCE;
-#else
-#define DALI_PROPERTY_TABLE_END( startIndex ) }; const int DEFAULT_PROPERTY_COUNT = sizeof( DEFAULT_PROPERTY_DETAILS ) / sizeof( Internal::PropertyDetails );
-#endif
-#ifdef DEBUG_ENABLED
-#define DALI_PROPERTY( text, type, writable, animatable, constraint, index ) { text, Dali::Property::type, writable, animatable, constraint, index },
-#else
-#define DALI_PROPERTY( text, type, writable, animatable, constraint, index ) { text, Dali::Property::type, writable, animatable, constraint },
-#endif
+#define DALI_PROPERTY_TABLE_END(startIndex, tableName) \
+ }; \
+ static constexpr auto tableName = GeneratePropertyMetadata(DEFAULT_PROPERTY_DETAILS); \
+ static_assert(CheckPropertyMetadata(tableName, startIndex), "Property enumeration mismatch");
+
+#define DALI_PROPERTY( text, type, writable, animatable, constraint, index ) { text, index, Dali::Property::type, writable, animatable, constraint },