feat_show.hpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:4k
- /*
- * ===========================================================================
- * PRODUCTION $Log: feat_show.hpp,v $
- * PRODUCTION Revision 1000.1 2004/06/01 19:46:30 gouriano
- * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.3
- * PRODUCTION
- * ===========================================================================
- */
- #ifndef GUI_CONFIG___FEAT_SHOW__HPP
- #define GUI_CONFIG___FEAT_SHOW__HPP
- /* $Id: feat_show.hpp,v 1000.1 2004/06/01 19:46:30 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: Robert Smith
- *
- */
- /// @file feat_show.hpp
- #include <corelib/ncbistd.hpp>
- #include <gui/config/feat_config_inherited.hpp>
- #include <gui/config/settings_set.hpp>
- /** @addtogroup GUI_CONFIG
- *
- * @{
- */
- BEGIN_NCBI_SCOPE
- ///
- /// CFeatConfigShow - class to hold a boolean value (show or not) for features.
- ///
- /// Associates a boolean value with each feature type/subtype, which values
- /// can be inherited from those associated with 'master' feature types.
- class NCBI_GUICONFIG_EXPORT CFeatConfigShow : public CSettingsSet {
- public:
- CFeatConfigShow(objects::CPluginConfigCache* config_cache,
- const string& typedesc = "");
- /// use the following cstr when inheriting from this class.
- CFeatConfigShow(objects::CPluginConfigCache* config_cache,
- const string& type,
- const AutoPtr<IFactoryDefaultSettings>& fds,
- const string& typedesc = ""
- );
-
- /// Must define
- virtual bool LoadCurrentSettings(ELoadValueSource src);
- virtual bool SaveCurrentSettings(void);
-
- bool GetShow(int type, int subtype) const;
- void SetShow(int type, int subtype, bool show);
- void SetShowInherited(int type, int subtype, bool inherited);
- void ClearShows();
-
- private:
- CFeatConfigValues<bool> m_FeatShows;
- };
- class NCBI_GUICONFIG_EXPORT CFeatShowFactoryDefaults : public IFactoryDefaultSettings {
- public:
- virtual string Get(const string& key) const;
- };
- END_NCBI_SCOPE
- /* @} */
- /*
- * ===========================================================================
- *
- * $Log: feat_show.hpp,v $
- * Revision 1000.1 2004/06/01 19:46:30 gouriano
- * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.3
- *
- * Revision 1.3 2004/05/11 18:55:53 dicuccio
- * Changed doxygen modules - use GUI_CONFIG instead of PluginConfiguration
- *
- * Revision 1.2 2004/02/02 18:43:26 rsmith
- * add description to CSettingsSet, constructor and descendants.
- *
- * Revision 1.1 2003/12/29 14:17:12 rsmith
- * Seperated from feat_config.hpp/cpp
- *
- *
- * ===========================================================================
- */
- #endif /* GUI_CONFIG___FEAT_SHOW__HPP */