Skip to content
Snippets Groups Projects
Commit c6918fe9 authored by Evgeny Lavrik's avatar Evgeny Lavrik
Browse files

Tweaks for root

parent 93eb9081
Branches
No related tags found
No related merge requests found
......@@ -91,7 +91,11 @@ static T* FromJsonString(std::string jsonString) {
}
}
#ifdef TGENBASECLIENT_WITH_ROOT
class BaseClass: public TObject
#else
class BaseClass
#endif
{
public:
virtual std::string FullClassName() {
......@@ -218,12 +222,17 @@ class BaseCondition: public BaseClass {
return TGenBase::FromJson<BaseCondition>(json);
}
std::string GetName() const { return fName; };
#ifdef TGENBASECLIENT_WITH_ROOT
virtual const char* GetName() const { return fName.c_str(); };
#else
virtual std::string GetName() const { return fName; };
#endif
std::map<std::string, std::string> GetMetadata() const { return fMetadata; }
int GetRunId() const { return fRunId; }
int GetVersion() const { return fVersion; }
void SetName(std::string value) { fName = value; };
void SetName(char* value) { fName = value; };
void SetMetadata(std::map<std::string, std::string> value) { fMetadata = value; }
void SetRunId(int value) { fRunId = value; }
void SetVersion(int value) { fVersion = value; }
......
......@@ -98,6 +98,8 @@ namespace jsoncons \
}; \
};
#ifdef TGENBASECLIENT_WITH_ROOT
#include "TString.h"
namespace jsoncons {
......@@ -268,5 +270,6 @@ namespace jsoncons {
// struct is_json_type_traits_declared<std::map<Integer,T>, typename std::enable_if<std::is_integral<Integer>::value>::type> : public std::true_type {};
// }
#endif
#endif /* !TGENBASECLIENTUTILS_H */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment