1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef CORE__ECS_HELPER__PROPERTY_TOOLS__PROPERTY_MACROS_H 17 #define CORE__ECS_HELPER__PROPERTY_TOOLS__PROPERTY_MACROS_H 18 19 #ifndef BEGIN_PROPERTY 20 // Include actual macros, with the core property metadatas. 21 #include "PropertyTools/core_metadata.inl" 22 #endif 23 24 #ifdef IMPLEMENT_MANAGER 25 // Override the component declaration macros for "inline include" metadata definitions. 26 #undef BEGIN_COMPONENT 27 #undef ARRAY_VALUE 28 #undef VALUE 29 #undef DEFINE_PROPERTY 30 #undef DEFINE_BITFIELD_PROPERTY 31 #undef DEFINE_ARRAY_PROPERTY 32 #undef BEGIN_COMPONENT_MANAGER 33 #undef END_COMPONENT_MANAGER 34 #undef END_COMPONENT 35 #undef END_COMPONENT_EXT 36 #undef END_COMPONENT2 37 38 #define BEGIN_COMPONENT(a, b) 39 #define ARRAY_VALUE(...) 40 #define VALUE(val) 41 #define DEFINE_PROPERTY(type, name, displayname, flags, value) DECL_PROPERTY2(COMPTYPE, name, displayname, flags) 42 #define DEFINE_BITFIELD_PROPERTY(type, name, displayname, flags, value, enumeration) \ 43 DECL_BITFIELD_PROPERTY(COMPTYPE, name, displayname, flags, enumeration) 44 #define DEFINE_ARRAY_PROPERTY(type, count, name, displayname, flags, value) \ 45 DECL_PROPERTY2(COMPTYPE, name, displayname, flags) 46 #define BEGIN_COMPONENT_MANAGER(a, b, c) 47 #define END_COMPONENT_MANAGER(a, b, c) 48 #define END_COMPONENT(a, b, c) 49 #define END_COMPONENT_EXT(a, b, c, d) 50 #endif 51 52 #endif // CORE__ECS_HELPER__PROPERTY_TOOLS__PROPERTY_MACROS_H 53