source: trunk/packages/vizservers/nanovis/vrutil/include/vrutil/vrFilePath.h @ 2798

Last change on this file since 2798 was 2798, checked in by ldelgass, 12 years ago

Add emacs mode magic line in preparation for indentation cleanup

File size: 1.1 KB
Line 
1/* -*- mode: c++; c-basic-offset: 4; indent-tabs-mode: nil -*- */
2#pragma once
3
4#include <vrutil/vrUtil.h>
5#include <string>
6#include <list>
7
8#ifdef WIN32
9#pragma warning ( disable : 4251)
10#endif
11
12class VrUtilExport vrFilePath {
13        typedef std::list<std::string> StringList;
14        typedef std::list<std::string>::iterator StringListIter;
15
16        /**
17         * @brief application directory
18         */
19        static std::string _curDirectory;
20
21        /**
22         * @brief vrFilePath instance
23         */
24        static vrFilePath _instance;
25
26        /**
27         * @brief all default file paths
28         */
29        StringList _pathList;
30public :
31        /**
32         * @brief constructor
33         */
34        vrFilePath();
35
36        /**
37         * @brief find a file whose name is fileName and return its full path
38         * @param fileName a file name
39         * @return return full path of the file, but if not found, return ""
40         */
41        std::string getPath(const char* fileName);
42
43        /**
44         * @brief set default data paths
45         * @param filePath all default paths separated by colon(:)
46         */
47        void setPath(const std::string& filePath);
48
49    /**
50     *
51     */
52    void setWorkingDirectory(int argc, const char** argv);
53public :
54
55        /**
56         * @brief get vrFilePath instance
57         */
58        static vrFilePath* getInstance();
59
60};
61
62
Note: See TracBrowser for help on using the repository browser.