NeoPZ
|
This class implements a very simple interface from PZ kernel to GUI. Module: Common. More...
#include <TPZGuiInterface.h>
Public Member Functions | |
TPZGuiInterface () | |
virtual | ~TPZGuiInterface () |
TPZGuiInterface (const TPZGuiInterface &gui) | |
TPZGuiInterface & | operator= (const TPZGuiInterface &gui) |
int | ClassId () const override |
Define the class id associated with the class. More... | |
void | Read (TPZStream &buf, void *context) override |
read objects from the stream More... | |
void | Write (TPZStream &buf, int withclassid) const override |
Writes this object to the TPZStream buffer. Include the classid if withclassid = true. More... | |
virtual void | Start () |
virtual void | UpdateCaption () |
virtual void | End () |
virtual void | ShowErrorMessage (std::string message) |
void | SetKilled () |
bool | AmIKilled () |
std::string | Message () |
void | SetMessage (const std::string &message) |
int & | ProgressBarPos () |
int & | ProgressBarMaxPos () |
int & | ProgressBarMinPos () |
Public Member Functions inherited from TPZSavable | |
TPZSavable () | |
virtual | ~TPZSavable () |
virtual std::list< std::map< std::string, uint64_t > > | VersionHistory () const |
virtual std::pair< std::string, uint64_t > | Version () const |
virtual bool | Compare (TPZSavable *copy, bool override=false) |
Compares the object for identity with the object pointed to, eventually copy the object. More... | |
virtual bool | Compare (TPZSavable *copy, bool override=false) const |
Compares the object for identity with the object pointed to, eventually copy the object. More... | |
Public Member Functions inherited from TPZRegisterClassId | |
template<typename T > | |
TPZRegisterClassId (int(T::*)() const) | |
TPZRegisterClassId ()=default | |
Protected Attributes | |
bool | fCanceled |
std::string | fMessage |
int | fProgressBarPos |
int | fProgressBarMaxPos |
int | fProgressBarMinPos |
Additional Inherited Members | |
Static Public Member Functions inherited from TPZSavable | |
static std::set< TPZRestoreClassBase * > & | RestoreClassSet () |
This static function guarantees that the gMap object is available when needed. More... | |
static std::map< int, TPZRestore_t > & | ClassIdMap () |
This static function guarantees that the gMap object is available when needed. More... | |
static std::pair< std::string, uint64_t > | NeoPZVersion () |
static void | Register (TPZRestoreClassBase *restore) |
static void | RegisterClassId (int classid, TPZRestore_t fun) |
static TPZSavable * | CreateInstance (const int &classId) |
This class implements a very simple interface from PZ kernel to GUI. Module: Common.
Definition at line 24 of file TPZGuiInterface.h.
TPZGuiInterface::TPZGuiInterface | ( | ) |
Default constructor
Definition at line 12 of file TPZGuiInterface.cpp.
References fCanceled, fProgressBarMaxPos, fProgressBarMinPos, and fProgressBarPos.
|
virtual |
Default destructor
Definition at line 20 of file TPZGuiInterface.cpp.
|
inline |
Definition at line 45 of file TPZGuiInterface.h.
References DebugStop.
bool TPZGuiInterface::AmIKilled | ( | ) |
Returns whether the process was canceled
Definition at line 85 of file TPZGuiInterface.cpp.
References fCanceled.
Referenced by TPZAnalysis::AmIKilled(), TPZDohrStructMatrix::Assemble(), TPZFrontStructMatrix< front >::AssembleNew(), TPZParFrontStructMatrix< front >::ElementAssemble(), TPZParFrontStructMatrix< front >::GlobalAssemble(), TPZStructMatrixGCTP::MultiThread_Assemble(), TPZStructMatrixGC::MultiThread_Assemble(), TPZStructMatrixCS::MultiThread_Assemble(), TPZStructMatrixOT::MultiThread_Assemble(), TPZStructMatrixOR::MultiThread_Assemble(), TPZStructMatrixCS::ThreadData::NextElement(), TPZStructMatrixST::OnlyAssemble(), operator=(), TPZStructMatrixGCTP::Serial_Assemble(), TPZStructMatrixGC::Serial_Assemble(), TPZStructMatrixCS::Serial_Assemble(), TPZStructMatrixOT::Serial_Assemble(), TPZStructMatrixOR::Serial_Assemble(), TPZStructMatrixOR::ThreadData::ThreadAssembly(), TPZStructMatrixOR::ThreadData::ThreadWork(), TPZStructMatrixGC::ThreadData::ThreadWork(), TPZStructMatrixCS::ThreadData::ThreadWork(), TPZStructMatrixOT::ThreadData::ThreadWork(), TPZStructMatrixGC::ThreadData::ThreadWorkResidual(), and TPZStructMatrixOT::ThreadData::ThreadWorkResidual().
|
overridevirtual |
Define the class id associated with the class.
This id has to be unique for all classes A non unique id is flagged at the startup of the program
Implements TPZSavable.
Definition at line 24 of file TPZGuiInterface.cpp.
References Hash().
Referenced by operator=().
|
virtual |
Updates the GUI with ending messages
This method must be reimplemented in derived classes for better messages
Definition at line 70 of file TPZGuiInterface.cpp.
Referenced by operator=().
std::string TPZGuiInterface::Message | ( | ) |
Message attribute for UpdateGUI method
Definition at line 54 of file TPZGuiInterface.cpp.
References fMessage.
Referenced by operator=().
|
inline |
Definition at line 51 of file TPZGuiInterface.h.
References AmIKilled(), ClassId(), DebugStop, End(), fCanceled, fMessage, fProgressBarMaxPos, fProgressBarMinPos, fProgressBarPos, Message(), Read(), SetKilled(), SetMessage(), ShowErrorMessage(), Start(), UpdateCaption(), and Write().
|
inline |
Progress bar attributes for UpdateGUI method
Definition at line 102 of file TPZGuiInterface.h.
References fProgressBarMaxPos.
|
inline |
Progress bar attributes for UpdateGUI method
Definition at line 107 of file TPZGuiInterface.h.
References fProgressBarMinPos.
|
inline |
Progress bar attributes for UpdateGUI method
Definition at line 97 of file TPZGuiInterface.h.
References fProgressBarPos.
|
overridevirtual |
read objects from the stream
Reimplemented from TPZSavable.
Definition at line 28 of file TPZGuiInterface.cpp.
References fCanceled, fMessage, fProgressBarMaxPos, fProgressBarMinPos, fProgressBarPos, and TPZStream::Read().
Referenced by operator=().
void TPZGuiInterface::SetKilled | ( | ) |
Defines the process has been canceled
Definition at line 80 of file TPZGuiInterface.cpp.
References fCanceled.
Referenced by operator=().
void TPZGuiInterface::SetMessage | ( | const std::string & | message | ) |
Change the message of the object
Definition at line 60 of file TPZGuiInterface.cpp.
References fMessage.
Referenced by operator=().
|
virtual |
Show an error message.
This method must be reimplemented in derived classes for better messages
Definition at line 74 of file TPZGuiInterface.cpp.
References PZError.
Referenced by operator=().
|
virtual |
Updates the GUI with start messages
This method must be reimplemented in derived classes for better messages
Definition at line 66 of file TPZGuiInterface.cpp.
Referenced by operator=().
|
virtual |
Updates the GUI
This method must be reimplemented in derived classes for better messages
Definition at line 44 of file TPZGuiInterface.cpp.
References fMessage, fProgressBarMaxPos, and fProgressBarPos.
Referenced by operator=().
|
overridevirtual |
Writes this object to the TPZStream buffer. Include the classid if withclassid = true.
Writes this object to the TPZStream buffer. Include the classid if withclassid = true
Reimplemented from TPZSavable.
Definition at line 36 of file TPZGuiInterface.cpp.
References fCanceled, fMessage, fProgressBarMaxPos, fProgressBarMinPos, fProgressBarPos, and TPZStream::Write().
Referenced by operator=().
|
protected |
Flag indicating if the thread is alive or if its canceling was requested
Definition at line 29 of file TPZGuiInterface.h.
Referenced by AmIKilled(), operator=(), Read(), SetKilled(), TPZGuiInterface(), and Write().
|
protected |
Message attribute for UpdateGUI method
Definition at line 32 of file TPZGuiInterface.h.
Referenced by Message(), operator=(), Read(), SetMessage(), UpdateCaption(), and Write().
|
protected |
Definition at line 35 of file TPZGuiInterface.h.
Referenced by operator=(), ProgressBarMaxPos(), Read(), TPZGuiInterface(), UpdateCaption(), and Write().
|
protected |
Definition at line 35 of file TPZGuiInterface.h.
Referenced by operator=(), ProgressBarMinPos(), Read(), TPZGuiInterface(), and Write().
|
protected |
Progress bar attributes for UpdateGUI method
Definition at line 35 of file TPZGuiInterface.h.
Referenced by operator=(), ProgressBarPos(), Read(), TPZGuiInterface(), UpdateCaption(), and Write().