/////////////////////////////////////////////////////////////////////////////// // 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 "DbAssocArrayPathParameters.h" #include "DbImpAssocArrayParameters.h" ODRX_DEFINE_MEMBERS_EX(OdDbAssocArrayPathParameters, // ClassName OdDbAssocArrayCommonParameters, // ParentClass RXIMPL_CONSTR, // DOCREATE (RXIMPL_CONSTR DBOBJECT_CONSTR) OdDb::kDHL_1024, // DwgVer OdDb::kMRelease6, // MaintVer 1025, // nProxyFlags (kEraseAllowed | kDisableProxyWarning) L"AcDbAssocArrayPathParameters", // DWG class name L"ACDBASSOCARRAYPATHPARAMETERS", // DxfName L"ObjectDBX Classes", // AppName OdRx::kMTLoading | OdRx::kHistoryAware); OdDbAssocArrayPathParameters::OdDbAssocArrayPathParameters(double itemSpacing, // = 1 double rowSpacing, // = 1 double levelSpacing, // = 1 int itemCount, // = 1 int rowCount, // = 1 int levelCount, // = 1 double rowElevation) // = 1 : OdDbAssocArrayCommonParameters(new OdDbImpAssocArrayPathParameters(itemSpacing, rowSpacing, levelSpacing, itemCount, rowCount, levelCount, rowElevation)) { } //protected: OdDbAssocArrayPathParameters::OdDbAssocArrayPathParameters(OdDbImpAssocArrayPathParameters* pImpl) : OdDbAssocArrayCommonParameters(pImpl) { } OdDbAssocArrayPathParameters::~OdDbAssocArrayPathParameters() { } int OdDbAssocArrayPathParameters::itemCount(OdString& expression, OdString& evaluatorId) const { OdDbImpAssocArrayPathParameters* pImpl = OdDbImpAssocArrayPathParameters::getImpl(this); return pImpl->itemCount( expression, evaluatorId ); } int OdDbAssocArrayPathParameters::itemCount() const { OdString expression, evaluatorId; return itemCount(expression, evaluatorId); } int OdDbAssocArrayPathParameters::itemCount(OdString & expression) const { OdString evaluatorId; return itemCount(expression, evaluatorId); } double OdDbAssocArrayPathParameters::itemSpacing(OdString& expression, OdString& evaluatorId) const { OdDbImpAssocArrayPathParameters* pImpl = OdDbImpAssocArrayPathParameters::getImpl(this); return pImpl->itemSpacing( expression, evaluatorId ); } double OdDbAssocArrayPathParameters::itemSpacing() const { OdString expression, evaluatorId; return itemSpacing(expression, evaluatorId); } double OdDbAssocArrayPathParameters::itemSpacing(OdString& expression) const { OdString evaluatorId; return itemSpacing(expression, evaluatorId); } OdDbEdgeRef OdDbAssocArrayPathParameters::path() const { OdDbImpAssocArrayPathParameters* pImpl = OdDbImpAssocArrayPathParameters::getImpl(this); return pImpl->path(); } OdDbAssocArrayPathParameters::Method OdDbAssocArrayPathParameters::method() const { OdDbImpAssocArrayPathParameters* pImpl = OdDbImpAssocArrayPathParameters::getImpl(this); return static_cast (pImpl->method()); } bool OdDbAssocArrayPathParameters::alignItems() const { OdDbImpAssocArrayPathParameters* pImpl = OdDbImpAssocArrayPathParameters::getImpl(this); return pImpl->alignItems(); } double OdDbAssocArrayPathParameters::startOffset(OdString& expression, OdString& evaluatorId) const { OdDbImpAssocArrayPathParameters* pImpl = OdDbImpAssocArrayPathParameters::getImpl(this); return pImpl->startOffset( expression, evaluatorId ); } double OdDbAssocArrayPathParameters::startOffset() const { OdString expression, evaluatorId; return startOffset(expression, evaluatorId); } double OdDbAssocArrayPathParameters::endOffset(OdString& expression, OdString& evaluatorId) const { OdDbImpAssocArrayPathParameters* pImpl = OdDbImpAssocArrayPathParameters::getImpl(this); return pImpl->endOffset( expression, evaluatorId ); } double OdDbAssocArrayPathParameters::endOffset() const { OdString expression, evaluatorId; return endOffset(expression, evaluatorId); } OdResult OdDbAssocArrayPathParameters::setItemCount(int nItems, const OdString& expression, // = OdString::kEmpty const OdString& evaluatorId, // = OdString::kEmpty OdString& sErrorMessage) // = NULL { OdDbImpAssocArrayPathParameters* pImpl = OdDbImpAssocArrayPathParameters::getImpl(this); return pImpl->setItemCount(nItems, expression, evaluatorId, sErrorMessage); } OdResult OdDbAssocArrayPathParameters::setItemSpacing(double offset, const OdString& expression, // = OdString::kEmpty const OdString& evaluatorId, // = OdString::kEmpty OdString& sErrorMessage) // = NULL { OdDbImpAssocArrayPathParameters* pImpl = OdDbImpAssocArrayPathParameters::getImpl(this); return pImpl->setItemSpacing( offset, expression, evaluatorId, sErrorMessage); } OdResult OdDbAssocArrayPathParameters::setRowCount(int nRows, const OdString& expression, // = OdString::kEmpty const OdString& evaluatorId, // = OdString::kEmpty OdString& sErrorMessage) // = const_cast(OdString::kEmpty) { if (nRows <= 0) return eMustBePositive; // NETCLASSIC-609 subtest createPathArrayDiffer_NET609 return OdDbAssocArrayCommonParameters::setRowCount(nRows, expression, evaluatorId, sErrorMessage); } OdResult OdDbAssocArrayPathParameters::setRowSpacing(double offset, const OdString& expression, // = OdString::kEmpty const OdString& evaluatorId, // = OdString::kEmpty OdString& sErrorMessage) // = const_cast(OdString::kEmpty) { if (OdZero(offset)) return eMustBeNonZero; // NETCLASSIC-609 subtest createPathArrayDiffer_NET609 return OdDbAssocArrayCommonParameters::setRowSpacing(offset, expression, evaluatorId, sErrorMessage); } OdResult OdDbAssocArrayPathParameters::setLevelCount(int nLevels, const OdString& expression, // = OdString::kEmpty const OdString& evaluatorId, // = OdString::kEmpty OdString& sErrorMessage) // = const_cast(OdString::kEmpty) { if (nLevels <= 0) return eMustBePositive; // NETCLASSIC-609 subtest createPathArrayDiffer_NET609 return OdDbAssocArrayCommonParameters::setLevelCount(nLevels, expression, evaluatorId, sErrorMessage); } OdResult OdDbAssocArrayPathParameters::setLevelSpacing(double offset, const OdString& expression, // = OdString::kEmpty const OdString& evaluatorId, // = OdString::kEmpty OdString& sErrorMessage) // = const_cast(OdString::kEmpty) { if (OdZero(offset)) return eMustBeNonZero; // NETCLASSIC-609 subtest createPathArrayDiffer_NET609 return OdDbAssocArrayCommonParameters::setLevelSpacing(offset, expression, evaluatorId, sErrorMessage); } OdResult OdDbAssocArrayPathParameters::setPath(const OdDbEdgeRef& edgeRef) { OdDbImpAssocArrayPathParameters* pImpl = OdDbImpAssocArrayPathParameters::getImpl(this); return pImpl->setPath( edgeRef ); } OdResult OdDbAssocArrayPathParameters::setMethod(Method method) { OdDbImpAssocArrayPathParameters* pImpl = OdDbImpAssocArrayPathParameters::getImpl(this); return pImpl->setMethod( method ); } OdResult OdDbAssocArrayPathParameters::setAlignItems(bool bAlignItems) { OdDbImpAssocArrayPathParameters* pImpl = OdDbImpAssocArrayPathParameters::getImpl(this); return pImpl->setAlignItems( bAlignItems ); } OdResult OdDbAssocArrayPathParameters::setStartOffset(double startOffset, const OdString& expression, // = OdString::kEmpty const OdString& evaluatorId, // = OdString::kEmpty OdString* sErrorMessage) // = NULL { OdDbImpAssocArrayPathParameters* pImpl = OdDbImpAssocArrayPathParameters::getImpl(this); return pImpl->setStartOffset( startOffset, expression, evaluatorId, sErrorMessage); } OdResult OdDbAssocArrayPathParameters::setEndOffset(double endOffset, const OdString& expression, // = OdString::kEmpty const OdString& evaluatorId, // = OdString::kEmpty OdString* sErrorMessage) // = NULL { OdDbImpAssocArrayPathParameters* pImpl = OdDbImpAssocArrayPathParameters::getImpl(this); return pImpl->setEndOffset(endOffset, expression, evaluatorId, sErrorMessage); } OdResult OdDbAssocArrayPathParameters::setPathDirection(bool bAlongParams) { OdDbImpAssocArrayPathParameters* pImpl = OdDbImpAssocArrayPathParameters::getImpl(this); return pImpl->setPathDirection(bAlongParams); } OdResult OdDbAssocArrayPathParameters::getItems(OdArray& items) const { return m_pImpl->getItems( items ); } OdResult OdDbAssocArrayPathParameters::getItemPosition(const OdDbItemLocator& locator, OdGePoint3d& position, OdGeMatrix3d& xform) const { return m_pImpl->getItemPosition( locator, position, xform ); } OdResult OdDbAssocArrayPathParameters::getItemPosition(const OdDbItemLocator& locator, OdGePoint3d& position) const { OdGeMatrix3d xform; return getItemPosition(locator, position, xform); }