Regina Calculation Engine
Public Member Functions | Protected Member Functions | List of all members
regina::NProgressMessage Class Reference

A progress report in which the current state of progress is stored as a string message. More...

#include <progress/nprogresstypes.h>

Inheritance diagram for regina::NProgressMessage:
regina::NProgress regina::ShareableObject regina::NMutex regina::boost::noncopyable

Public Member Functions

 NProgressMessage ()
 Creates a new progress report with an empty progress message. More...
 
 NProgressMessage (const std::string &newMessage)
 Creates a new progress report with the given progress message. More...
 
 NProgressMessage (const char *newMessage)
 Creates a new progress report with the given progress message. More...
 
std::string getMessage () const
 Returns a reference to the current progress message. More...
 
void setMessage (const std::string &newMessage)
 Sets the current progress message to the given string. More...
 
void setMessage (const char *newMessage)
 Sets the current progress message to the given string. More...
 
- Public Member Functions inherited from regina::NProgress
 NProgress ()
 Performs basic initialisation. More...
 
virtual ~NProgress ()
 Destroys this object. More...
 
bool hasChanged () const
 Determines if the state of progress has changed since the last query. More...
 
bool isFinished () const
 Is the operation whose progress we are reporting completely finished? More...
 
void setFinished ()
 Signifies that the operation whose progress we are reporting is completely finished. More...
 
void cancel () const
 Called by an external interface to request that the operation whose progress we are reporting be cancelled. More...
 
bool isCancelled () const
 Determines whether an external interface has requested that the operation whose progress we are reporting be cancelled. More...
 
std::string getDescription () const
 Returns a string description of the current state of progress. More...
 
virtual bool isPercent () const
 Determines if the state of progress can be expressed as a percentage. More...
 
double getPercent () const
 Returns the current state of progress as a percentage. More...
 
long getRealTime () const
 Returns the real time elapsed since this operation began. More...
 
long totalCPUTime () const
 Returns the total CPU time consumed by the program from the beginning to the end of this operation. More...
 
void writeTextShort (std::ostream &out) const
 Writes this object in short text format to the given output stream. More...
 
- Public Member Functions inherited from regina::ShareableObject
 ShareableObject ()
 Default constructor that does nothing. More...
 
virtual ~ShareableObject ()
 Default destructor that does nothing. More...
 
virtual void writeTextLong (std::ostream &out) const
 Writes this object in long text format to the given output stream. More...
 
std::string str () const
 Returns the output from writeTextShort() as a string. More...
 
std::string toString () const
 A deprecated alias for str(), which returns the output from writeTextShort() as a string. More...
 
std::string detail () const
 Returns the output from writeTextLong() as a string. More...
 
std::string toStringLong () const
 A deprecated alias for detail(), which returns the output from writeTextLong() as a string. More...
 

Protected Member Functions

virtual std::string internalGetDescription () const
 Returns a string description of the current state of progress. More...
 
- Protected Member Functions inherited from regina::NProgress
virtual double internalGetPercent () const
 Returns the current state of progress as a percentage. More...
 
- Protected Member Functions inherited from regina::NMutex
 NMutex ()
 Creates a new mutex. More...
 
 ~NMutex ()
 Destroys this mutex. More...
 

Additional Inherited Members

- Protected Attributes inherited from regina::NProgress
bool changed
 Has the state of progress changed since the last query? More...
 
bool cancelled
 Has this operation been cancelled? More...
 

Detailed Description

A progress report in which the current state of progress is stored as a string message.

Python:
Not present; all progress classes communicate with external interfaces through the NProgress interface.
Deprecated:
This class is deprecated. Please use the more flexible and more streamlined NProgressTracker class instead.

Constructor & Destructor Documentation

regina::NProgressMessage::NProgressMessage ( )
inline

Creates a new progress report with an empty progress message.

Note that the internal mutex is not locked during construction.

regina::NProgressMessage::NProgressMessage ( const std::string &  newMessage)
inline

Creates a new progress report with the given progress message.

Note that the internal mutex is not locked during construction.

Parameters
newMessagethe current state of progress.
regina::NProgressMessage::NProgressMessage ( const char *  newMessage)
inline

Creates a new progress report with the given progress message.

Note that the internal mutex is not locked during construction.

Parameters
newMessagethe current state of progress.

Member Function Documentation

std::string regina::NProgressMessage::getMessage ( ) const
inline

Returns a reference to the current progress message.

Returns
the current progress message.
std::string regina::NProgressMessage::internalGetDescription ( ) const
inlineprotectedvirtual

Returns a string description of the current state of progress.

This function must not touch the mutex, and is not required to alter the changed flag. The getDescription() routine takes care of all of these issues.

Precondition
The mutex is currently locked.
Returns
the current state of progress.

Implements regina::NProgress.

void regina::NProgressMessage::setMessage ( const std::string &  newMessage)
inline

Sets the current progress message to the given string.

Parameters
newMessagethe new state of progress.
void regina::NProgressMessage::setMessage ( const char *  newMessage)
inline

Sets the current progress message to the given string.

Parameters
newMessagethe new state of progress.

The documentation for this class was generated from the following file:

Copyright © 1999-2013, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).