trotFunky
71ce85cec4
New classes : - DrawingElement (Base class for every other element) - Group : Groups DrawingElements together Modified Circle to work with DrawingElement Corrected a *maybe* failed vector copy in Polynomial.tpp
38 lines
790 B
C++
38 lines
790 B
C++
//
|
|
// 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 "Circle.h"
|
|
#include "DrawingElement.h"
|
|
|
|
namespace xmlParser
|
|
{
|
|
|
|
class Group : public DrawingElement
|
|
{
|
|
public:
|
|
Group();
|
|
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;
|
|
private:
|
|
std::map<std::string,DrawingElement*> drawingElements;
|
|
};
|
|
|
|
}
|
|
|
|
#endif //SNIPPETS_GROUP_H
|