GazeTracker
FolderManager.h
1 #ifndef __FolderManager_h__
2 #define __FolderManager_h__
3 
4 
5 namespace VisageSDK
6 {
7  int __declspec(dllimport) initializeLicenseManager(const char *licenseKeyFileFolder);
8 
9  /** visage|SDK folder manager.
10  * Used to manage folders and files for all visage|SDK samples. All samples use it
11  * to:
12  * - make sure that they run from a correct exection folder
13  * - make sure that all required files are present
14  */
16  {
17  public:
18  /** Constructor
19  */
20  FolderManager();
21 
22  /** Destructor
23  */
24  ~FolderManager();
25 
26 #ifdef _UNICODE
27  void FolderManager::ConvertToANSI(LPCWSTR string, char *ansiString);
28  LPCWSTR FolderManager::ConvertToUNICODE(LPSTR string);
29 #endif
30 
31  /** Go to working folder.
32  * Go to the working folder of the application, defined in FolderManagerData.h.
33  */
34  void goToWorkingFolder();
35 
36  /** Initialise.
37  * Initialise the folder management:
38  * - find the visage|SDK root folder and go there
39  * - from there, go to the working folder of the particular application, defined in FolderManagerData.h
40  * - verify that all required files are present; required files are also defined in FolderManagerData.h; this file is unique for each application using FolderManager
41  *
42  * If any of this fails, display an error message and exit the application.
43  */
44  void init();
45 
46  /** Push path.
47  * Save the current path (current working folder). popPath() restores it.
48  *
49  * @see popPath
50  */
51  void pushPath();
52 
53  /** Pop path.
54  * Restore the current path (current working folder) previously saved by pushPath().
55  *
56  * @see pushPath
57  */
58  void popPath();
59 
60 
61  private:
62  char currentPath[500];
63  char workPath[500]; //application working folder
64  };
65 
66 extern FolderManager visageFolderManager;
67 
68 }
69 #endif
visage|SDK folder manager.
Definition: FolderManager.h:15