2 #include <unordered_map>
26 #ifndef SYMBOL_GROUP_H
28 #define SYMBOL_GROUP_H
31 namespace datastructure {
44 std::vector<std::shared_ptr<Symbol>> symbols;
66 std::shared_ptr<T> pt = std::make_shared<T>(s);
67 addSymbolPtr ((std::shared_ptr<Symbol>)pt);
96 string symbol_json = getSymbolAttributeRepresentation() +
COMMA;
99 for (
auto& entry : symbols) {
101 entry->getSymbolRepresentation();
104 if (symbol_json.size())
105 symbol_json.erase(symbol_json.size() - 1);
112 if (symbols.size()) {
113 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:40
std::vector< std::shared_ptr< Symbol > > getAllSymbols() const
Definition: SymbolGroup.h:70
virtual string getShapeType() const override
This method returns the JSON representation of the symbol group.
Definition: SymbolGroup.h:86
void addSymbol(T s)
Definition: SymbolGroup.h:65
void addSymbolPtr(std::shared_ptr< Symbol > s)
This method adds a symbol to the collection.
Definition: SymbolGroup.h:60
SymbolGroup()
Definition: SymbolGroup.h:50
virtual const string getSymbolRepresentation() const override
Virtual method to get the JSON representation of the symbol.
Definition: SymbolGroup.h:90
This is an abstract class for deriving a number of Symbol shape objects, for use in a SymbolCollectio...
Definition: Symbol.h:32
std::string JSONencode(const T &d)
Definition: JSONutil.h:37
these methods convert byte arrays in to base64 codes and are used in BRIDGES to represent the color a...
Definition: alltypes.h:4
const string COLON
Definition: DataStructure.h:51
const string COMMA
Definition: DataStructure.h:50
const string CLOSE_CURLY
Definition: DataStructure.h:53
const string QUOTE
Definition: DataStructure.h:49