00001 #ifndef VERSION_H_ 00002 #define VERSION_H_ 00003 00004 #include <string> 00005 00006 00012 class Version { 00013 public: 00015 static std::string const &Commit() { 00016 return GetInstance().commit_; 00017 } 00018 00019 private: 00020 Version(); 00021 00022 Version(Version const &) = delete; 00023 Version &operator=(Version const &) = delete; 00024 00026 static Version &GetInstance() { 00027 static Version instance; 00028 return instance; 00029 } 00030 00032 std::string commit_; 00033 }; 00034 00035 #endif // VERSION_H_ 00036