2016-12-14 17:27:41 +08:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
#include <map>
|
2017-02-14 16:37:32 +08:00
|
|
|
#include <iostream>
|
2016-12-14 17:27:41 +08:00
|
|
|
|
|
|
|
#include "utils/exceptions/not_yet_implemented.hpp"
|
|
|
|
|
|
|
|
class PrintRecordStream
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
std::ostream& stream;
|
|
|
|
|
|
|
|
public:
|
|
|
|
PrintRecordStream(std::ostream &stream) : stream(stream) {}
|
|
|
|
|
|
|
|
void write_success()
|
|
|
|
{
|
|
|
|
stream << "SUCCESS\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
void write_success_empty()
|
|
|
|
{
|
2017-02-14 16:37:32 +08:00
|
|
|
stream << "SUCCESS EMPTY\n";
|
2016-12-14 17:27:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void write_ignored()
|
|
|
|
{
|
2017-02-14 16:37:32 +08:00
|
|
|
stream << "IGNORED\n";
|
2016-12-14 17:27:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void write_empty_fields()
|
|
|
|
{
|
2017-02-14 16:37:32 +08:00
|
|
|
stream << "EMPTY FIELDS\n";
|
2016-12-14 17:27:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void write_fields(const std::vector<std::string> &fields)
|
|
|
|
{
|
2017-02-14 16:37:32 +08:00
|
|
|
stream << "FIELDS:";
|
|
|
|
for (auto &field : fields)
|
|
|
|
{
|
|
|
|
stream << " " << field;
|
|
|
|
}
|
|
|
|
stream << '\n';
|
2016-12-14 17:27:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void write_field(const std::string &field)
|
|
|
|
{
|
|
|
|
stream << "Field: " << field << '\n';
|
|
|
|
}
|
|
|
|
|
|
|
|
void write_list_header(size_t size)
|
|
|
|
{
|
|
|
|
stream << "List: " << size << '\n';
|
|
|
|
}
|
|
|
|
|
|
|
|
void write_record()
|
|
|
|
{
|
|
|
|
stream << "Record\n";
|
|
|
|
}
|
|
|
|
|
|
|
|
void write_meta(const std::string &type)
|
|
|
|
{
|
2017-02-14 16:37:32 +08:00
|
|
|
stream << "Meta: " << type << std::endl;
|
2016-12-14 17:27:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void write_failure(const std::map<std::string, std::string> &data)
|
|
|
|
{
|
|
|
|
throw NotYetImplemented();
|
|
|
|
}
|
|
|
|
|
|
|
|
void write_count(const size_t count)
|
|
|
|
{
|
|
|
|
throw NotYetImplemented();
|
|
|
|
}
|
|
|
|
|
|
|
|
void write(const VertexAccessor &vertex)
|
|
|
|
{
|
|
|
|
throw NotYetImplemented();
|
|
|
|
}
|
|
|
|
|
|
|
|
void write_vertex_record(const VertexAccessor& va)
|
|
|
|
{
|
2017-02-14 16:37:32 +08:00
|
|
|
va.stream_repr(stream);
|
|
|
|
stream << std::endl;
|
2016-12-14 17:27:41 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
void write(const EdgeAccessor &edge)
|
|
|
|
{
|
|
|
|
throw NotYetImplemented();
|
|
|
|
}
|
|
|
|
|
|
|
|
void write_edge_record(const EdgeAccessor& ea)
|
|
|
|
{
|
|
|
|
throw NotYetImplemented();
|
|
|
|
}
|
|
|
|
|
|
|
|
void write(const StoredProperty<TypeGroupEdge> &prop)
|
|
|
|
{
|
|
|
|
throw NotYetImplemented();
|
|
|
|
}
|
|
|
|
|
|
|
|
void write(const StoredProperty<TypeGroupVertex> &prop)
|
|
|
|
{
|
|
|
|
throw NotYetImplemented();
|
|
|
|
}
|
|
|
|
|
|
|
|
void write(const Null &prop)
|
|
|
|
{
|
|
|
|
throw NotYetImplemented();
|
|
|
|
}
|
|
|
|
|
|
|
|
void write(const Bool &prop)
|
|
|
|
{
|
|
|
|
throw NotYetImplemented();
|
|
|
|
}
|
|
|
|
|
|
|
|
void write(const Float &prop) { throw NotYetImplemented(); }
|
|
|
|
void write(const Int32 &prop) { throw NotYetImplemented(); }
|
|
|
|
void write(const Int64 &prop) { throw NotYetImplemented(); }
|
|
|
|
void write(const Double &prop) { throw NotYetImplemented(); }
|
|
|
|
void write(const String &prop) { throw NotYetImplemented(); }
|
|
|
|
void write(const ArrayBool &prop) { throw NotYetImplemented(); }
|
|
|
|
void write(const ArrayInt32 &prop) { throw NotYetImplemented(); }
|
|
|
|
void write(const ArrayInt64 &prop) { throw NotYetImplemented(); }
|
|
|
|
void write(const ArrayFloat &prop) { throw NotYetImplemented(); }
|
|
|
|
void write(const ArrayDouble &prop) { throw NotYetImplemented(); }
|
|
|
|
void write(const ArrayString &prop) { throw NotYetImplemented(); }
|
|
|
|
|
|
|
|
void send()
|
|
|
|
{
|
|
|
|
throw NotYetImplemented();
|
|
|
|
}
|
|
|
|
|
|
|
|
void chunk()
|
|
|
|
{
|
|
|
|
throw NotYetImplemented();
|
|
|
|
}
|
|
|
|
};
|