stateObController.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 
00008 
00009 #ifndef stateObController_H_
00010 #define stateObController_H_
00011 
00012 #include "stateObserver.h"
00013 
00014 #include <lgrCommand.h>
00015 #include <lgrCommandDispatcher.h>
00016 
00017 namespace MAKLogger
00018 {
00019    class DtCommandInterface;
00020    class DtCommandDefinition;
00021    class DtStateObserverModel;
00022    class DtStateObserverView;
00023 
00026    class DT_DLL_STATEOBSERVER DtStateObserverController
00027    {
00028    public:
00029 
00030       static MAKLogger::DtLgrCommandType theCommandType;
00031 
00033       DtStateObserverController();
00034 
00036       virtual ~DtStateObserverController();
00037 
00039       void init(DtStateObserverModel* model,DtStateObserverView* view);
00040 
00044       void requestUpdate();
00045 
00047       void update();
00048 
00049       void updateView(const DtStateObserverModel*);
00050       void activateView();
00051       void deactivateView();
00052       void connectToLogger();
00053       void disconnectFromLogger();
00054 
00055 
00056    public:
00057 
00058       static MAKLogger::DtCommandDefinition defineRequestUpdateCommand();
00059 
00060    protected:
00061 
00062       MAKLogger::DtResponse createUpdateResponse(const DtStateObserverModel*);
00063       MAKLogger::DtResponse createActivateResponse();
00064       MAKLogger::DtResponse createDeactivateResponse();
00065 
00066       void decodeCommand(MAKLogger::DtCommand);
00067 
00068       MAKLogger::DtCommand createRequestUpdateCommand();
00069       void receiveUpdateResponse(MAKLogger::DtResponse);
00070       void receiveActivateResponse(MAKLogger::DtResponse);
00071       void receiveDeactivateResponse(MAKLogger::DtResponse);
00072 
00073       bool myWaitingFlag;
00074       bool myConnectedToLogger;
00075       DtStateObserverView* myView;
00076       DtStateObserverModel* myModel;
00077       MAKLogger::DtCommandInterface* myCommandInterface;
00078    };
00079 
00080 }
00081 
00082 #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)