2016-02-22 05:21:15 +08:00
|
|
|
#pragma once
|
|
|
|
|
2016-07-18 01:32:35 +08:00
|
|
|
#include <iostream>
|
2016-02-22 05:21:15 +08:00
|
|
|
#include <string>
|
|
|
|
|
2016-07-18 01:32:35 +08:00
|
|
|
#include "storage/model/properties/properties.hpp"
|
|
|
|
#include "storage/model/properties/traversers/jsonwriter.hpp"
|
|
|
|
|
|
|
|
using std::cout;
|
|
|
|
using std::endl;
|
|
|
|
|
2016-07-17 08:22:43 +08:00
|
|
|
std::string LINE(std::string line) { return "\t" + line + "\n"; }
|
2016-07-18 01:32:35 +08:00
|
|
|
|
|
|
|
void print_props(const Properties &properties)
|
|
|
|
{
|
|
|
|
StringBuffer buffer;
|
|
|
|
JsonWriter<StringBuffer> writer(buffer);
|
|
|
|
properties.accept(writer);
|
|
|
|
cout << buffer.str() << endl;
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef DEBUG
|
|
|
|
#define PRINT_PROPS(_PROPS_) print_props(_PROPS_);
|
|
|
|
#else
|
|
|
|
#define PRINT_PROPS(_)
|
|
|
|
#endif
|