/////////////////////////////////////////////////////////////////////////////// // 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 _DAI_SET_H #define _DAI_SET_H #include "OdPlatformSettings.h" #include "OdaCommon.h" #include "daiAggrUnordered.h" #include "daiIteratorCollection.h" #include "daiConstIteratorCollection.h" #define STL_USING_MAP #include "OdaSTL.h" #include "TD_PackPush.h" namespace OdDAI { namespace { template bool customCompare(const TVAlueFind& left, const TVAlueFind& right) { return left < right; } } /** \details Template class for containers defined within a schema. */ template class DAI_EXPORT Set : public AggrUnordered { friend class Duplicator; public: typedef TItem template_type; typedef TItem value_type; typedef Set base_type; public: /**\details Creates a new Set aggregate. */ Set(); /**\details Creates a new Set aggregate. \param aggregationType [in] Aggregation type for Set. */ Set(const AggregationType* aggregationType); /**\details Copy constructor of Set aggregate. \param other [in] Aggregate to copy from. */ Set(const Set& other); /**\details Move constructor of Set aggregate. \param other [in] Aggregate to move from. */ Set(Set&& other); /** \details Equal to operator. \param aggr [in] Aggregate to compare. \returns Returns true if equal, otherwise false. */ bool operator == (const Set& aggr) const; /** \details Copy assignment operator. \param right [in] Aggregate to copy from. \returns Returns the reference to itself. */ Set& operator= (const Set& right); /** \details Move assignment operator. \param right [in] Aggregate to move from. \returns Returns the reference to itself. */ Set& operator= (Set&& right); /**\details Retrieves internal constant array of items. \returns Returns constant reference to internal items OdArray. */ const OdArray& getArray() const { return Aggr::instance*>()->getArray(); } /** \details Creates a nested aggregate item. \param newAggr [in/out] Output parameter. If succeeded it should filled by a pointer of new child aggregate. */ void createAggrInstance(Aggr*& newAggr); //DOM-IGNORE-BEGIN protected: Set(AggrInstance* defaultInstance); template friend class SetInstance; template friend class TypedAggrInstanceDefault; }; using SetOfDouble = Set; using SetOfDoublePtr = OdSharedPtr; using SetOfInt = Set; using SetOfIntPtr = OdSharedPtr ; using SetOfOdDAIObjectId = Set; using SetOfOdDAIObjectIdPtr = OdSharedPtr; using SetOfOdAnsiString = Set; using SetOfOdAnsiStringPtr = OdSharedPtr ; using SetOfSelect = Set