0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[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
1103eb60 40 bool operator==(const XCAFPrs_DocumentNode& theOther) const
01b2f506 41 {
1103eb60 42 return Id == theOther.Id;
01b2f506 43 }
1103eb60 44};
01b2f506 45
1103eb60 46namespace std
47{
48 template <>
49 struct hash<XCAFPrs_DocumentNode>
01b2f506 50 {
1103eb60 51 size_t operator()(const XCAFPrs_DocumentNode& theDocumentNode) const
52 {
53 return std::hash<TCollection_AsciiString>{}(theDocumentNode.Id);
54 }
55 };
56}
fc552d84 57
58#endif // _XCAFPrs_DocumentNode_HeaderFile