00001 #ifndef ISPN_HOTROD_VERSION_H
00002 #define ISPN_HOTROD_VERSION_H
00003
00004 #include "infinispan/hotrod/portable.h"
00005 #include "infinispan/hotrod/ImportExport.h"
00006 #include <string>
00007
00008 namespace infinispan {
00009 namespace hotrod {
00010
00011
00012
00013
00014
00015 static std::string *__protocolVersionPtr = NULL;
00016 static std::string *__versionPtr = NULL;
00017
00022 class Version {
00023 private:
00024 HR_EXTERN static const char *PROTOCOL_VERSION;
00025 HR_EXTERN static const char *VERSION;
00026
00027 public:
00033 static const char *getProtocolVersionCString() {
00034 return PROTOCOL_VERSION;
00035 }
00036
00042 static const char *getVersionCString() {
00043 return VERSION;
00044 }
00045
00049 static const std::string &getProtocolVersion() {
00050 if (__protocolVersionPtr == NULL) {
00051 __protocolVersionPtr = new std::string(PROTOCOL_VERSION);
00052 }
00053 return *__protocolVersionPtr;
00054 }
00055
00059 static const std::string &getVersion() {
00060 if (__versionPtr == NULL) {
00061 __versionPtr = new std::string(VERSION);
00062 }
00063 return *__versionPtr;
00064 }
00065 };
00066
00067 }}
00068
00069 #endif // ISPN_HOTROD_VERSIONEDVALUE_H