Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:16

0001 // Created on: 2003-10-13
0002 // Created by: Alexander SOLOVYOV
0003 // Copyright (c) 2003-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 _MeshVS_TextPrsBuilder_HeaderFile
0017 #define _MeshVS_TextPrsBuilder_HeaderFile
0018 
0019 #include <MeshVS_DataMapOfIntegerAsciiString.hxx>
0020 #include <MeshVS_PrsBuilder.hxx>
0021 #include <MeshVS_DisplayModeFlags.hxx>
0022 #include <MeshVS_BuilderPriority.hxx>
0023 
0024 class MeshVS_Mesh;
0025 class Quantity_Color;
0026 class MeshVS_DataSource;
0027 class TCollection_AsciiString;
0028 
0029 DEFINE_STANDARD_HANDLE(MeshVS_TextPrsBuilder, MeshVS_PrsBuilder)
0030 
0031 //! This class provides methods to create text data presentation.
0032 //! It store map of texts assigned with nodes or elements.
0033 class MeshVS_TextPrsBuilder : public MeshVS_PrsBuilder
0034 {
0035 
0036 public:
0037 
0038   
0039   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);
0040   
0041   //! Builds presentation of text data
0042   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;
0043   
0044   //! Returns map of text assigned with nodes ( IsElement = False ) or elements ( IsElement = True )
0045   Standard_EXPORT const MeshVS_DataMapOfIntegerAsciiString& GetTexts (const Standard_Boolean IsElement) const;
0046   
0047   //! Sets map of text assigned with nodes or elements
0048   Standard_EXPORT void SetTexts (const Standard_Boolean IsElement, const MeshVS_DataMapOfIntegerAsciiString& Map);
0049   
0050   //! Returns True if map isn't empty
0051   Standard_EXPORT Standard_Boolean HasTexts (const Standard_Boolean IsElement) const;
0052   
0053   //! Returns text assigned with single node or element
0054   Standard_EXPORT Standard_Boolean GetText (const Standard_Boolean IsElement, const Standard_Integer ID, TCollection_AsciiString& Text) const;
0055   
0056   //! Sets text assigned with single node or element
0057   Standard_EXPORT void SetText (const Standard_Boolean IsElement, const Standard_Integer ID, const TCollection_AsciiString& Text);
0058 
0059 
0060 
0061 
0062   DEFINE_STANDARD_RTTIEXT(MeshVS_TextPrsBuilder,MeshVS_PrsBuilder)
0063 
0064 protected:
0065 
0066 
0067 
0068 
0069 private:
0070 
0071 
0072   MeshVS_DataMapOfIntegerAsciiString myNodeTextMap;
0073   MeshVS_DataMapOfIntegerAsciiString myElemTextMap;
0074 
0075 
0076 };
0077 
0078 
0079 
0080 
0081 
0082 
0083 
0084 #endif // _MeshVS_TextPrsBuilder_HeaderFile