/////////////////////////////////////////////////////////////////////////////// // Copyright (C) 2002-2025, Open Design Alliance (the "Alliance"). // All rights reserved. // // This software and its documentation and related materials are owned by // the Alliance. The software may only be incorporated into application // programs owned by members of the Alliance, subject to a signed // Membership Agreement and Supplemental Software License Agreement with the // Alliance. The structure and organization of this software are the valuable // trade secrets of the Alliance and its suppliers. The software is also // protected by copyright law and international treaty provisions. Application // programs incorporating this software must include the following statement // with their copyright notices: // // This application incorporates Open Design Alliance software pursuant to a license // agreement with Open Design Alliance. // Open Design Alliance Copyright (C) 2002-2025 by Open Design Alliance. // All rights reserved. // // By use of this software, its documentation or related materials, you // acknowledge and accept the above terms. /////////////////////////////////////////////////////////////////////////////// #ifndef __OD_PUBLIC_EXTMACROS_H__ #define __OD_PUBLIC_EXTMACROS_H__ #include "ACommon.h" // // Enumeration extensions // #define OD_ENUM_ENTRY(NAME, VALUE, ...) NAME = VALUE, #define OD_ENUMERATION(NAMESPACE_NAME, LIST) \ namespace Od { \ namespace NAMESPACE_NAME { \ enum Enum { LIST(OD_ENUM_ENTRY) }; \ }; /* namespace NAMESPACE_NAME */ \ }; /* namespace OdBm*/ #define OD_VALUED_ENUMERATION_MAP(NAME, VALUE, SVALUE, ...) values[NAME] = SVALUE; #define OD_VALUED_ENUMERATION(ENUM_NAME, LIST) \ OD_ENUMERATION(ENUM_NAME, LIST) \ namespace Od { \ namespace ENUM_NAME { \ typedef std::map ValuesMap; \ static ValuesMap create_map() { \ ValuesMap values; \ LIST(OD_VALUED_ENUMERATION_MAP) \ return values; \ } \ static ValuesMap Values = create_map(); \ }; \ }; #endif //__OD_PUBLIC_EXTMACROS_H__