/////////////////////////////////////////////////////////////////////////////// // 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 "DbAssocActionParam.h" #include "DbAssocDependency.h" #include "DbAssocArrayActionBody.h" #include "DbCenterMarkActionBody.h" #include "DbImpAssocActionParam.h" #include "DbFiler.h" #include "DbDimAssoc.h" ODRX_DEFINE_MEMBERS_EX(OdDbAssocActionParam, // ClassName OdDbObject, // ParentClass DBOBJECT_CONSTR, // DOCREATE OdDb::kDHL_1021, // DwgVer OdDb::kMRelease8, // MaintVer 1025, // nProxyFlags (kEraseAllowed | kDisableProxyWarning) L"AcDbAssocActionParam", // DWG class name L"ACDBASSOCACTIONPARAM", // DxfName L"ObjectDBX Classes", // AppName OdRx::kMTLoading | OdRx::kHistoryAware); OdDbAssocActionParam::OdDbAssocActionParam(bool createImpObj) : OdDbObject() , m_pImpObj(NULL) { if (createImpObj) m_pImpObj = new OdDbImpAssocActionParam(); } OdDbAssocActionParam::~OdDbAssocActionParam() { if (m_pImpObj) delete m_pImpObj; } const OdString& OdDbAssocActionParam::name() const { assertReadEnabled(); return m_pImpObj->m_sName; } OdResult OdDbAssocActionParam::setName(const OdString& newName) { assertWriteEnabled(); m_pImpObj->m_sName = newName; return eOk; } OdResult OdDbAssocActionParam::makeParamEmpty(bool /*alsoEraseOwnedObjects*/) { ODA_FAIL_ONCE(); // TODO return eNotImplementedYet; } OdResult OdDbAssocActionParam::detachDependencies() { assertWriteEnabled(); if ( isKindOf( OdDbAssocEdgeActionParam::desc() ) ) { return static_cast (m_pImpObj)->detachDependencies( parentAction() ); } ODA_FAIL_ONCE(); // TODO return eNotImplementedYet; } OdResult OdDbAssocActionParam::makeParamConstant() { ODA_FAIL_ONCE(); // TODO return eNotImplementedYet; } OdResult OdDbAssocActionParam::transformConstantGeometry(const OdGeMatrix3d& /*transform*/) { ODA_FAIL_ONCE(); // TODO return eNotImplementedYet; } OdDbObjectId OdDbAssocActionParam::parentAction() const { OdDbObjectPtr owner = ownerId().openObject(); while (owner.get() && owner->isKindOf(OdDbAssocActionParam::desc())) owner = owner->ownerId().openObject(); if(owner.get()) return owner->objectId(); return OdDbObjectId::kNull; } OdResult OdDbAssocActionParam::getDependencies( bool readDependenciesWanted, bool writeDependenciesWanted, OdDbObjectIdArray& dependencyIds ) const { return m_pImpObj->getDependencies(readDependenciesWanted, writeDependenciesWanted, dependencyIds); } OdResult OdDbAssocActionParam::getCompoundObjectIds(bool, // readDependenciesWanted bool, // writeDependenciesWanted OdArray&) const // compoundObjectIds { ODA_FAIL_ONCE(); // TODO return eNotImplementedYet; } OdDbAssocStatus OdDbAssocActionParam::status(bool alsoCheckDependencies) const { assertReadEnabled(); OdDbAssocStatus status = m_pImpObj->m_status; if (alsoCheckDependencies) { int severityLevel = evaluationRequestSeverityLevel(status); OdDbObjectIdArray dependencies; getDependencies(true, true, dependencies); for (OdUInt32 i = 0, n = dependencies.size(); i < n && severityLevel < kEvaluationRequestMaximumSeverity; ++i) { OdDbAssocDependencyPtr dependency = OdDbAssocDependency::cast(dependencies[i].openObject()); if (dependency.get()) { OdDbAssocStatus depStatus = dependency->status(); int depParamSeverityLevel = evaluationRequestSeverityLevel(depStatus); if (depParamSeverityLevel >= severityLevel) { severityLevel = depParamSeverityLevel; status = depStatus; } } } } return status; } OdResult OdDbAssocActionParam::setStatus(OdDbAssocStatus newStatus, bool notifyParentAction, // = true bool /*setInOwnedParams*/) // = false { assertReadEnabled(); OdDbAssocStatus oldStatus = m_pImpObj->m_status; if (newStatus == oldStatus) return eOk; if (isEvaluationRequest(newStatus)) { if (!isToBeSkipped(oldStatus)) { if (isEvaluationRequest(oldStatus)) { if (evaluationRequestSeverityLevel(newStatus) > evaluationRequestSeverityLevel(oldStatus)) { assertWriteEnabled(); m_pImpObj->m_status = newStatus; } } else { assertWriteEnabled(); m_pImpObj->m_status = newStatus; } } if (notifyParentAction && m_pImpObj->m_status != oldStatus) { OdDbAssocActionPtr pAction = parentAction().openObject(OdDb::kForWrite); if (!pAction.isNull()) return pAction->setStatus(newStatus); } } else { assertWriteEnabled(); m_pImpObj->m_status = newStatus; } return eOk; } void OdDbAssocActionParam::auditAssociativeData(OdDbAssocStatus& /*parentActionHandling*/) { } OdResult OdDbAssocActionParam::dwgInFields(OdDbDwgFiler* pFiler) { ODA_ASSERT_ONCE(m_pImpObj); if (!m_pImpObj) return eMakeMeProxy; OdResult res = OdDbObject::dwgInFields(pFiler); if (res != eOk) return res; return m_pImpObj->dwgInFields(pFiler, objectId()); } void OdDbAssocActionParam::dwgOutFields(OdDbDwgFiler* pFiler) const { OdDbObject::dwgOutFields(pFiler); m_pImpObj->dwgOutFields(pFiler, objectId()); } OdResult OdDbAssocActionParam::dxfInFields(OdDbDxfFiler* pFiler) { ODA_ASSERT_ONCE(m_pImpObj); if (!m_pImpObj) return eMakeMeProxy; OdResult res = OdDbObject::dxfInFields(pFiler); if (res != eOk) return res; return m_pImpObj->dxfInFields(pFiler, objectId()); } void OdDbAssocActionParam::dxfOutFields(OdDbDxfFiler* pFiler) const { OdDbObject::dxfOutFields(pFiler); m_pImpObj->dxfOutFields(pFiler, objectId()); } OdResult OdDbAssocActionParam::getObject(OdDbCompoundObjectId& object) const { assertReadEnabled(); return static_cast (m_pImpObj)->getObject(object); } OdDbObjectId OdDbAssocActionParam::getObject() const { assertReadEnabled(); return static_cast (m_pImpObj)->getObject(); } OdResult OdDbAssocActionParam::setObject(const OdDbCompoundObjectId& object, bool isReadDependency, // = true bool isWriteDependency // = false ) // = 0 { assertWriteEnabled(); return static_cast (m_pImpObj)->setObject(parentAction(), object, isReadDependency, isWriteDependency); } OdResult OdDbAssocActionParam::setObjectOnly(const OdDbCompoundObjectId& object, bool isReadDependency, // = true bool isWriteDependency // = false ) // = 0 { assertWriteEnabled(); return static_cast (m_pImpObj)->setObjectOnly(parentAction(), object, isReadDependency, isWriteDependency); } OdStringArray OdDbAssocActionParam::compareWith(const OdDbObjectId paramIDToCompare, OdDb::DwgVersion /*filerVersion*/ /*OdDb::kDHL_CURRENT*/) const { OdStringArray retArray; OdDbAssocActionParamPtr comparedParamsPtr = OdDbAssocActionParam::cast(paramIDToCompare.openObject()); if (comparedParamsPtr.isNull()) { retArray.append(CS_OBJECT_ERROR); return retArray; } OdDbImpAssocActionParam* pImpObjCompared = static_cast(comparedParamsPtr->m_pImpObj); return static_cast (m_pImpObj)->compareWith(pImpObjCompared); } void OdDbAssocActionParam::collectPersSubentNamingDataOverride(OdDbPersStepIdArray& /*stepIds*/, OdDbPersSubentIdArray& /*persSubentIds*/) const {} void OdDbAssocActionParam::clonePersSubentNamingDataOverride(OdDbAssocPersSubentManagerCloner* /*apsmc*/) {} ////////////////////////////////////////////////////////////////////////// ODRX_DEFINE_MEMBERS_EX(OdDbAssocAsmBodyActionParam, // ClassName OdDbAssocActionParam, // ParentClass DBOBJECT_CONSTR, // DOCREATE OdDb::kDHL_1021, // DwgVer OdDb::kMRelease8, // MaintVer 1025, // nProxyFlags (kEraseAllowed | kDisableProxyWarning) L"AcDbAssocAsmBodyActionParam", // DWG class name L"ACDBASSOCASMBODYACTIONPARAM", // DxfName L"ObjectDBX Classes", // AppName OdRx::kMTLoading | OdRx::kHistoryAware); OdDbAssocAsmBodyActionParam::OdDbAssocAsmBodyActionParam(bool createImpObj) // = true : OdDbAssocActionParam(false) { if (createImpObj) m_pImpObj = new OdDbImpAssocAsmBodyActionParam(); } OdResult OdDbAssocAsmBodyActionParam::setBody(const OdDbEntity* /*pAsmEntity*/, bool /*isReadDependency*/, // = true bool /*isWriteDependency*/, // = false int /*dependencyOrder*/) // = 0 { ODA_FAIL_ONCE(); // TODO return eNotImplementedYet; } OdResult OdDbAssocAsmBodyActionParam::setBody(OdDbObjectId /*asmEntityId*/, bool /*isReadDependency*/, // = true bool /*isWriteDependency*/, // = false int /*dependencyOrder*/) // = 0 { ODA_FAIL_ONCE(); // TODO return eNotImplementedYet; } OdResult OdDbAssocAsmBodyActionParam::setBody(void* /*pAsmBody*/, bool /*makeCopy*/) { ODA_FAIL_ONCE(); // TODO return eNotImplementedYet; } void* OdDbAssocAsmBodyActionParam::body(bool /*makeCopy*/) const { ODA_FAIL_ONCE(); // TODO return NULL; } OdResult OdDbAssocAsmBodyActionParam::getDependentOnCompoundObject(OdDbCompoundObjectId& /*compoundId*/) const { ODA_FAIL_ONCE(); // TODO return eNotImplementedYet; } ////////////////////////////////////////////////////////////////////////// ODRX_DEFINE_MEMBERS_EX(OdDbAssocCompoundActionParam, // ClassName OdDbAssocActionParam, // ParentClass DBOBJECT_CONSTR, // DOCREATE OdDb::kDHL_1021, // DwgVer OdDb::kMRelease8, // MaintVer 1025, // nProxyFlags (kEraseAllowed | kDisableProxyWarning) L"AcDbAssocCompoundActionParam", // DWG class name L"ACDBASSOCCOMPOUNDACTIONPARAM", // DxfName L"ObjectDBX Classes", // AppName OdRx::kMTLoading | OdRx::kHistoryAware); OdDbAssocCompoundActionParam::OdDbAssocCompoundActionParam(bool createImpObj) // = true : OdDbAssocActionParam(false) { if (createImpObj) m_pImpObj = new OdDbImpAssocCompoundActionParam(); } OdResult OdDbAssocCompoundActionParam::removeAllParams(bool alsoEraseThem) { assertWriteEnabled(); OdDbImpAssocCompoundActionParam* pImpl = (OdDbImpAssocCompoundActionParam*)m_pImpObj; return pImpl->removeAllParams(this, alsoEraseThem); } int OdDbAssocCompoundActionParam::paramCount() const { assertReadEnabled(); OdDbImpAssocCompoundActionParam* pImpl = (OdDbImpAssocCompoundActionParam*)m_pImpObj; return pImpl->m_ActionParams.size(); } const OdDbObjectIdArray& OdDbAssocCompoundActionParam::ownedParams() const { assertReadEnabled(); OdDbImpAssocCompoundActionParam* pImpl = (OdDbImpAssocCompoundActionParam*)m_pImpObj; return pImpl->m_ActionParams; } OdResult OdDbAssocCompoundActionParam::addParam(const OdDbObjectId& paramId, int& paramIndex) { assertWriteEnabled(); OdDbImpAssocCompoundActionParam* pImpl = (OdDbImpAssocCompoundActionParam*)m_pImpObj; unsigned nIdx; if (pImpl->m_ActionParams.find(paramId, nIdx)) { paramIndex = nIdx; } else { paramIndex = pImpl->m_ActionParams.append(paramId); } return eOk; } OdDbAssocStatus OdDbAssocCompoundActionParam::status(bool alsoCheckDependencies) const { OdDbAssocStatus status = OdDbAssocActionParam::status(alsoCheckDependencies); if(alsoCheckDependencies) { int severityLevel = evaluationRequestSeverityLevel(status); for (int i = 0, n = paramCount(); i < n && severityLevel < kEvaluationRequestMaximumSeverity; ++i) { OdDbAssocActionParamPtr param = OdDbAssocActionParam::cast(paramAtIndex(i).openObject()); if (param.get()) { OdDbAssocStatus childParamStatus = param->status(alsoCheckDependencies); int childParamSeverityLevel = evaluationRequestSeverityLevel(childParamStatus); if(childParamSeverityLevel > severityLevel) { severityLevel = childParamSeverityLevel; status = childParamStatus; } } } } return status; } OdResult OdDbAssocCompoundActionParam::setStatus(OdDbAssocStatus newStatus, bool notifyParentAction, bool setInOwnedParams) { OdResult result = OdDbAssocActionParam::setStatus(newStatus, notifyParentAction, setInOwnedParams); if(result!=eOk) return result; if (setInOwnedParams) { for (int i = 0, n = paramCount(); i < n; ++i) { OdDbObjectPtr obj; result = paramAtIndex(i).openObject(obj, OdDb::kForWrite); if (result != eOk) return result; OdDbAssocActionParamPtr param = OdDbAssocActionParam::cast(obj); if (param.isNull()) return eNotThatKindOfClass; param->setStatus(newStatus, false, setInOwnedParams); } } return result; } OdResult OdDbAssocCompoundActionParam::removeParam(const OdDbObjectId& paramId, bool alsoEraseIt) { assertWriteEnabled(); OdDbImpAssocCompoundActionParam* pImpl = (OdDbImpAssocCompoundActionParam*)m_pImpObj; return pImpl->removeParam(this, paramId, alsoEraseIt); } OdDbObjectIdArray OdDbAssocCompoundActionParam::paramsAtName(const OdString& paramName) const { assertReadEnabled(); OdDbImpAssocCompoundActionParam* pImpl = (OdDbImpAssocCompoundActionParam*)m_pImpObj; OdDbObjectIdArray arrRes; int nSize = pImpl->m_ActionParams.size(); const OdDbObjectId * pId = pImpl->m_ActionParams.asArrayPtr(); for (; nSize--; pId++) { OdDbAssocActionParamPtr pParam = (*pId).safeOpenObject(); if (pParam->name() == paramName) { arrRes.append(*pId); } } return arrRes; } OdDbObjectId OdDbAssocCompoundActionParam::paramAtName(const OdString& paramName, int index) const { assertReadEnabled(); OdDbImpAssocCompoundActionParam* pImpl = (OdDbImpAssocCompoundActionParam*)m_pImpObj; OdDbObjectId idRes; int nSize = pImpl->m_ActionParams.size(); const OdDbObjectId * pId = pImpl->m_ActionParams.asArrayPtr(); for (; nSize--; pId++) { OdDbAssocActionParamPtr pParam = (*pId).safeOpenObject(); if (pParam->name() == paramName) { if (index-- == 0) { break; } } } return idRes; } OdDbObjectId OdDbAssocCompoundActionParam::paramAtIndex(int paramIndex) const { assertReadEnabled(); OdDbImpAssocCompoundActionParam* pImpl = (OdDbImpAssocCompoundActionParam*)m_pImpObj; return pImpl->m_ActionParams[paramIndex]; } OdResult OdDbAssocCompoundActionParam::addParam(const OdString& paramName, OdRxClass* pParamClass, OdDbObjectId& paramId, int& paramIndex) { assertWriteEnabled(); return static_cast (m_pImpObj)->addParam(this, paramName, pParamClass, paramId, paramIndex); } OdDbObjectId OdDbAssocCompoundActionParam::anchorId() const { assertReadEnabled(); return static_cast (m_pImpObj)->m_AnchorId1; } ////////////////////////////////////////////////////////////////////////// ODRX_DEFINE_MEMBERS_EX(OdDbAssocEdgeActionParam, // ClassName OdDbAssocActionParam, // ParentClass DBOBJECT_CONSTR, // DOCREATE OdDb::kDHL_1021, // DwgVer OdDb::kMRelease8, // MaintVer 1025, // nProxyFlags (kEraseAllowed | kDisableProxyWarning) L"AcDbAssocEdgeActionParam", // DWG class name L"ACDBASSOCEDGEACTIONPARAM", // DxfName L"ObjectDBX Classes", // AppName OdRx::kMTLoading | OdRx::kHistoryAware); OdDbAssocEdgeActionParam::OdDbAssocEdgeActionParam(bool createImpObj) // = true : OdDbAssocActionParam(false) { if (createImpObj) m_pImpObj = new OdDbImpAssocEdgeActionParam(); } void OdDbAssocEdgeActionParam::composeForLoad(OdDb::SaveType, OdDb::DwgVersion, OdDbAuditInfo*) { OdDbImpAssocEdgeActionParam* pImpl = static_cast (m_pImpObj); OdDbObjectId depId = pImpl->m_DependencyId; if (depId.isNull()) return; OdDbAssocDependencyPtr pDepPath = OdDbAssocDependency::cast(depId.openObject(OdDb::kForWrite)); if (pDepPath.get() && pDepPath->dependentOnObject().objectClass()->isDerivedFrom(OdDbCurve::desc())) { // methods OdDbImpAssocEdgeActionParam::dwgInFields/dwgOutFields/dxfInFields/dxfOutFields // do not save/restory interval of curve. So the interval is[0; 1] by default, instead of[0; length]. // To restory the correct interval, we have to call OdDbAssocDependency::setStatus(kChangedDirectlyAssocStatus); // for path curve, corresponding to the array. OdDbObjectId idAction = ownerId(); OdDbAssocActionPtr pAssocAction = OdDbAssocAction::cast(idAction.openObject()); if (pAssocAction.isNull()) return; // CORE-17631 problem with DbAssocDimensionTest OdDbObjectId idBody = pAssocAction->actionBody(); OdDbAssocActionBodyPtr pBody = OdDbAssocActionBody::cast(idBody.openObject()); if (OdDbAssocArrayActionBody::cast(pBody.get()).isNull()) { ODA_ASSERT_ONCE_X(ASSOC, OdDbCenterMarkActionBody::cast(pBody.get()).get()); // test return; // CORE-17631 problem with DbAssocDimensionTest } // force to update interval in OdDbImpAssocArrayActionBody::evaluateOverride() pDepPath->setStatus(kChangedDirectlyAssocStatus); // updateAssocArrayPathInterval // CORE-14767 } } OdResult OdDbAssocEdgeActionParam::setEdgeRef(const OdDbEdgeRef& edgeRef, bool isReadDependency, // = true bool isWriteDependency, // = false int dependencyOrder) // = 0 { return static_cast (m_pImpObj)->setEdgeRef( edgeRef, isReadDependency, isWriteDependency, dependencyOrder, parentAction() ); } OdResult OdDbAssocEdgeActionParam::getEdgeRef(OdArray& edgeRefs) const { return static_cast (m_pImpObj)->getEdgeRef( edgeRefs ); } OdResult OdDbAssocEdgeActionParam::setEdgeSubentityGeometry(const OdGeCurve3d* pNewEdgeCurve) { return static_cast (m_pImpObj)->setEdgeSubentityGeometry( pNewEdgeCurve ); } OdResult OdDbAssocEdgeActionParam::getDependentOnCompoundObject(OdDbCompoundObjectId& compoundId) const { return static_cast (m_pImpObj)->getDependentOnCompoundObject( compoundId ); } OdResult OdDbAssocEdgeActionParam::getEdgeRefEval(OdArray& edgeRefs) { return static_cast (m_pImpObj)->getEdgeRefEval(edgeRefs); } ////////////////////////////////////////////////////////////////////////// ODRX_DEFINE_MEMBERS_EX(OdDbAssocFaceActionParam, // ClassName OdDbAssocActionParam, // ParentClass DBOBJECT_CONSTR, // DOCREATE OdDb::kDHL_1021, // DwgVer OdDb::kMRelease8, // MaintVer 1025, // nProxyFlags (kEraseAllowed | kDisableProxyWarning) L"AcDbAssocFaceActionParam", // DWG class name L"ACDBASSOCFACEACTIONPARAM", // DxfName L"ObjectDBX Classes", // AppName OdRx::kMTLoading | OdRx::kHistoryAware); OdDbAssocFaceActionParam::OdDbAssocFaceActionParam(bool createImpObj) // = true : OdDbAssocActionParam(false) { if (createImpObj) m_pImpObj = new OdDbImpAssocFaceActionParam(); } OdResult OdDbAssocFaceActionParam::setFaceRef(const OdDbFaceRef& /*faceRef*/, bool /*isReadDependency*/, // = true bool /*isWriteDependency*/, // = false int /*dependencyOrder*/) // = 0 { ODA_FAIL_ONCE(); // TODO return eNotImplementedYet; } OdResult OdDbAssocFaceActionParam::getFaceRef(OdArray& /*faceRefs*/) const { ODA_FAIL_ONCE(); // TODO return eNotImplementedYet; } OdResult OdDbAssocFaceActionParam::setFaceSubentityGeometry(const OdGeSurface* /*pNewFaceSurface*/) { ODA_FAIL_ONCE(); // TODO return eNotImplementedYet; } OdResult OdDbAssocFaceActionParam::getDependentOnCompoundObject(OdDbCompoundObjectId& /*compoundId*/) const { ODA_FAIL_ONCE(); // TODO return eNotImplementedYet; } ////////////////////////////////////////////////////////////////////////// ODRX_DEFINE_MEMBERS_EX(OdDbAssocTrimmingBodyActionParam, // ClassName OdDbAssocFaceActionParam, // ParentClass DBOBJECT_CONSTR, // DOCREATE OdDb::kDHL_1021, // DwgVer OdDb::kMRelease125, // MaintVer 1025, // nProxyFlags (kEraseAllowed | kDisableProxyWarning) L"AcDbAssocTrimmingBodyActionParam", // DWG class name L"ACDBASSOCTRIMMINGBODYACTIONPARAM", // DxfName L"ObjectDBX Classes", // AppName OdRx::kMTLoading | OdRx::kHistoryAware); OdDbAssocTrimmingBodyActionParam::OdDbAssocTrimmingBodyActionParam(bool createImpObj) : OdDbAssocFaceActionParam(false) { if (createImpObj) m_pImpObj = new OdDbImpAssocTrimmingBodyActionParam(); } ////////////////////////////////////////////////////////////////////////// ODRX_DEFINE_MEMBERS_EX(OdDbAssocObjectActionParam, // ClassName OdDbAssocActionParam, // ParentClass DBOBJECT_CONSTR, // DOCREATE OdDb::kDHL_1021, // DwgVer OdDb::kMRelease8, // MaintVer 1025, // nProxyFlags (kEraseAllowed | kDisableProxyWarning) L"AcDbAssocObjectActionParam", // DWG class name L"ACDBASSOCOBJECTACTIONPARAM", // DxfName L"ObjectDBX Classes", // AppName OdRx::kMTLoading | OdRx::kHistoryAware); OdDbAssocObjectActionParam::OdDbAssocObjectActionParam(bool createImpObj) // = true : OdDbAssocActionParam(false) { if (createImpObj) m_pImpObj = new OdDbImpAssocObjectActionParam(); } OdDbObjectId OdDbAssocObjectActionParam::getSingleDependency() const { assertReadEnabled(); return static_cast(m_pImpObj)->m_DependencyId; } ////////////////////////////////////////////////////////////////////////// ODRX_DEFINE_MEMBERS_EX(OdDbAssocVertexActionParam, // ClassName OdDbAssocActionParam, // ParentClass DBOBJECT_CONSTR, // DOCREATE OdDb::kDHL_1021, // DwgVer OdDb::kMRelease8, // MaintVer 1025, // nProxyFlags (kEraseAllowed | kDisableProxyWarning) L"AcDbAssocVertexActionParam", // DWG class name L"ACDBASSOCVERTEXACTIONPARAM", // DxfName L"ObjectDBX Classes", // AppName OdRx::kMTLoading | OdRx::kHistoryAware); OdDbAssocVertexActionParam::OdDbAssocVertexActionParam(bool createImpObj) // = true : OdDbAssocActionParam(false) { if (createImpObj) m_pImpObj = new OdDbImpAssocVertexActionParam(); } OdResult OdDbAssocVertexActionParam::setVertexRef(const OdDbVertexRef& vertexRef, bool isReadDependency, // = true bool isWriteDependency, // = false int dependencyOrder) // = 0 { return static_cast (m_pImpObj)->setVertexRef( vertexRef, isReadDependency, isWriteDependency, dependencyOrder, parentAction() ); } OdResult OdDbAssocVertexActionParam::getVertexRef(OdArray& vertexRefs) const { return static_cast (m_pImpObj)->getVertexRef( vertexRefs ); } OdResult OdDbAssocVertexActionParam::getVertexRefEval(OdArray& vertexRefs) { return static_cast (m_pImpObj)->getVertexRefEval(vertexRefs); } OdResult OdDbAssocVertexActionParam::getVertexRef(OdDbVertexRef& vertexRef) const { return static_cast (m_pImpObj)->getVertexRef( vertexRef ); } OdResult OdDbAssocVertexActionParam::setVertexSubentityGeometry(const OdGePoint3d& /*newPosition*/) { ODA_FAIL_ONCE(); // TODO return eNotImplementedYet; } OdResult OdDbAssocVertexActionParam::getDependentOnCompoundObject(OdDbCompoundObjectId& /*compoundId*/) const { ODA_FAIL_ONCE(); // TODO return eNotImplementedYet; } ////////////////////////////////////////////////////////////////////////// ODRX_DEFINE_MEMBERS_EX(OdDbAssocPointRefActionParam, // ClassName OdDbAssocCompoundActionParam, // ParentClass DBOBJECT_CONSTR, // DOCREATE OdDb::kDHL_1021, // DwgVer OdDb::kMRelease8, // MaintVer 1025, // nProxyFlags (kEraseAllowed | kDisableProxyWarning) L"AcDbAssocPointRefActionParam", // DWG class name L"ACDBASSOCPointRefActionParam", // DxfName L"ObjectDBX Classes", // AppName OdRx::kMTLoading | OdRx::kHistoryAware); OdDbAssocPointRefActionParam::OdDbAssocPointRefActionParam(bool createImpObj) // = true : OdDbAssocCompoundActionParam(false) { if (createImpObj) m_pImpObj = new OdDbImpAssocPointRefActionParam(); } ODRX_DEFINE_MEMBERS_EX(OdDbAssocOsnapPointRefActionParam, // ClassName OdDbAssocPointRefActionParam, // ParentClass DBOBJECT_CONSTR, // DOCREATE OdDb::kDHL_1027, // DwgVer OdDb::kMRelease125, // MaintVer 1025, // nProxyFlags (kEraseAllowed | kDisableProxyWarning) L"AcDbAssocOsnapPointRefActionParam", // DWG class name L"ACDBASSOCOSNAPPOINTREFACTIONPARAM", // DxfName L"ObjectDBX Classes", // AppName OdRx::kMTLoading | OdRx::kHistoryAware); OdDbAssocOsnapPointRefActionParam::OdDbAssocOsnapPointRefActionParam(bool createImpObj) // = true : OdDbAssocPointRefActionParam(false) { if (createImpObj) m_pImpObj = new OdDbImpAssocOsnapPointRefActionParam(); } OdResult OdDbAssocOsnapPointRefActionParam::dwgInFields(OdDbDwgFiler* pFiler) { ODA_ASSERT_ONCE(m_pImpObj); if (!m_pImpObj) return eMakeMeProxy; OdResult res = OdDbObject::dwgInFields(pFiler); if (res != eOk) return res; return m_pImpObj->dwgInFields(pFiler, objectId()); } void OdDbAssocOsnapPointRefActionParam::dwgOutFields(OdDbDwgFiler* pFiler) const { OdDbObject::dwgOutFields(pFiler); m_pImpObj->dwgOutFields(pFiler, objectId()); } OdResult OdDbAssocOsnapPointRefActionParam::dxfInFields(OdDbDxfFiler* pFiler) { ODA_ASSERT_ONCE(m_pImpObj); if (!m_pImpObj) return eMakeMeProxy; OdResult res = OdDbObject::dxfInFields(pFiler); if (res != eOk) return res; return m_pImpObj->dxfInFields(pFiler, objectId()); } void OdDbAssocOsnapPointRefActionParam::dxfOutFields(OdDbDxfFiler* pFiler) const { OdDbObject::dxfOutFields(pFiler); m_pImpObj->dxfOutFields(pFiler, objectId()); } OdDb::OsnapMode OdDbAssocOsnapPointRefActionParam::osnapMode() const { assertReadEnabled(); return static_cast(m_pImpObj)->osnapMode(); } double OdDbAssocOsnapPointRefActionParam::nearPointParam() const { assertReadEnabled(); return static_cast (m_pImpObj)->nearPointParam(); } void OdDbAssocOsnapPointRefActionParam::setOsnapMode(OdDb::OsnapMode mode) { static_cast (m_pImpObj)->setOsnapMode(mode); } void OdDbAssocOsnapPointRefActionParam::setParam(double param) { static_cast (m_pImpObj)->setParam(param); } OdDbOsnapPointRefPtr OdDbAssocOsnapPointRefActionParam::asOsnapPointRef() const { assertReadEnabled(); return static_cast(m_pImpObj)->asOsnapPointRef(this); } OdResult OdDbAssocOsnapPointRefActionParam::evaluatePointOverride(OdGePoint3d& evalPnt) const { assertReadEnabled(); return static_cast(m_pImpObj)->evaluatePointOverride(evalPnt); } OdResult OdDbAssocOsnapPointRefActionParam::createInstanceAndPostToDatabase(const OdDbObjectId& bodyId, OdDb::OsnapMode osnapMode, const OdDbFullSubentPath& path, const OdGePoint3d& point, OdDbObjectId& paramId) { return OdDbImpAssocOsnapPointRefActionParam::createInstanceAndPostToDatabase(bodyId, osnapMode, path, point, paramId); } ////////////////////////////////////////////////////////////////////////////// ODRX_DEFINE_MEMBERS_EX(OdDbAssocPathActionParam, // ClassName OdDbAssocCompoundActionParam, // ParentClass DBOBJECT_CONSTR, // DOCREATE OdDb::kDHL_1021, // DwgVer OdDb::kMRelease125, // MaintVer 1025, // nProxyFlags (kEraseAllowed | kDisableProxyWarning) L"AcDbAssocPathActionParam", // DWG class name L"ACDBASSOCPATHACTIONPARAM", // DxfName L"ObjectDBX Classes", // AppName OdRx::kMTLoading | OdRx::kHistoryAware); OdDbAssocPathActionParam::OdDbAssocPathActionParam(bool createImpObj) // = true : OdDbAssocCompoundActionParam(false) { if (createImpObj) m_pImpObj = new OdDbImpAssocPathActionParam(); } ////////////////////////////////////////////////////////////////////////////// ODRX_DEFINE_MEMBERS_EX(OdDbAssocTrimmingPathActionParam, // ClassName OdDbAssocPathActionParam, // ParentClass DBOBJECT_CONSTR, // DOCREATE OdDb::kDHL_1021, // DwgVer OdDb::kMRelease125, // MaintVer 1025, // nProxyFlags (kEraseAllowed | kDisableProxyWarning) L"AcDbAssocTrimmingPathActionParam", // DWG class name L"ACDBASSOCTRIMMINGPATHACTIONPARAM", // DxfName L"ObjectDBX Classes", // AppName OdRx::kMTLoading | OdRx::kHistoryAware); OdDbAssocTrimmingPathActionParam::OdDbAssocTrimmingPathActionParam(bool createImpObj) // = true : OdDbAssocPathActionParam(false) { if (createImpObj) m_pImpObj = new OdDbImpAssocTrimmingPathActionParam(); }