Atlas
0.7.0
Networking protocol for the Worldforge system.
Formatter.h
1
// This file may be redistributed and modified only under the terms of
2
// the GNU Lesser General Public License (See COPYING for details).
3
// Copyright (C) 2004 Alistair Riddoch
4
5
// $Id$
6
7
#ifndef ATLAS_FORMATTER_H
8
#define ATLAS_FORMATTER_H
9
10
#include <Atlas/Bridge.h>
11
12
namespace
Atlas
{
13
23
class
Formatter
:
public
Bridge
24
{
25
public
:
26
27
Formatter
(std::ostream & s,
Atlas::Bridge
& b);
28
29
void
streamBegin
()
override
;
30
void
streamMessage
()
override
;
31
void
streamEnd
()
override
;
32
33
void
mapMapItem
(std::string name)
override
;
34
void
mapListItem
(std::string name)
override
;
35
void
mapIntItem
(std::string name, std::int64_t)
override
;
36
void
mapFloatItem
(std::string name,
double
)
override
;
37
void
mapStringItem
(std::string name, std::string)
override
;
38
void
mapNoneItem
(std::string name)
override
;
39
void
mapEnd
()
override
;
40
41
void
listMapItem
()
override
;
42
void
listListItem
()
override
;
43
void
listIntItem
(std::int64_t)
override
;
44
void
listFloatItem
(
double
)
override
;
45
void
listStringItem
(std::string)
override
;
46
void
listNoneItem
()
override
;
47
void
listEnd
()
override
;
48
49
void
setSpacing(
int
s) {
50
m_spacing = s;
51
}
52
53
protected
:
54
55
std::ostream & m_stream;
56
Bridge
& m_bridge;
57
int
m_indent;
58
int
m_spacing;
59
};
60
61
}
// Atlas namespace
62
63
#endif
// ATLAS_FORMATTER_H
Atlas::Bridge
Definition:
Bridge.h:36
Atlas::Formatter
Definition:
Formatter.h:24
Atlas::Formatter::streamBegin
void streamBegin() override
Definition:
Formatter.cpp:21
Atlas::Formatter::streamMessage
void streamMessage() override
Definition:
Formatter.cpp:28
Atlas::Formatter::mapIntItem
void mapIntItem(std::string name, std::int64_t) override
Definition:
Formatter.cpp:59
Atlas::Formatter::mapStringItem
void mapStringItem(std::string name, std::string) override
Definition:
Formatter.cpp:73
Atlas::Formatter::mapEnd
void mapEnd() override
Definition:
Formatter.cpp:86
Atlas::Formatter::mapNoneItem
void mapNoneItem(std::string name) override
Definition:
Formatter.cpp:80
Atlas::Formatter::listNoneItem
void listNoneItem() override
Definition:
Formatter.cpp:123
Atlas::Formatter::mapMapItem
void mapMapItem(std::string name) override
Definition:
Formatter.cpp:45
Atlas::Formatter::mapListItem
void mapListItem(std::string name) override
Definition:
Formatter.cpp:53
Atlas::Formatter::listEnd
void listEnd() override
Definition:
Formatter.cpp:127
Atlas::Formatter::streamEnd
void streamEnd() override
Definition:
Formatter.cpp:37
Atlas::Formatter::listStringItem
void listStringItem(std::string) override
Definition:
Formatter.cpp:118
Atlas::Formatter::listIntItem
void listIntItem(std::int64_t) override
Definition:
Formatter.cpp:108
Atlas::Formatter::listFloatItem
void listFloatItem(double) override
Definition:
Formatter.cpp:113
Atlas::Formatter::mapFloatItem
void mapFloatItem(std::string name, double) override
Definition:
Formatter.cpp:66
Atlas::Formatter::listListItem
void listListItem() override
Definition:
Formatter.cpp:103
Atlas::Formatter::listMapItem
void listMapItem() override
Definition:
Formatter.cpp:95
Atlas
Definition:
Bridge.h:20
src
Atlas
Formatter.h
Generated by
1.9.4