system_path.hpp

来自「ncbi源码」· HPP 代码 · 共 140 行

HPP
140
字号
/* * =========================================================================== * PRODUCTION $Log: system_path.hpp,v $ * PRODUCTION Revision 1000.2  2004/06/01 19:51:20  gouriano * PRODUCTION PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.5 * PRODUCTION * =========================================================================== */#ifndef GUI_UTILS___SYSTEM_PATH__HPP#define GUI_UTILS___SYSTEM_PATH__HPP/*  $Id: system_path.hpp,v 1000.2 2004/06/01 19:51: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. * * =========================================================================== * * Authors:  Robert G. Smith * * File Description: *    CSystemPath -- System dependent functions needed by CGBenchApp, the main *                   application class for GBENCH */#include <corelib/ncbistd.hpp>#include <gui/gui.hpp>/** @addtogroup GUI_UTILS * * @{ */BEGIN_NCBI_SCOPEclass NCBI_GUIUTILS_EXPORT CSystemPath{public:    // Utility function to hide the platform specifics of locating our    // standard directories and files.  This function is responsible for    // resolving '<std>', '<home>', and '<res>' correctly.    static string  ResolvePath(const string& path, const string& rel_name);    // Utility function to hide the platform specifics of locating our    // standard directories.  This function is responsible for resolving    // '<std>', '<home>', and '<res>' correctly, and further ensures that    // the relevant final name already exists as a file or directory.    // The 'path' parameter here contains a delimited set of directories    // to search in order.    static string  ResolvePathExisting(const string& path,                                       const string& delim = ",");    // Call the two paramter ResolvePath after splitting the path.    static string  ResolvePath(const string& path);        // the applicaton installation directory.  Usually the parent of the    // App Path.    // corresponds to the <std> alias above.    static string  GetStdPath(void);    // the user-specified home directory    // corresponds to the <home> alias above.    static string  GetHomePath(void);    // the user-specified home directory    // corresponds to the <res> alias above.    static string  GetResourcePath(void);};END_NCBI_SCOPE/* @} *//* * =========================================================================== * $Log: system_path.hpp,v $ * Revision 1000.2  2004/06/01 19:51:20  gouriano * PRODUCTION: UPGRADED [GCC34_MSVC7] Dev-tree R1.5 * * Revision 1.5  2004/05/20 12:24:26  dicuccio * Corrected comments.  Added resolver API for standard '<res>' alias mapping * * Revision 1.4  2004/05/03 12:41:10  dicuccio * Split library into gui_utils and gui_objutils.  Added #include for gui/gui.hpp * * Revision 1.3  2004/04/16 14:26:30  dicuccio * Added doxygen module tag.  Update include guard to reflect real location * * Revision 1.2  2004/02/18 17:15:40  dicuccio * Use correct export specifier * * Revision 1.1  2004/02/17 20:35:18  rsmith * moved core/settings.[ch]pp and core/system_path.[ch]pp to config and utils, respectively. * * Revision 1.4  2003/10/14 16:21:12  dicuccio * Added ResolvePathExisting() to search a set of paths to find the first * available one * * Revision 1.3  2003/08/25 17:57:12  rsmith * add member ResolvePath that splits and resolves a single string. * * Revision 1.2  2003/07/30 13:08:48  dicuccio * Added export specifier * * Revision 1.1  2003/07/30 12:52:12  dicuccio * Moved 'gbench_system.[h,c]pp' to 'system_path.[h,c]pp' * * Revision 1.2  2003/07/30 12:26:19  dicuccio * Changed name of system path accessor class * * Revision 1.1  2003/06/16 13:50:12  rsmith * initial checkin. Resolve paths in a system independent manner. * */#endif // GUI_UTILS___SYSTEM_PATH__HPP

⌨️ 快捷键说明

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