Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-16 09:17:56

0001 // Copyright (c) 2020 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef Message_ProgressSentry_HeaderFile
0015 #define Message_ProgressSentry_HeaderFile
0016 
0017 #include <Message_ProgressScope.hxx>
0018 
0019 //! Functionality of this class (Message_ProgressSentry) has been superseded by
0020 //! Message_ProgressScope. This class is kept just to simplify transition of an old code and will be
0021 //! removed in future.
0022 class Standard_DEPRECATED("Deprecated class, Message_ProgressScope should be used instead")
0023   Message_ProgressSentry : public Message_ProgressScope
0024 {
0025 public:
0026   //! Deprecated constructor, Message_ProgressScope should be created instead.
0027   Message_ProgressSentry(const Message_ProgressRange& theRange,
0028                          const char* const            theName,
0029                          const double                 theMin,
0030                          const double                 theMax,
0031                          const double                 theStep,
0032                          const bool                   theIsInf        = false,
0033                          const double                 theNewScopeSpan = 0.0)
0034       : Message_ProgressScope(theRange, theName, theMax, theIsInf)
0035   {
0036     if (theMin != 0.0 || theStep != 1.0 || theNewScopeSpan != 0.0)
0037     {
0038       throw Standard_ProgramError("Message_ProgressSentry, invalid parameters");
0039     }
0040   }
0041 
0042   //! Method Relieve() was replaced by Close() in Message_ProgressScope
0043   void Relieve() { Close(); }
0044 
0045 private:
0046   //! Message_ProgressRange should be passed to constructor instead of Message_ProgressIndicator.
0047   Message_ProgressSentry(const occ::handle<Message_ProgressIndicator>& theProgress,
0048                          const char* const                             theName,
0049                          const double                                  theMin,
0050                          const double                                  theMax,
0051                          const double                                  theStep,
0052                          const bool                                    theIsInf        = false,
0053                          const double                                  theNewScopeSpan = 0.0);
0054 };
0055 
0056 #endif // Message_ProgressSentry_HeaderFile