0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / MeshVS / MeshVS_TextPrsBuilder.hxx
CommitLineData
42cf5bc1 1// Created on: 2003-10-13
2// Created by: Alexander SOLOVYOV
3// Copyright (c) 2003-2014 OPEN CASCADE SAS
4//
5// This file is part of Open CASCADE Technology software library.
6//
7// This library is free software; you can redistribute it and/or modify it under
8// the terms of the GNU Lesser General Public License version 2.1 as published
9// by the Free Software Foundation, with special exception defined in the file
10// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11// distribution for complete text of the license and disclaimer of any warranty.
12//
13// Alternatively, this file may be used under the terms of Open CASCADE
14// commercial license or contractual agreement.
15
16#ifndef _MeshVS_TextPrsBuilder_HeaderFile
17#define _MeshVS_TextPrsBuilder_HeaderFile
18
42cf5bc1 19#include <MeshVS_DataMapOfIntegerAsciiString.hxx>
20#include <MeshVS_PrsBuilder.hxx>
42cf5bc1 21#include <MeshVS_DisplayModeFlags.hxx>
42cf5bc1 22#include <MeshVS_BuilderPriority.hxx>
7dd7c146 23
42cf5bc1 24class MeshVS_Mesh;
25class Quantity_Color;
26class MeshVS_DataSource;
42cf5bc1 27class TCollection_AsciiString;
28
42cf5bc1 29DEFINE_STANDARD_HANDLE(MeshVS_TextPrsBuilder, MeshVS_PrsBuilder)
30
31//! This class provides methods to create text data presentation.
32//! It store map of texts assigned with nodes or elements.
33class MeshVS_TextPrsBuilder : public MeshVS_PrsBuilder
34{
35
36public:
37
38
39 Standard_EXPORT MeshVS_TextPrsBuilder(const Handle(MeshVS_Mesh)& Parent, const Standard_Real Height, const Quantity_Color& Color, const MeshVS_DisplayModeFlags& Flags = MeshVS_DMF_TextDataPrs, const Handle(MeshVS_DataSource)& DS = 0, const Standard_Integer Id = -1, const MeshVS_BuilderPriority& Priority = MeshVS_BP_Text);
40
41 //! Builds presentation of text data
79104795 42 Standard_EXPORT virtual void Build (const Handle(Prs3d_Presentation)& Prs, const TColStd_PackedMapOfInteger& IDs, TColStd_PackedMapOfInteger& IDsToExclude, const Standard_Boolean IsElement, const Standard_Integer theDisplayMode) const Standard_OVERRIDE;
42cf5bc1 43
44 //! Returns map of text assigned with nodes ( IsElement = False ) or elements ( IsElement = True )
45 Standard_EXPORT const MeshVS_DataMapOfIntegerAsciiString& GetTexts (const Standard_Boolean IsElement) const;
46
47 //! Sets map of text assigned with nodes or elements
48 Standard_EXPORT void SetTexts (const Standard_Boolean IsElement, const MeshVS_DataMapOfIntegerAsciiString& Map);
49
50 //! Returns True if map isn't empty
51 Standard_EXPORT Standard_Boolean HasTexts (const Standard_Boolean IsElement) const;
52
53 //! Returns text assigned with single node or element
54 Standard_EXPORT Standard_Boolean GetText (const Standard_Boolean IsElement, const Standard_Integer ID, TCollection_AsciiString& Text) const;
55
56 //! Sets text assigned with single node or element
57 Standard_EXPORT void SetText (const Standard_Boolean IsElement, const Standard_Integer ID, const TCollection_AsciiString& Text);
58
59
60
61
92efcf78 62 DEFINE_STANDARD_RTTIEXT(MeshVS_TextPrsBuilder,MeshVS_PrsBuilder)
42cf5bc1 63
64protected:
65
66
67
68
69private:
70
71
72 MeshVS_DataMapOfIntegerAsciiString myNodeTextMap;
73 MeshVS_DataMapOfIntegerAsciiString myElemTextMap;
74
75
76};
77
78
79
80
81
82
83
84#endif // _MeshVS_TextPrsBuilder_HeaderFile