UTQuitRequestTask.h

Go to the documentation of this file.
00001 //==================================================================================================
00002 // Copyright (C) 2010  Brian Tietz    sdbtietz at yahoo dot com
00003 //
00004 // This program is free software; you can redistribute it and/or modify it under the terms of the
00005 // GNU General Public License as published by the Free Software Foundation, version 2.0 of the
00006 // License.
00007 //
00008 // This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
00009 // even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00010 // General Public License for more details.
00011 //
00012 // You should have received a copy of the GNU General Public License along with this program; if
00013 // not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00014 // 02110-1301, USA.
00015 //
00016 // For commercial software, the copyright holder (Brian Tietz, email sdbtietz at yahoo dot com)
00017 // reserves the right and is willing to waive the proprietary source code disclosure aspects of that
00018 // license as applied to the UT library in exchange for either substantial contributions to the
00019 // development of the UT library or other forms of compensation.  Any such waiver must be
00020 // established in writing between the copyright holder and the commercial entity obtaining such a
00021 // waiver.
00022 //==================================================================================================
00023 
00024 
00025 #ifndef _UT_QUIT_REQUEST_TASK_H_
00026 #define _UT_QUIT_REQUEST_TASK_H_
00027 
00028 
00029 //==================================================================================================
00030 //=== Project headers
00031 //==================================================================================================
00032 #include "UTMessage.h"
00033 #include "UTTask.h"
00034 
00035 
00036 //==================================================================================================
00037 class UT_EXPORT QuitResponseMessage_t
00038 //==================================================================================================
00039 : public Message_t
00041 {
00042     //----------------------------------------------------------------------------------------------
00043     public:
00044     //----------------------------------------------------------------------------------------------
00045     inline                  QuitResponseMessage_t(  MessageLoop_t* message_loop,
00046                                                     quit_response_t response );
00048 
00049     inline MessageLoop_t*   MessageLoop() const;
00051 
00052     inline quit_response_t  Response() const;
00054 
00055     //----------------------------------------------------------------------------------------------
00056     private:
00057     //----------------------------------------------------------------------------------------------
00058     MessageLoop_t*          m_message_loop;
00059     quit_response_t         m_response;
00060 };
00061 
00062 
00063 // \cond DOXYGEN_DOCUMENT_NEVER
00064 
00065 //==================================================================================================
00066 class UT_EXPORT QuitRequestTask_t
00067 //==================================================================================================
00068 : public Task_t
00069 {
00070     //----------------------------------------------------------------------------------------------
00071     public:
00072     //----------------------------------------------------------------------------------------------
00073                                                                 QuitRequestTask_t();
00074     virtual                                                     ~QuitRequestTask_t();
00075 
00076     void QuitRequestReceived(const Message_t* message);
00077     MessageReceiver_t< QuitRequestTask_t, Message_t > m_QuitRequestReceiver;
00078 
00079     void QuitResumeReceived(const Message_t* message);
00080     MessageReceiver_t< QuitRequestTask_t, Message_t > m_QuitResumeReceiver;
00081 };
00082 
00083 // \endcond
00084 
00085 
00086 
00087 
00088 //==================================================================================================
00089 //==================================================================================================
00090 //===
00091 //=== Inline function implementations
00092 //===
00093 //==================================================================================================
00094 //==================================================================================================
00095 inline
00096 QuitResponseMessage_t::QuitResponseMessage_t(   MessageLoop_t* message_loop,
00097                                                 quit_response_t response )
00098 {
00099     m_message_loop = message_loop;
00100     m_response = response;
00101 }
00102 
00103 
00104 inline MessageLoop_t*
00105 QuitResponseMessage_t::MessageLoop() const
00106 {
00107     return m_message_loop;
00108 }
00109 
00110 
00111 inline quit_response_t
00112 QuitResponseMessage_t::Response() const
00113 {
00114     return m_response;
00115 }
00116 
00117 
00118 #endif // _UT_QUIT_REQUEST_TASK_H_
00119 

Generated on Tue Dec 14 22:35:05 2010 for UT library by  doxygen 1.6.1