Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:28

0001 // Created on: 1993-07-16
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 _TopTools_LocationSet_HeaderFile
0018 #define _TopTools_LocationSet_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <TopLoc_IndexedMapOfLocation.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <Standard_OStream.hxx>
0026 #include <Standard_IStream.hxx>
0027 #include <Message_ProgressRange.hxx>
0028 
0029 class TopLoc_Location;
0030 
0031 
0032 //! The class LocationSet stores a set of location in
0033 //! a relocatable state.
0034 //!
0035 //! It can be created from Locations.
0036 //!
0037 //! It can create Locations.
0038 //!
0039 //! It can be write and read from a stream.
0040 class TopTools_LocationSet 
0041 {
0042 public:
0043 
0044   DEFINE_STANDARD_ALLOC
0045 
0046   
0047   //! Returns an empty set of locations.
0048   Standard_EXPORT TopTools_LocationSet();
0049   
0050   //! Clears the content of the set.
0051   Standard_EXPORT void Clear();
0052   
0053   //! Incorporate a new Location in the  set and returns
0054   //! its index.
0055   Standard_EXPORT Standard_Integer Add (const TopLoc_Location& L);
0056   
0057   //! Returns the location of index <I>.
0058   Standard_EXPORT const TopLoc_Location& Location (const Standard_Integer I) const;
0059   
0060   //! Returns the index of <L>.
0061   Standard_EXPORT Standard_Integer Index (const TopLoc_Location& L) const;
0062   
0063   //! Dumps the content of me on the stream <OS>.
0064   Standard_EXPORT void Dump (Standard_OStream& OS) const;
0065   
0066   //! Writes the content of  me  on the stream <OS> in a
0067   //! format that can be read back by Read.
0068   Standard_EXPORT void Write (Standard_OStream& OS,
0069                               const Message_ProgressRange& theProgress = Message_ProgressRange()) const;
0070   
0071   //! Reads the content of me from the  stream  <IS>. me
0072   //! is first cleared.
0073   Standard_EXPORT void Read (Standard_IStream& IS,
0074                              const Message_ProgressRange& theProgress = Message_ProgressRange());
0075 
0076 private:
0077 
0078   TopLoc_IndexedMapOfLocation myMap;
0079 };
0080 
0081 #endif // _TopTools_LocationSet_HeaderFile