Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-17 09:22:37

0001 // Created on: 2004-01-09
0002 // Created by: Sergey KUUL
0003 // Copyright (c) 2004-2014 OPEN CASCADE SAS
0004 //
0005 // This file is part of Open CASCADE Technology software library.
0006 //
0007 // This library is free software; you can redistribute it and/or modify it under
0008 // the terms of the GNU Lesser General Public License version 2.1 as published
0009 // by the Free Software Foundation, with special exception defined in the file
0010 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0011 // distribution for complete text of the license and disclaimer of any warranty.
0012 //
0013 // Alternatively, this file may be used under the terms of Open CASCADE
0014 // commercial license or contractual agreement.
0015 
0016 #ifndef _XCAFDoc_DimTol_HeaderFile
0017 #define _XCAFDoc_DimTol_HeaderFile
0018 
0019 #include <Standard.hxx>
0020 #include <Standard_Type.hxx>
0021 
0022 #include <Standard_Integer.hxx>
0023 #include <NCollection_Array1.hxx>
0024 #include <NCollection_HArray1.hxx>
0025 #include <TDF_Attribute.hxx>
0026 class TCollection_HAsciiString;
0027 class Standard_GUID;
0028 class TDF_Label;
0029 class TDF_RelocationTable;
0030 
0031 //! attribute to store dimension and tolerance
0032 class XCAFDoc_DimTol : public TDF_Attribute
0033 {
0034 
0035 public:
0036   Standard_EXPORT XCAFDoc_DimTol();
0037 
0038   Standard_EXPORT static const Standard_GUID& GetID();
0039 
0040   Standard_EXPORT static occ::handle<XCAFDoc_DimTol> Set(
0041     const TDF_Label&                                label,
0042     const int                                       kind,
0043     const occ::handle<NCollection_HArray1<double>>& aVal,
0044     const occ::handle<TCollection_HAsciiString>&    aName,
0045     const occ::handle<TCollection_HAsciiString>&    aDescription);
0046 
0047   Standard_EXPORT void Set(const int                                       kind,
0048                            const occ::handle<NCollection_HArray1<double>>& aVal,
0049                            const occ::handle<TCollection_HAsciiString>&    aName,
0050                            const occ::handle<TCollection_HAsciiString>&    aDescription);
0051 
0052   Standard_EXPORT int GetKind() const;
0053 
0054   Standard_EXPORT occ::handle<NCollection_HArray1<double>> GetVal() const;
0055 
0056   Standard_EXPORT occ::handle<TCollection_HAsciiString> GetName() const;
0057 
0058   Standard_EXPORT occ::handle<TCollection_HAsciiString> GetDescription() const;
0059 
0060   Standard_EXPORT const Standard_GUID& ID() const override;
0061 
0062   Standard_EXPORT void Restore(const occ::handle<TDF_Attribute>& With) override;
0063 
0064   Standard_EXPORT occ::handle<TDF_Attribute> NewEmpty() const override;
0065 
0066   Standard_EXPORT void Paste(const occ::handle<TDF_Attribute>&       Into,
0067                              const occ::handle<TDF_RelocationTable>& RT) const override;
0068 
0069   //! Dumps the content of me into the stream
0070   Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override;
0071 
0072   DEFINE_STANDARD_RTTIEXT(XCAFDoc_DimTol, TDF_Attribute)
0073 
0074 private:
0075   int                                      myKind;
0076   occ::handle<NCollection_HArray1<double>> myVal;
0077   occ::handle<TCollection_HAsciiString>    myName;
0078   occ::handle<TCollection_HAsciiString>    myDescription;
0079 };
0080 
0081 #endif // _XCAFDoc_DimTol_HeaderFile