Commit e0c43986 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

core/output.{h,cpp}: Output.get()

See #3358
parent 656ddd25
#include "output.h"
#define NULL_VAL ""
string getout(json v)
return v.is_null() ? NULL_VAL : v ;
string Output::get(string key)
return getout(j[key]);
string Output::get(string key, string subkey)
return getout(j[key][subkey]);
string Output::get(string key, string subkey, string subsubkey)
return getout(j[key][subkey][subsubkey]);
void Output::set(string key, json val)
......@@ -18,10 +18,16 @@ protected:
json j;
string get(string key);
string get(string key, string subkey);
string get(string key, string subkey, string subsubkey);
void set(string key, json val);
void set(string key, string subkey, json val);
void set(string key, string subkey, string subsubkey, json val);
void add_warning(string code, string msg, string level);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment