31 lines
658 B
C++
31 lines
658 B
C++
//
|
|
// Created by trotfunky on 07/05/19.
|
|
//
|
|
|
|
#ifndef SNIPPETS_CIRCLE_H
|
|
#define SNIPPETS_CIRCLE_H
|
|
|
|
#include <string>
|
|
#include <pugixml.hpp>
|
|
|
|
namespace xmlParser
|
|
{
|
|
typedef struct Circle
|
|
{
|
|
int x;
|
|
int y;
|
|
int r;
|
|
|
|
std::string label;
|
|
|
|
void initCirle() { x = 0; y = 1; r = 2; label = "Test circle";}
|
|
void initCircle(pugi::xml_node node)
|
|
{
|
|
x = node.attribute("x").as_int(0);
|
|
y = node.attribute("y").as_int(1);
|
|
r = node.attribute("r").as_int(2);
|
|
label = node.attribute("label").as_string("Test circle");
|
|
}
|
|
} Circle;
|
|
}
|
|
#endif //SNIPPETS_CIRCLE_H
|