tsp_cpp/snippets/Group.h

45 lines
1,016 B
C
Raw Normal View History

//
// Created by trotfunky on 15/05/19.
//
#ifndef SNIPPETS_GROUP_H
#define SNIPPETS_GROUP_H
#include <pugixml.hpp>
#include <map>
#include <cstring>
#include <algorithm>
#include <iostream>
#include <iomanip>
#include "Circle.h"
#include "DrawingElement.h"
namespace xmlParser
{
class Group : public DrawingElement
{
public:
explicit Group(std::string label = "Test Group", float x = 0, float y = 1,
const sf::Color& color = sf::Color::Transparent);
explicit Group(const pugi::xml_node&);
explicit Group(const std::map<std::string, DrawingElement*>&);
bool addDrawingElement(DrawingElement* drawingElement);
bool removeDrawingElement(const std::string& label);
DrawingElement* getDrawingElement(const std::string&);
void draw(sf::RenderWindow&) override;
const std::string toString() const override;
private:
std::map<std::string,DrawingElement*> drawingElements;
};
}
#endif //SNIPPETS_GROUP_H