/////////////////////////////////////////////////////////////////////////////// // 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. /////////////////////////////////////////////////////////////////////////////// #include "OdaCommon.h" #include "OdDbAssocPersSubentManagerPEDerived.h" #include "ShHistory/DbAssocPersSubentManagerCloner.h" #include "DbAssocGeomDependency.h" #include "DbAssocActionBody.h" #include "DbAssocActionParam.h" ////////////////////////////////////////////////////////////////////////////// // OdDbAssocActionParamPersSubentManagerPE ////////////////////////////////////////////////////////////////////////////// ODRX_NO_CONS_DEFINE_MEMBERS_ALTNAME(OdDbAssocActionParamPersSubentManagerPE, OdDbAssocPersSubentManagerPE, L"OdDbAssocActionParamPersSubentManagerPE"); OdDbAssocActionParamPersSubentManagerPE::OdDbAssocActionParamPersSubentManagerPE() { } OdDbAssocActionParamPersSubentManagerPE::~OdDbAssocActionParamPersSubentManagerPE() { } OdResult OdDbAssocActionParamPersSubentManagerPE::collectPersSubentNamingData(const OdDbObject* pObj, OdDbPersStepIdArray& stepIds, OdDbPersSubentIdArray& persSubentIds) const { if (!pObj || !pObj->isKindOf(OdDbAssocActionParam::desc())) return eInvalidInput; OdDbAssocActionParam::cast(pObj)->collectPersSubentNamingDataOverride(stepIds, persSubentIds); return eOk; } OdResult OdDbAssocActionParamPersSubentManagerPE::clonePersSubentNamingData(OdDbObject* pObj, OdDbAssocPersSubentManagerCloner* apsmc) { if (!pObj || !apsmc || !pObj->isKindOf(OdDbAssocActionParam::desc())) return eInvalidInput; OdDbAssocActionParam::cast(pObj)->clonePersSubentNamingDataOverride(apsmc); return eOk; } ////////////////////////////////////////////////////////////////////////////// // OdDbAssocActionBodyPersSubentManagerPE ////////////////////////////////////////////////////////////////////////////// ODRX_NO_CONS_DEFINE_MEMBERS_ALTNAME(OdDbAssocActionBodyPersSubentManagerPE, OdDbAssocPersSubentManagerPE, L"OdDbAssocActionBodyPersSubentManagerPE"); OdDbAssocActionBodyPersSubentManagerPE::OdDbAssocActionBodyPersSubentManagerPE() { } OdDbAssocActionBodyPersSubentManagerPE::~OdDbAssocActionBodyPersSubentManagerPE() { } OdResult OdDbAssocActionBodyPersSubentManagerPE::collectPersSubentNamingData(const OdDbObject* pObj, OdDbPersStepIdArray& stepIds, OdDbPersSubentIdArray& persSubentIds) const { if (!pObj || !pObj->isKindOf(OdDbAssocActionBody::desc())) return eInvalidInput; OdDbAssocActionBody::cast(pObj)->collectPersSubentNamingDataOverride(stepIds, persSubentIds); return eOk; } OdResult OdDbAssocActionBodyPersSubentManagerPE::clonePersSubentNamingData(OdDbObject* pObj, OdDbAssocPersSubentManagerCloner* apsmc) { if (!pObj || !apsmc || !pObj->isKindOf(OdDbAssocActionBody::desc())) return eInvalidInput; OdDbAssocActionBody::cast(pObj)->clonePersSubentNamingDataOverride(apsmc); return eOk; } ////////////////////////////////////////////////////////////////////////////// // OdDbAssocActionPersSubentManagerPE ////////////////////////////////////////////////////////////////////////////// ODRX_NO_CONS_DEFINE_MEMBERS_ALTNAME(OdDbAssocActionPersSubentManagerPE, OdDbAssocPersSubentManagerPE, L"OdDbAssocActionPersSubentManagerPE"); OdDbAssocActionPersSubentManagerPE::OdDbAssocActionPersSubentManagerPE() { } OdDbAssocActionPersSubentManagerPE::~OdDbAssocActionPersSubentManagerPE() { } OdResult OdDbAssocActionPersSubentManagerPE::collectPersSubentNamingData(const OdDbObject* /*pObj*/, OdDbPersStepIdArray& /*stepIds*/, OdDbPersSubentIdArray& /*persSubentIds*/) const { return eNotImplementedYet; } OdResult OdDbAssocActionPersSubentManagerPE::clonePersSubentNamingData(OdDbObject* /*pObj*/, OdDbAssocPersSubentManagerCloner* /*apsmc*/) { return eNotImplementedYet; } ////////////////////////////////////////////////////////////////////////////// // OdDbAssocGeomDependencyPersSubentManagerPE ////////////////////////////////////////////////////////////////////////////// ODRX_NO_CONS_DEFINE_MEMBERS_ALTNAME(OdDbAssocGeomDependencyPersSubentManagerPE, OdDbAssocPersSubentManagerPE, L"OdDbAssocGeomDependencyPersSubentManagerPE"); OdDbAssocGeomDependencyPersSubentManagerPE::OdDbAssocGeomDependencyPersSubentManagerPE() { } OdDbAssocGeomDependencyPersSubentManagerPE::~OdDbAssocGeomDependencyPersSubentManagerPE() { } OdResult OdDbAssocGeomDependencyPersSubentManagerPE::collectPersSubentNamingData(const OdDbObject* pObj, OdDbPersStepIdArray& /*stepIds*/, OdDbPersSubentIdArray& persSubentIds) const { if (!pObj || !pObj->isKindOf(OdDbAssocGeomDependency::desc())) return eInvalidInput; OdDbAssocGeomDependency* pGeomDep = OdDbAssocGeomDependency::cast(pObj); const OdDbAssocPersSubentId* pPersSubentId = pGeomDep->persistentSubentId(); if (!pPersSubentId) return eOk; if (!pPersSubentId->isKindOf(OdDbAssocAsmBasedEntityPersSubentId::desc())) return eOk; const OdDbAssocAsmBasedEntityPersSubentId* pAsmBasedId = OdDbAssocAsmBasedEntityPersSubentId::cast(pPersSubentId); OdDbPersSubentId persId = pAsmBasedId->persId(); if (persId == 0) return eOk; persSubentIds.append(persId); return eOk; } OdResult OdDbAssocGeomDependencyPersSubentManagerPE::clonePersSubentNamingData(OdDbObject* pObj, OdDbAssocPersSubentManagerCloner* apsmc) { if (!pObj || !apsmc || !pObj->isKindOf(OdDbAssocGeomDependency::desc())) return eInvalidInput; OdDbAssocGeomDependency* pGeomDep = OdDbAssocGeomDependency::cast(pObj); OdDbAssocPersSubentId* pPersSubentId = pGeomDep->persistentSubentId(); if (!pPersSubentId) return eOk; if (!pPersSubentId->isKindOf(OdDbAssocAsmBasedEntityPersSubentId::desc())) return eOk; OdDbAssocAsmBasedEntityPersSubentId* pAsmBasedId = OdDbAssocAsmBasedEntityPersSubentId::cast(pPersSubentId); OdDbPersSubentId persId = pAsmBasedId->persId(); if (persId) { if (OdInt32 newPersSubEnt = apsmc->clonePersSubentId(persId)) pAsmBasedId->setPersId(newPersSubEnt); } return eOk; }