dsrc isn't necessary for this repo
[client-tools.git] / src / external / 3rd / application / UiBuilder / FileLocator.h
blob5a0c1d0d9e9cfa52f770f863e9bb7e1e00a35f12
1 // ======================================================================
2 //
3 // FileLocator.h
4 // copyright (c) 2001 Sony Online Entertainment
5 //
6 // ======================================================================
8 #ifndef INCLUDED_FileLocator_H
9 #define INCLUDED_FileLocator_H
11 #include "UIString.h"
12 #include <vector>
14 // ======================================================================
15 class FileLocator
17 public:
19 const bool findFile (const char * filename, UINarrowString & result);
21 void addPath (UINarrowString path);
23 static FileLocator & gFileLocator ();
24 static void ExplicitDestroy ();
26 private:
27 FileLocator ();
28 FileLocator (const FileLocator & rhs);
29 FileLocator & operator= (const FileLocator & rhs);
31 typedef std::vector <UINarrowString> PathVector_t;
33 PathVector_t m_paths;
35 static FileLocator * ms_gFileLocator;
38 // ======================================================================
40 inline FileLocator & FileLocator::gFileLocator ()
42 if (ms_gFileLocator)
43 return *ms_gFileLocator;
45 return *(ms_gFileLocator = new FileLocator ());
47 //-----------------------------------------------------------------
51 #endif