proj_projects.hpp
上传用户:yhdzpy8989
上传日期:2007-06-13
资源大小:13604k
文件大小:5k
- /*
- * ===========================================================================
- * PRODUCTION $Log: proj_projects.hpp,v $
- * PRODUCTION Revision 1000.1 2004/06/16 17:05:20 gouriano
- * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.6
- * PRODUCTION
- * ===========================================================================
- */
- #ifndef PROJECT_TREE_BUILDER__PROJ_PROJECTS__HPP
- #define PROJECT_TREE_BUILDER__PROJ_PROJECTS__HPP
- /* $Id: proj_projects.hpp,v 1000.1 2004/06/16 17:05:20 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.
- *
- * ===========================================================================
- *
- * Author: Viatcheslav Gorelenkov
- *
- */
- //#include <app/project_tree_builder/proj_item.hpp>
- #include <corelib/ncbienv.hpp>
- #include <app/project_tree_builder/proj_utils.hpp>
- BEGIN_NCBI_SCOPE
- class CProjectDummyFilter : public IProjectFilter
- {
- public:
- CProjectDummyFilter(void)
- {
- }
- virtual ~CProjectDummyFilter(void)
- {
- }
- virtual bool CheckProject(const string& project_base_dir) const
- {
- return true;
- }
- virtual bool PassAll (void) const
- {
- return true;
- }
- private:
- // Prohibited to:
- CProjectDummyFilter(const CProjectDummyFilter&);
- CProjectDummyFilter& operator= (const CProjectDummyFilter&);
- };
- class CProjectOneNodeFilter : public IProjectFilter
- {
- public:
- //
- CProjectOneNodeFilter(const string& root_src_dir,
- const string& subtree_dir);
- virtual ~CProjectOneNodeFilter(void)
- {
- }
- virtual bool CheckProject(const string& project_base_dir) const;
- virtual bool PassAll (void) const
- {
- return m_PassAll;
- }
- private:
- typedef list<string> TPath;
- string m_RootSrcDir;
- string m_SubtreeDir;
- TPath m_SubtreePath;
- bool m_PassAll;
- // Prohibited to:
- CProjectOneNodeFilter(void);
- CProjectOneNodeFilter(const CProjectOneNodeFilter&);
- CProjectOneNodeFilter& operator= (const CProjectOneNodeFilter&);
- };
- class CProjectsLstFileFilter : public IProjectFilter
- {
- public:
- // create from .lst file
- CProjectsLstFileFilter(const string& root_src_dir,
- const string& file_full_path);
- virtual ~CProjectsLstFileFilter(void)
- {
- }
- virtual bool CheckProject(const string& project_base_dir) const;
- virtual bool PassAll (void) const
- {
- return false;
- }
- private:
- typedef list<string> TPath;
- string m_RootSrcDir;
- struct SLstElement
- {
- TPath m_Path;
- bool m_Recursive;
- };
- /// One .lst file
- typedef list<SLstElement> TLstFileContents;
- TLstFileContents m_LstFileContentsInclude;
- TLstFileContents m_LstFileContentsExclude;
-
- static bool CmpLstElementWithPath(const SLstElement& elt,
- const TPath& path);
- // Prohibited to:
- CProjectsLstFileFilter(void);
- CProjectsLstFileFilter(const CProjectsLstFileFilter&);
- CProjectsLstFileFilter& operator= (const CProjectsLstFileFilter&);
- };
- END_NCBI_SCOPE
- /*
- * ===========================================================================
- * $Log: proj_projects.hpp,v $
- * Revision 1000.1 2004/06/16 17:05:20 gouriano
- * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.6
- *
- * Revision 1.6 2004/06/10 15:12:55 gorelenk
- * Added newline at the file end to avoid GCC warning.
- *
- * Revision 1.5 2004/03/18 19:11:12 gorelenk
- * Added m_LstFileContentsExclude member to class CProjectsLstFileFilter.
- *
- * Revision 1.4 2004/02/26 21:26:11 gorelenk
- * Removed all older class declarations. Added declaration of classes that
- * implements IProjectFilter interface: CProjectDummyFilter,
- * CProjectOneNodeFilter and CProjectsLstFileFilter.
- *
- * Revision 1.3 2004/02/18 23:34:30 gorelenk
- * Added declaration of class CProjProjectsSets.
- *
- * ===========================================================================
- */
- #endif //PROJECT_TREE_BUILDER__PROJ_PROJECTS__HPP