| |
| |
| #ifndef TENV_INCLUDED |
| #define TENV_INCLUDED |
| |
| |
| #include "tgeometry.h" |
| #include "tfilepath.h" |
| |
| |
| |
| #undef DVAPI |
| #undef DVVAR |
| #ifdef TNZCORE_EXPORTS |
| #define DVAPI DV_EXPORT_API |
| #define DVVAR DV_EXPORT_VAR |
| #else |
| #define DVAPI DV_IMPORT_API |
| #define DVVAR DV_IMPORT_VAR |
| #endif |
| |
| |
| namespace TEnv |
| { |
| |
| |
| |
| class DVAPI Variable |
| { |
| public: |
| class Imp; |
| Imp *m_imp; |
| |
| public: |
| Variable(string name, string defaultValue); |
| Variable(string name); |
| virtual ~Variable(); |
| |
| string getName() const; |
| string getValue() const; |
| |
| void assignValue(string str); |
| }; |
| |
| class DVAPI IntVar : public Variable |
| { |
| public: |
| IntVar(string name, int defValue); |
| IntVar(string name); |
| operator int() const; |
| void operator=(int v); |
| }; |
| |
| class DVAPI DoubleVar : public Variable |
| { |
| public: |
| DoubleVar(string name, double defValue); |
| DoubleVar(string name); |
| operator double() const; |
| void operator=(double v); |
| }; |
| |
| class DVAPI StringVar : public Variable |
| { |
| public: |
| StringVar(string name, const string &defValue); |
| StringVar(string name); |
| operator string() const; |
| void operator=(const string &v); |
| }; |
| |
| class DVAPI FilePathVar : public Variable |
| { |
| public: |
| FilePathVar(string name, const TFilePath &defValue); |
| FilePathVar(string name); |
| operator TFilePath() const; |
| void operator=(const TFilePath &v); |
| }; |
| |
| class DVAPI RectVar : public Variable |
| { |
| public: |
| RectVar(string name, const TRect &defValue); |
| RectVar(string name); |
| operator TRect() const; |
| void operator=(const TRect &v); |
| }; |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| DVAPI void setApplication(string applicationName, string applicationVersion); |
| |
| DVAPI string getApplicationName(); |
| DVAPI string getApplicationVersion(); |
| |
| |
| |
| DVAPI void setApplicationFullName(string applicationFullName); |
| DVAPI string getApplicationFullName(); |
| |
| |
| |
| DVAPI void setModuleName(string moduleName); |
| DVAPI string getModuleName(); |
| |
| |
| |
| DVAPI string getRootVarName(); |
| DVAPI void setRootVarName(string varName); |
| |
| |
| |
| DVAPI void setSystemVarPrefix(string prefix); |
| DVAPI string getSystemVarPrefix(); |
| |
| |
| |
| |
| |
| DVAPI TFilePath getRootVarPath(); |
| |
| |
| |
| DVAPI string getSystemVarStringValue(string varName); |
| DVAPI TFilePath getSystemVarPathValue(string varName); |
| DVAPI TFilePathSet getSystemVarPathSetValue(string varName); |
| |
| DVAPI TFilePath getStuffDir(); |
| DVAPI TFilePath getConfigDir(); |
| |
| |
| |
| |
| DVAPI void setStuffDir(const TFilePath &stuffDir); |
| |
| DVAPI TFilePath getDllRelativeDir(); |
| DVAPI void setDllRelativeDir(const TFilePath &dllRelativeDir); |
| |
| DVAPI void saveAllEnvVariables(); |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| } |
| |
| |
| |
| #endif |
| |