⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 data_store.hpp

📁 ncbi源码
💻 HPP
字号:
/* * =========================================================================== * PRODUCTION $Log: data_store.hpp,v $ * PRODUCTION Revision 1000.1  2003/11/05 15:23:59  gouriano * PRODUCTION PRODUCTION: UPGRADED [ORIGINAL] Dev-tree R1.4 * PRODUCTION * =========================================================================== */#ifndef GUI_CORE___DATA_STORE__HPP#define GUI_CORE___DATA_STORE__HPP/*  $Id: data_store.hpp,v 1000.1 2003/11/05 15:23:59 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: *    CDataStore -- general clearing-house storage for abstract data */#include <corelib/ncbiobj.hpp>BEGIN_NCBI_SCOPEclass NCBI_GUICORE_EXPORT CDataStore{public:    // clear all objects from the data store.  This is provided for proper    // termination.    static void Clear(void);    // retrieve a named object from the data store    static CObject& GetObject(const string& name);    // put an object in the data store.  This will return true if the    // operation succeded, false if the object already exists in the store.    static bool     PutObject(const string& name, CObject& obj);    // release an object from the data store    static void     ReleaseObject(const string& name);    // check to see if a named object exists    static bool     HasObject(const string& name);    // check to see if a given object is in the store    static bool     HasObject(const CObject& obj);private:    typedef map<string, CRef<CObject> > TObjMap;    static TObjMap sm_Map;};END_NCBI_SCOPE/* * =========================================================================== * $Log: data_store.hpp,v $ * Revision 1000.1  2003/11/05 15:23:59  gouriano * PRODUCTION: UPGRADED [ORIGINAL] Dev-tree R1.4 * * Revision 1.4  2003/11/04 17:09:34  dicuccio * Added Clear().  Added comments.  Changed return value of PutObject() to notify * on collision * * Revision 1.3  2003/08/01 20:37:49  vakatov * Cosmetics -- added NL at EOF to heed compilation warning * * Revision 1.2  2003/07/31 20:07:30  dicuccio * Added function to remove objects from the store * * Revision 1.1  2003/07/31 19:38:05  dicuccio * Initial revision * * =========================================================================== */#endif // GUI_CORE___DATA_STORE__HPP

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -