2 #include <unordered_map>
25 #ifndef SYMBOL_GROUP_H
27 #define SYMBOL_GROUP_H
30 namespace datastructure {
43 std::vector<std::shared_ptr<Symbol >> symbols;
65 std::shared_ptr<T> pt = std::make_shared<T>(s);
66 addSymbolPtr ((std::shared_ptr<Symbol>)pt);
94 string symbol_json = getSymbolAttributeRepresentation() +
COMMA;
97 for (
auto& entry : symbols) {
99 entry->getSymbolRepresentation();
102 if (symbol_json.size())
103 symbol_json.erase(symbol_json.size() - 1);
110 if (symbols.size()) {
111 symbol_json.erase(symbol_json.size() - 1);
the SymbolGroup represents a collection of symbols (shapes, polygons, and text) to visualize in Bridg...
Definition: SymbolGroup.h:39
virtual string getShapeType() const override
This method returns the JSON representation of the symbol group.
Definition: SymbolGroup.h:85
void addSymbol(T s)
Definition: SymbolGroup.h:64
void addSymbolPtr(std::shared_ptr< Symbol > s)
This method adds a symbol to the collection.
Definition: SymbolGroup.h:59
SymbolGroup()
Definition: SymbolGroup.h:49
std::vector< std::shared_ptr< Symbol > > getAllSymbols() const
Definition: SymbolGroup.h:69
virtual const string getSymbolRepresentation() const override
Virtual method to get the JSON representation of the symbol.
Definition: SymbolGroup.h:89
This is an abstract class for deriving a number of Symbol shape objects, for use in a SymbolCollectio...
Definition: Symbol.h:31
std::string JSONencode(const T &d)
Definition: JSONutil.h:38
Support for drawing Bar charts.
Definition: alltypes.h:4
const string COLON
Definition: DataStructure.h:52
const string COMMA
Definition: DataStructure.h:51
const string CLOSE_CURLY
Definition: DataStructure.h:54
const string QUOTE
Definition: DataStructure.h:50