/////////////////////////////////////////////////////////////////////////////// // 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 _DbBlockParamValueSet_h_Included_ #define _DbBlockParamValueSet_h_Included_ #include "TD_PackPush.h" #include "Ge/GeDoubleArray.h" #include "RxObjectImpl.h" #include "DbEvalGraph.h" class OdDbBlockParamValueSetImpl; /** \details Old version of the parameter value set. Based on doubles. Is actually used everywhere in dynamic blocks. */ class DYNBLOCKS_EXPORT OdDbBlockParamValueSet : public OdRxObject { protected: OdDbBlockParamValueSet(OdDbBlockParamValueSetImpl*); public: ODRX_DECLARE_MEMBERS(OdDbBlockParamValueSet); /** \details Default constructor */ OdDbBlockParamValueSet(); /** \details Copy constructor */ OdDbBlockParamValueSet(const OdDbBlockParamValueSet&); virtual ~OdDbBlockParamValueSet(); /** \details Default assignment operator */ OdDbBlockParamValueSet& operator=(const OdDbBlockParamValueSet&); /** \details Alternative assignment operator */ void assign(const OdDbBlockParamValueSet& vs) { *this = vs; } /** \details Returns if the value set restricts the angular direction */ bool angDir() const; /** \details Sets if the value set restricts the angular direction */ void setAngDir(bool); /** \details Returns if the value set restricts the angle value */ bool angular() const; /** \details Sets if the value set restricts the angle value */ void setAngular(bool); /** \details Returns the value set's maximum allowed value */ double maximum()const; /** \details Sets the value set's maximum allowed value */ void setMaximum(double value); /** \details Sets the value set's maximum allowed value and the flag telling if the value set is restricted from above */ void setMaximum(double value, bool useMaximum); /** \details Returns true if the value set is restricted from above */ bool useMaximum() const; /** \details Sets if the value set is restricted from above */ void setUseMaximum(bool u); /** \details Returns the value set's minimum allowed value */ double minimum() const; /** \details Sets the value set's minimum allowed value */ void setMinimum(double value); /** \details Returns the value set's minimum allowed value and the flag telling if the value set is restricted from below */ void setMinimum(double value, bool useMinimum); /** \details Returns true if the value set is restricted from below */ bool useMinimum()const; /** \details Sets if the value set is restricted from below */ void setUseMinimum(bool u); /** \details Returns the value set increment step */ double increment() const; /** \details Sets the value set increment step */ void setIncrement(double value); /** \details Sets the value set increment step and the flag telling if the increment is used */ void setIncrement(double value, bool useIncrement); /** \details Returns true if the value set should use increment step */ bool useIncrement() const; /** \details Sets if the value set should use increment step */ void setUseIncrement(bool u); /** \details Returns true if the value set should use closed list */ bool useValueList() const; /** \details Sets if the value set should use closed list */ void setUseValueList(bool); /** \details Returns the list of values allowed by this value set */ OdGeDoubleArray valueList() const; /** \details Sets the list of values allowed by this value set */ void setValueList(const OdGeDoubleArray& l); /** \details Sets the list of values allowed by this value set and the flag telling that the value set should use that list */ void setValueList(const OdGeDoubleArray& l, bool useValueList); /** \details Returns if the value is allowed by by this value set */ virtual bool valueIsLegal(double value, double initial = 0) const; /** \details Returns the closest value allowed by by this value set */ virtual double closestLegalValue(double value, double initial = 0) const; /** \details Returns the list of values allowed by this values set including given value */ OdGeDoubleArray sortedValueListIncluding(double value) const; void updateValue(double value); virtual void dwgInFieldsHelper(OdDbDwgFiler* pFiler); virtual void dwgOutFieldsHelper(OdDbDwgFiler* pFiler) const; virtual void dxfInFieldsHelper(OdDbDxfFiler* pFiler, short, short, short, short); virtual void dxfOutFieldsHelper(OdDbDxfFiler* pFiler, short, short, short, short) const; private: friend class OdDbBlockParamValueSetImpl; OdDbBlockParamValueSetImpl* m_pImpl; }; typedef OdSmartPtr OdDbBlockParamValueSetPtr; #include "TD_PackPop.h" #endif // _DbBlockParamValueSet_h_Included_