lgrSystemInterface.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 
00009 
00010 #ifndef lgrSystemInterface_H_
00011 #define lgrSystemInterface_H_
00012 
00013 #include "lgrCore.h"
00014 #include "lgrInterface.h"
00015 #include "virtualConstructor.h"
00016 #include "signalSlot.h"
00017 #include "threadSafe.h"
00018 
00019 #include <memory>
00020 
00021 namespace MAKLogger
00022 {
00023    class DtLgrSystemCommandFactory;
00024    class DtLgrMessageOutputListener;
00025 
00029    class DT_DLL_LGRCORE DtLgrSystemInterface : public DtCommandInterface
00030    {
00031    public:
00032 
00033       typedef DtLgrSystemCommandFactory Factory;
00034 
00036       DT_VIRTUAL_CTR(DtLgrSystemInterface,(DtLogger&))
00037 
00038       
00039       virtual ~DtLgrSystemInterface();
00040 
00041    private:
00043       DtLgrSystemInterface(const DtLgrSystemInterface&);
00045       DtLgrSystemInterface& operator=(const DtLgrSystemInterface&);
00046    public:
00047 
00049       virtual void issueTextCommand(const DtString& commandString)  const;
00050 
00052       virtual void cancelLongOperation() const;
00053 
00055       virtual void deleteFile(const DtString& filename)  const;
00056 
00058       virtual void setNotifyLevel(int vlLevel,int lgrLevel) const;
00059 
00061       virtual void shutdown()  const;
00062 
00064       virtual bool timeToShutdown() const;
00065 
00067       virtual const DtString& operationName() const;
00068 
00070       virtual const DtString& operationMessage() const;
00071 
00073       virtual int operationProgress() const;
00074 
00076       virtual bool operationInterruptible() const;
00077 
00079       virtual bool wasOperationCanceled() const;
00080 
00082       virtual void installOutputListener(
00083          std::auto_ptr<DtLgrMessageOutputListener> listener) const;
00084 
00086       DtValueSignal<DtString> messageSignal;
00087 
00089       DtValueSignal<DtString> consoleMessageSignal;
00090 
00093       DtValueSignal<bool> operationSignal;
00094 
00096       DtValueSignal<bool> shutdownSignal;
00097 
00099       DtValueSignal<DtString> operationMessageSignal;
00100 
00102       DtValueSignal<int> operationProgressSignal;
00103 
00105       bool basicGuiFlag() const;
00106 
00107    protected:
00108       void connectResponseHandler(DtLgrCommandId id,
00109          void (DtLgrSystemInterface::* function)(DtResponse));
00110 
00111       void messageReceived(DtResponse);
00112       void consoleMessageReceived(DtResponse);
00113       void requestShutdown(DtResponse);
00114 
00115       void basicGuiFlagSet(DtResponse);
00116 
00117       void longOperationStarted(DtResponse);
00118       void longOperationFinished(DtResponse);
00119       void longOperationUpdated(DtResponse);
00120 
00121       DtThreadSafe<bool>* myCancelFlag;
00122       DtString myMessage;
00123       DtString myConsoleMessage;
00124 
00125       DtString myOperationName;
00126       DtString myOperationMessage;
00127       bool myOperationRunningFlag;
00128       int myOperationProgress;
00129       bool myOperationInterruptible;
00130       bool myOperationCanceledFlag;
00131 
00132       bool myTimeToShutdown;
00133       bool myBasicGuiFlag;
00134    };
00135 
00136 }
00137 
00138 #endif

Document ID: Generated on Tue Oct 11 19:41:03 EDT 2011 from SVN revision 107422
Copyright © 2005-2011 VT MÄK Inc. All Rights Reserved (www.mak.com)