📄 warregistry.h
字号:
/** */#ifndef WAR_REGISTRY_H#define WAR_REGISTRY_H/* SYSTEM INCLUDES */#ifndef WAR_FSTREAM_INCLUDED# define WAR_FSTREAM_INCLUDED# include <fstream>#endif#ifndef WAR_STACK_INCLUDED# define WAR_STACK_INCLUDED# include <stack>#endif/* PROJECT INCLUDES */#ifndef WAR_REGISTRY_KEY_H# include "WarRegistryKey.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 WarRegistry {public: typedef WarRegistryKey::name_ccstr_t name_ccstr_t; // LIFECYCLE /** * Default constructor. */ WarRegistry(); /** * Destructor. */ ~WarRegistry(); // OPERATORS // OPERATIONS void Open(war_ccstr_t filePath, bool doCreateIfNotExist = false) throw(WarException); war_registry_key_ptr_t OpenKey(name_ccstr_t regPath, bool doCreateIfNotExist = true) throw(WarException); void Load() throw(WarException); void Save() throw(WarException); // CALLBACK // ACCESS // INQUIRY bool IsKey(WarRegistryKey::name_ccstr_t name) throw(WarException); // Throws on error protected: bool mDoSave; bool mIsLoaded; war_registry_key_ptr_t mRootNodePtr; void SaveKey(int level, const war_registry_key_ptr_t& key) throw(WarException);private: std::fstream mFile; std::string mFileName;};/* INLINE METHODS *//* EXTERNAL REFERENCES */#endif /* __cplusplus *//****************** END C++ spesific ******************/#endif /* WAR_REGISTRY_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -