KSquare Utilities
Variables.h
Go to the documentation of this file.
1 #ifndef _VARIABLES_
2 #define _VARIABLES_
3 
4 #include "KKStr.h"
5 
6 /**
7  *@namespace KKLSC
8  *@brief Contains Classes that are specific to Cameras physical characteristics.
9  *@details Classes that support the reading and writing of scanner files that support, 2bit, 3bit, 4bit,
10  * and 8bit depth. Support for embedding text and instrument data as well as Identifying header information
11  * in all data formats.
12  */
13 namespace KKLSC
14 {
15  /**
16  *@class Variables
17  *@brief Variables that specify where we can locate Camera Application directories and files.
18  *@details All methods and applications are to use these variables to locate files and directories that they need.
19  * This way all the knowledge or where to locate things is kept in this one class.
20  */
21  class Variables
22  {
23  public:
24  Variables ();
25  ~Variables ();
26 
27  static void SetHomeDir (const KKStr& _homeDir);
28 
29  static KKStr HomeDir (); /**< Home Directory. All other directories will be off this directory. */
30  static KKStr ConfigurationDir (); /**< Where application configuration files go; NOT training models. */
31  static KKStr ScannerFilesDefaultDir ();
32 
33 
34  /**
35  *@brief Expands the supplied string by substituting in Environment variable values.
36  *@details Similar to the 'osSubstituteInEvironmentVariables' method defined in 'osServices' except that if 'HomeDir' is
37  * not defined then the string 'c:\\Temp' will be used. If a environment variable other than "HomeDir" is not
38  * defined then the original string will be returned.
39  * ex: '$(HomeDir)\\TrainingLibraries\\Shrimp9G' will expand to: 'SCS\\TrainingLibraries\\Shrimp9G'
40  *
41  *@param[in] src String that is to be search for environment variables and expanded.
42  *@return returns the expanded string.
43  */
44  static KKStr SubstituteInEnvironmentVariables (const KKStr& src);
45 
46  private:
47  static kkint32 LocateEnvStrStart (const KKStr& str);
48  static KKStr homeDir;
49 
50  }; /* Variables */
51 }
52 
53 
54 #endif
Variables that specify where we can locate Camera Application directories and files.
Definition: Variables.h:21
__int32 kkint32
Definition: KKBaseTypes.h:88
static KKStr HomeDir()
Definition: Variables.cpp:44
static KKStr SubstituteInEnvironmentVariables(const KKStr &src)
Expands the supplied string by substituting in Environment variable values.
Definition: Variables.cpp:116
static KKStr ScannerFilesDefaultDir()
Definition: Variables.cpp:80
static KKStr ConfigurationDir()
Definition: Variables.cpp:71
static KKStr Concat(const std::vector< std::string > &values)
Concatenates the list of &#39;std::string&#39; strings.
Definition: KKStr.cpp:1082
Contains Classes that are specific to Cameras physical characteristics.
static void SetHomeDir(const KKStr &_homeDir)
Definition: Variables.cpp:37