plugin_thread.hpp
来自「ncbi源码」· HPP 代码 · 共 121 行
HPP
121 行
/* * =========================================================================== * PRODUCTION $Log: plugin_thread.hpp,v $ * PRODUCTION Revision 1000.0 2004/04/12 19:04:50 gouriano * PRODUCTION PRODUCTION: IMPORTED [CATCHUP_003] Dev-tree R1.1 * PRODUCTION * =========================================================================== */#ifndef GUI_CORE___PLUGIN_THREAD__HPP#define GUI_CORE___PLUGIN_THREAD__HPP/* $Id: plugin_thread.hpp,v 1000.0 2004/04/12 19:04:50 gouriano Exp $ * =========================================================================== * * PUBLIC DOMAIN NOTICE * National Center for Biotechnology Information * * This software/database is a "United States Government Work" under the * terms of the United States Copyright Act. It was written as part of * the author's official duties as a United States Government employee and * thus cannot be copyrighted. This software/database is freely available * to the public for use. The National Library of Medicine and the U.S. * Government have not placed any restriction on its use or reproduction. * * Although all reasonable efforts have been taken to ensure the accuracy * and reliability of the software and data, the NLM and the U.S. * Government do not and cannot warrant the performance or results that * may be obtained by using this software or data. The NLM and the U.S. * Government disclaim all warranties, express or implied, including * warranties of performance, merchantability or fitness for any particular * purpose. * * Please cite the author in any work or product based on this material. * * =========================================================================== * * Authors: Mike DiCuccio * * File Description: * */#include <corelib/ncbithr.hpp>#include <gui/core/plugin_handle.hpp>#include <gui/plugin/PluginMessage.hpp>BEGIN_NCBI_SCOPEclass CPluginThread;class CPluginTask : public CObject{public: CPluginTask(CPluginHandle& handle, objects::CPluginMessage& msg); // check to see if our task is completed bool IsCompleted(void) const; // once completed, we can call Finalize(). This takes care of // reply parsing void Finalize(void);private: // the plugin handle we launch CPluginHandle m_Handle; // the plugin message we send CRef<objects::CPluginMessage> m_Message; // the thread responsible for running our backround process CRef<CPluginThread> m_Thread; // internal processing function void x_ProcessReply(const objects::CPluginReply& reply) const;};class CPluginThread : public CThread{public: CPluginThread(CPluginHandle& handle, objects::CPluginMessage& msg); void* Main(void); bool IsCompleted(void) const { return m_Completed; }private: // the plugin handle we launch CPluginHandle m_Handle; // the plugin message we send CRef<objects::CPluginMessage> m_Message; // flag: have we completed running? bool m_Completed;};END_NCBI_SCOPE/* * =========================================================================== * $Log: plugin_thread.hpp,v $ * Revision 1000.0 2004/04/12 19:04:50 gouriano * PRODUCTION: IMPORTED [CATCHUP_003] Dev-tree R1.1 * * Revision 1.1 2003/12/22 19:20:42 dicuccio * Added implementation of plugin tasks (initial revision; not currently used) * * =========================================================================== */#endif // GUI_CORE___PLUGIN_THREAD__HPP
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?