Atlas  0.7.0
Networking protocol for the Worldforge system.
Atlas::PresentationBridge Class Reference

A bridge which is meant to be used solely for presenting Element data. More...

#include <PresentationBridge.h>

Inheritance diagram for Atlas::PresentationBridge:
Collaboration diagram for Atlas::PresentationBridge:

Public Member Functions

 PresentationBridge (std::ostream &stream)
 
void streamBegin () override
 
void streamMessage () override
 
void streamEnd () override
 
void mapMapItem (std::string name) override
 
void mapListItem (std::string name) override
 
void mapIntItem (std::string name, std::int64_t) override
 
void mapFloatItem (std::string name, double) override
 
void mapStringItem (std::string name, std::string) override
 
void mapNoneItem (std::string name) override
 
void mapEnd () override
 
void listMapItem () override
 
void listListItem () override
 
void listIntItem (std::int64_t) override
 
void listFloatItem (double) override
 
void listStringItem (std::string) override
 
void listNoneItem () override
 
void listEnd () override
 
void setMaxItemsPerLevel (size_t maxItems)
 
void setStartFilteringLevel (size_t startFilteringLevel)
 

Detailed Description

A bridge which is meant to be used solely for presenting Element data.

Definition at line 35 of file PresentationBridge.h.

Member Function Documentation

◆ listEnd()

void Atlas::PresentationBridge::listEnd ( )
overridevirtual

Ends the currently streamed list.

Implements Atlas::Bridge.

Definition at line 129 of file PresentationBridge.cpp.

◆ listFloatItem()

void Atlas::PresentationBridge::listFloatItem ( double  )
overridevirtual

Adds a float to the currently streamed list.

Implements Atlas::Bridge.

Definition at line 112 of file PresentationBridge.cpp.

◆ listIntItem()

void Atlas::PresentationBridge::listIntItem ( std::int64_t  )
overridevirtual

Adds an integer to the currently streamed list.

Implements Atlas::Bridge.

Definition at line 106 of file PresentationBridge.cpp.

◆ listListItem()

void Atlas::PresentationBridge::listListItem ( )
overridevirtual

Starts a list object in the currently streamed list.

Implements Atlas::Bridge.

Definition at line 101 of file PresentationBridge.cpp.

◆ listMapItem()

void Atlas::PresentationBridge::listMapItem ( )
overridevirtual

Starts a map object in the currently streamed list.

Implements Atlas::Bridge.

Definition at line 87 of file PresentationBridge.cpp.

◆ listNoneItem()

void Atlas::PresentationBridge::listNoneItem ( )
overridevirtual

Adds an empty item to the currently streamed list.

Implements Atlas::Bridge.

Definition at line 124 of file PresentationBridge.cpp.

◆ listStringItem()

void Atlas::PresentationBridge::listStringItem ( std::string  )
overridevirtual

Adds a string to the currently streamed list.

Implements Atlas::Bridge.

Definition at line 118 of file PresentationBridge.cpp.

◆ mapEnd()

void Atlas::PresentationBridge::mapEnd ( )
overridevirtual

Ends the currently streamed map.

Implements Atlas::Bridge.

Definition at line 82 of file PresentationBridge.cpp.

◆ mapFloatItem()

void Atlas::PresentationBridge::mapFloatItem ( std::string  name,
double   
)
overridevirtual

Adds a float to the currently streamed map.

Implements Atlas::Bridge.

Definition at line 64 of file PresentationBridge.cpp.

◆ mapIntItem()

void Atlas::PresentationBridge::mapIntItem ( std::string  name,
std::int64_t   
)
overridevirtual

Adds an integer to the currently streamed map.

Implements Atlas::Bridge.

Definition at line 58 of file PresentationBridge.cpp.

◆ mapListItem()

void Atlas::PresentationBridge::mapListItem ( std::string  name)
overridevirtual

Starts a list object to the currently streamed map.

Implements Atlas::Bridge.

Definition at line 50 of file PresentationBridge.cpp.

◆ mapMapItem()

void Atlas::PresentationBridge::mapMapItem ( std::string  name)
overridevirtual

Starts a map object to the currently streamed map.

Implements Atlas::Bridge.

Definition at line 43 of file PresentationBridge.cpp.

◆ mapNoneItem()

void Atlas::PresentationBridge::mapNoneItem ( std::string  name)
overridevirtual

Adds a none item to the currently streamed map.

Implements Atlas::Bridge.

Definition at line 76 of file PresentationBridge.cpp.

◆ mapStringItem()

void Atlas::PresentationBridge::mapStringItem ( std::string  name,
std::string   
)
overridevirtual

Adds a string to the currently streamed map.

Implements Atlas::Bridge.

Definition at line 70 of file PresentationBridge.cpp.

◆ setMaxItemsPerLevel()

void Atlas::PresentationBridge::setMaxItemsPerLevel ( size_t  maxItems)

Sets the max number of items to print per level.

This is useful to prevent too much output.

Parameters
maxItemsThe max number of items. 0 disables this feature (which is the default).

Definition at line 160 of file PresentationBridge.cpp.

◆ setStartFilteringLevel()

void Atlas::PresentationBridge::setStartFilteringLevel ( size_t  startFilteringLevel)

Sets the level at which filtering, if setMaxItemsPerLevel() has been called, should occur. Default is 1 (i.e. print everything for the top level).

Parameters
startFilteringLevelAt which level filtering should start.

Definition at line 165 of file PresentationBridge.cpp.

◆ streamBegin()

void Atlas::PresentationBridge::streamBegin ( )
overridevirtual

Begin an Atlas stream.

Implements Atlas::Bridge.

Definition at line 30 of file PresentationBridge.cpp.

◆ streamEnd()

void Atlas::PresentationBridge::streamEnd ( )
overridevirtual

Ends the Atlas stream.

Implements Atlas::Bridge.

Definition at line 38 of file PresentationBridge.cpp.

◆ streamMessage()

void Atlas::PresentationBridge::streamMessage ( )
overridevirtual

Start a message in an Atlas stream.

Implements Atlas::Bridge.

Definition at line 34 of file PresentationBridge.cpp.


The documentation for this class was generated from the following files: