2005-04-13 11:24:42 +00:00
|
|
|
// This file may be redistributed and modified only under the terms of
|
|
|
|
|
// the GNU Lesser General Public License (See COPYING for details).
|
|
|
|
|
// Copyright (C) 2005 Alistair Riddoch
|
|
|
|
|
|
2005-08-27 23:18:48 +00:00
|
|
|
#error This file has been removed from the build
|
2006-08-02 Al Riddoch <alriddoch@zepler.org>
* Doxyfile, client/define_world.cpp, client/define_world.h,
common/CustomOp.cpp, common/CustomOp.h, common/CustomOp_impl.h,
common/Load.h, common/Save.h, common/inheritance_impl.h,
common/operations.h, common/refno.h, common/utility.cpp,
common/utility.h, rulesets/Combat.h, rulesets/Entity_getLocation.h,
rulesets/Fell.h, rulesets/MemMap_methods.h, rulesets/Py_Optime.cpp,
rulesets/Py_Optime.h, rulesets/ThingFactory.h,
server/CommIdleSocket.h, server/ServerRouting_methods.h,
tools/Formatter.cpp, tools/Formatter.h, tools/cydbload.cpp,
tools/cyisoload.cpp: Make doxygen skip code that has been removed
and is just left in cvs for reference.
2006-08-02 10:19:03 +00:00
|
|
|
#ifndef DOXYGEN_SHOULD_SKIP_THIS
|
2005-08-27 23:18:48 +00:00
|
|
|
|
2005-04-13 11:24:42 +00:00
|
|
|
#include "Formatter.h"
|
|
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
|
|
|
|
|
Formatter::Formatter(std::iostream & s, Atlas::Bridge & b) : m_stream(s),
|
|
|
|
|
m_bridge(b),
|
|
|
|
|
m_indent(0),
|
|
|
|
|
m_spacing(2)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Formatter::streamBegin()
|
|
|
|
|
{
|
|
|
|
|
m_bridge.streamBegin();
|
|
|
|
|
m_indent = m_spacing;
|
|
|
|
|
m_stream << std::endl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Formatter::streamMessage(const Atlas::Bridge::Map&m)
|
|
|
|
|
{
|
|
|
|
|
m_stream << std::endl;
|
|
|
|
|
m_stream << std::string(m_indent, ' ');
|
|
|
|
|
m_bridge.streamMessage(m);
|
|
|
|
|
m_indent += m_spacing;
|
|
|
|
|
m_stream << std::endl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Formatter::streamEnd()
|
|
|
|
|
{
|
|
|
|
|
m_stream << std::endl;
|
|
|
|
|
m_bridge.streamEnd();
|
|
|
|
|
m_stream << std::endl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Formatter::mapItem(const std::string & name, const Atlas::Bridge::Map&m)
|
|
|
|
|
{
|
|
|
|
|
m_stream << std::string(m_indent, ' ');
|
|
|
|
|
m_bridge.mapItem(name,m);
|
|
|
|
|
m_indent += m_spacing;
|
|
|
|
|
m_stream << std::endl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Formatter::mapItem(const std::string & name, const Atlas::Bridge::List&l)
|
|
|
|
|
{
|
|
|
|
|
m_stream << std::string(m_indent, ' ');
|
|
|
|
|
m_bridge.mapItem(name,l);
|
2005-05-12 11:07:14 +00:00
|
|
|
m_indent += m_spacing;
|
|
|
|
|
m_stream << std::endl;
|
2005-04-13 11:24:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Formatter::mapItem(const std::string & name, long l)
|
|
|
|
|
{
|
|
|
|
|
m_stream << std::string(m_indent, ' ');
|
|
|
|
|
m_bridge.mapItem(name, l);
|
|
|
|
|
m_stream << std::endl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Formatter::mapItem(const std::string & name, double d)
|
|
|
|
|
{
|
|
|
|
|
m_stream << std::string(m_indent, ' ');
|
|
|
|
|
m_bridge.mapItem(name, d);
|
|
|
|
|
m_stream << std::endl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Formatter::mapItem(const std::string & name, const std::string & s)
|
|
|
|
|
{
|
|
|
|
|
m_stream << std::string(m_indent, ' ');
|
|
|
|
|
m_bridge.mapItem(name, s);
|
|
|
|
|
m_stream << std::endl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Formatter::mapEnd()
|
|
|
|
|
{
|
|
|
|
|
m_indent -= m_spacing;
|
|
|
|
|
m_stream << std::string(m_indent, ' ');
|
|
|
|
|
m_bridge.mapEnd();
|
|
|
|
|
m_stream << std::endl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void Formatter::listItem(const Atlas::Bridge::Map&m)
|
|
|
|
|
{
|
|
|
|
|
m_stream << std::string(m_indent, ' ');
|
|
|
|
|
m_bridge.listItem(m);
|
|
|
|
|
m_indent += m_spacing;
|
|
|
|
|
m_stream << std::endl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Formatter::listItem(const Atlas::Bridge::List&l)
|
|
|
|
|
{
|
2005-05-12 11:07:14 +00:00
|
|
|
m_stream << std::string(m_indent, ' ');
|
2005-04-13 11:24:42 +00:00
|
|
|
m_bridge.listItem(l);
|
2005-05-12 11:07:14 +00:00
|
|
|
m_indent += m_spacing;
|
|
|
|
|
m_stream << std::endl;
|
2005-04-13 11:24:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Formatter::listItem(long l)
|
|
|
|
|
{
|
2005-05-12 11:07:14 +00:00
|
|
|
m_stream << std::string(m_indent, ' ');
|
2005-04-13 11:24:42 +00:00
|
|
|
m_bridge.listItem(l);
|
2005-05-12 11:07:14 +00:00
|
|
|
m_stream << std::endl;
|
2005-04-13 11:24:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Formatter::listItem(double d)
|
|
|
|
|
{
|
2005-05-12 11:07:14 +00:00
|
|
|
m_stream << std::string(m_indent, ' ');
|
2005-04-13 11:24:42 +00:00
|
|
|
m_bridge.listItem(d);
|
2005-05-12 11:07:14 +00:00
|
|
|
m_stream << std::endl;
|
2005-04-13 11:24:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Formatter::listItem(const std::string & s)
|
|
|
|
|
{
|
2005-05-12 11:07:14 +00:00
|
|
|
m_stream << std::string(m_indent, ' ');
|
2005-04-13 11:24:42 +00:00
|
|
|
m_bridge.listItem(s);
|
2005-05-12 11:07:14 +00:00
|
|
|
m_stream << std::endl;
|
2005-04-13 11:24:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Formatter::listEnd()
|
|
|
|
|
{
|
2005-05-12 11:07:14 +00:00
|
|
|
m_indent -= m_spacing;
|
|
|
|
|
m_stream << std::string(m_indent, ' ');
|
2005-04-13 11:24:42 +00:00
|
|
|
m_bridge.listEnd();
|
|
|
|
|
m_stream << std::endl;
|
|
|
|
|
}
|