/////////////////////////////////////////////////////////////////////////////// // 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_ASSETACCESSOR_H_ #define _OD_ASSETACCESSOR_H_ #include "RxObject.h" #include "CmColorBase.h" #include "SharedPtr.h" #define OD_ASSETACCESSOR_METHOD_ABSTARCT = 0 /** \details Methods implements access to properties of material appearance assets using bindings defined in ADSK material xml schemas. \param app [in] A pointer to host app services. \param pAsset [in] A smart pointer to an OdBmAsset object that contains desired material properties. \param property [in] A name of desired property. \param value [out] A value of asset property. */ #define OD_ASSETACCESSORS(T, ABSTRACT, ...) \ virtual bool getValueFor(const OdString& property, T& value) const ABSTRACT; #define OD_ASSETACCESSOR_CREATE_FOR_TYPES(PARAM_DEF, ABSTRACT, ...) \ PARAM_DEF(bool, ABSTRACT) \ PARAM_DEF(double, ABSTRACT) \ PARAM_DEF(OdInt32, ABSTRACT) \ PARAM_DEF(OdString, ABSTRACT) \ PARAM_DEF(OdRxObjectPtr, ABSTRACT) struct OdAssetAccessor { OD_ASSETACCESSOR_CREATE_FOR_TYPES(OD_ASSETACCESSORS, OD_ASSETACCESSOR_METHOD_ABSTARCT) virtual bool getValueFor(const OdString& property, double(&value)[4]) const = 0; virtual ~OdAssetAccessor(){}; }; typedef OdSharedPtr OdAssetAccessorPtr; #endif //_OD_ASSETACCESSOR_H_