📄 waros.h
字号:
/** */#ifndef WAR_OS_H#define WAR_OS_H/* SYSTEM INCLUDES *//* PROJECT INCLUDES */#ifndef WAR_EXCEPTION# include "WarException.h"#endif#ifndef WAR_TMP_FILE_NAME_H# include "WarTmpFileName.h"#endif/* LOCAL INCLUDES *//* FORWARD REFERENCES */#ifdef __cplusplusextern "C" {#endif/****************** BEGIN OLD STYLE C spesific ********//****************** END OLD STYLE C spesific **********/#ifdef __cplusplus }#endif/****************** BEGIN C++ spesific ****************/#ifdef __cplusplusclass WarOs {public: typedef char tmpfile_char_t; typedef WarPath<tmpfile_char_t> tmpfile_path_t; typedef const tmpfile_char_t *tmpfile_ccstr_t; // LIFECYCLE /** * Default constructor. */ WarOs(void) throw(WarException); /** * Destructor. */ ~WarOs(void); // OPERATORS // OPERATIONS tmpfile_path_t GetNewTmpFileName(tmpfile_ccstr_t tmpPath = NULL, tmpfile_ccstr_t preFix = NULL); // ACCESS static WarOs& GetOs() throw(WarException) { if (!mspThis) WarThrow(WarError(WAR_ERR_INTERNAL_DATA_NOT_INITIALIZED), NULL); return *mspThis; } // INQUIRY bool IsNt() const; std::string GetOsName() const; protected:private:#ifdef WIN32 OSVERSIONINFO mOsInfo;#endif static WarOs *mspThis; WarTmpFileName<tmpfile_char_t> mTmpName;};/* INLINE METHODS *//* EXTERNAL REFERENCES */#define WarIsNt() (WarOs::GetOs().IsNt())#endif /* __cplusplus *//****************** END C++ spesific ******************/#endif /* WAR_OS_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -