0031845: Modeling Algorithms - BRepOffsetAPI_MakeThickSolid fails
[occt.git] / src / XCAFPrs / XCAFPrs_DocumentNode.hxx
CommitLineData
fc552d84 1// Author: Kirill Gavrilov
2// Copyright (c) 2017-2019 OPEN CASCADE SAS
3//
4// This file is part of Open CASCADE Technology software library.
5//
6// This library is free software; you can redistribute it and/or modify it under
7// the terms of the GNU Lesser General Public License version 2.1 as published
8// by the Free Software Foundation, with special exception defined in the file
9// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10// distribution for complete text of the license and disclaimer of any warranty.
11//
12// Alternatively, this file may be used under the terms of Open CASCADE
13// commercial license or contractual agreement.
14
15#ifndef _XCAFPrs_DocumentNode_HeaderFile
16#define _XCAFPrs_DocumentNode_HeaderFile
17
18#include <XCAFPrs_Style.hxx>
19
20#include <TDF_ChildIterator.hxx>
21#include <TDF_Label.hxx>
22#include <TopLoc_Location.hxx>
23
24//! Structure defining document node.
25struct XCAFPrs_DocumentNode
26{
27 TCollection_AsciiString Id; //!< string identifier
28 TDF_Label Label; //!< label in the document
29 TDF_Label RefLabel; //!< reference label in the document
30 XCAFPrs_Style Style; //!< node style
31 TopLoc_Location Location; //!< node global transformation
32 TopLoc_Location LocalTrsf; //!< node transformation relative to parent
33 TDF_ChildIterator ChildIter; //!< child iterator
34 Standard_Boolean IsAssembly; //!< flag indicating that this label is assembly
35
36 XCAFPrs_DocumentNode() : IsAssembly (Standard_False) {}
01b2f506 37
38public: // Methods for hash map
39
40 //! Return hash code based on node string identifier.
41 static Standard_Integer HashCode (const XCAFPrs_DocumentNode& theNode,
42 const Standard_Integer theN)
43 {
44 return ::HashCode (theNode.Id, theN);
45 }
46
47 //! Return TRUE if two document nodes has the same string identifier.
48 static Standard_Boolean IsEqual (const XCAFPrs_DocumentNode& theNode1,
49 const XCAFPrs_DocumentNode& theNode2)
50 {
51 return theNode1.Id == theNode2.Id;
52 }
53
fc552d84 54};
55
56#endif // _XCAFPrs_DocumentNode_HeaderFile