Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:42

0001 // Created on: 1993-07-19
0002 // Created by: Remi LEQUETTE
0003 // Copyright (c) 1993-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _GeomTools_SurfaceSet_HeaderFile
0018 #define _GeomTools_SurfaceSet_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TColStd_IndexedMapOfTransient.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <Standard_OStream.hxx>
0027 #include <Standard_IStream.hxx>
0028 #include <Message_ProgressRange.hxx>
0029 
0030 class Geom_Surface;
0031 
0032 
0033 //! Stores a set of Surfaces from Geom.
0034 class GeomTools_SurfaceSet 
0035 {
0036 public:
0037 
0038   DEFINE_STANDARD_ALLOC
0039 
0040   
0041   //! Returns an empty set of Surfaces.
0042   Standard_EXPORT GeomTools_SurfaceSet();
0043   
0044   //! Clears the content of the set.
0045   Standard_EXPORT void Clear();
0046   
0047   //! Incorporate a new Surface in the  set and returns
0048   //! its index.
0049   Standard_EXPORT Standard_Integer Add (const Handle(Geom_Surface)& S);
0050   
0051   //! Returns the Surface of index <I>.
0052   Standard_EXPORT Handle(Geom_Surface) Surface (const Standard_Integer I) const;
0053   
0054   //! Returns the index of <L>.
0055   Standard_EXPORT Standard_Integer Index (const Handle(Geom_Surface)& S) const;
0056   
0057   //! Dumps the content of me on the stream <OS>.
0058   Standard_EXPORT void Dump (Standard_OStream& OS) const;
0059   
0060   //! Writes the content of  me  on the stream <OS> in a
0061   //! format that can be read back by Read.
0062   Standard_EXPORT void Write (Standard_OStream& OS,
0063                               const Message_ProgressRange& theProgress = Message_ProgressRange()) const;
0064   
0065   //! Reads the content of me from the  stream  <IS>. me
0066   //! is first cleared.
0067   Standard_EXPORT void Read (Standard_IStream& IS,
0068                              const Message_ProgressRange& theProgress = Message_ProgressRange());
0069   
0070   //! Dumps the surface on the stream,  if compact is True
0071   //! use the compact format that can be read back.
0072   Standard_EXPORT static void PrintSurface (const Handle(Geom_Surface)& S,
0073                                             Standard_OStream& OS,
0074                                             const Standard_Boolean compact = Standard_False);
0075   
0076   //! Reads the surface  from  the stream.  The  surface  is
0077   //! assumed   to have  been  written  with  the Print
0078   //! method (compact = True).
0079   Standard_EXPORT static Handle(Geom_Surface) ReadSurface (Standard_IStream& IS);
0080 
0081 private:
0082 
0083   TColStd_IndexedMapOfTransient myMap;
0084 
0085 };
0086 
0087 #endif // _GeomTools_SurfaceSet_HeaderFile