Swiftray  1.0
object-context.h
Go to the documentation of this file.
1 #include <parser/svgpp-common.h>
2 
3 #pragma once
4 
5 namespace Parser {
6 
7 class ObjectContext {
8 public:
9  void set(tag::attribute::width, double val) {};
10 
11  void set(tag::attribute::height, double val) {};
12 
13  void set(tag::attribute::preserveAspectRatio, bool, tag::value::none) {};
14 
15  template<class IRI>
16  void set(tag::attribute::xlink::href, tag::iri_fragment,
17  IRI const &fragment) {
18  qInfo() << "xlink::href" << fragment;
19  }
20 
21  void set(tag::attribute::xlink::href, RangedChar fragment) {
22  qInfo() << "xlink::href"
23  << QString::fromStdString(
24  std::string(fragment.begin(), fragment.end()));
25  }
26 
27  template<typename MinMax, typename SliceMeet>
28  void set(tag::attribute::preserveAspectRatio, bool, MinMax, SliceMeet) {};
29 
30  template<class IRI>
31  void set(svgpp::tag::attribute::data_original_layer, tag::iri_fragment,
32  IRI const &fragment) {
33  qInfo() << "xlink::href"
34  << QString::fromStdString(
35  std::string(fragment.begin(), fragment.end()));
36  }
37 
38  void set(svgpp::tag::attribute::data_original_layer, RangedChar fragment) {
39  qInfo() << "xlink::href"
40  << QString::fromStdString(
41  std::string(fragment.begin(), fragment.end()));
42  }
43 
44 private:
45  double empty;
46 };
47 
48 }
Definition: object-context.h:7
void set(tag::attribute::xlink::href, tag::iri_fragment, IRI const &fragment)
Definition: object-context.h:16
void set(tag::attribute::height, double val)
Definition: object-context.h:11
void set(tag::attribute::preserveAspectRatio, bool, tag::value::none)
Definition: object-context.h:13
void set(svgpp::tag::attribute::data_original_layer, RangedChar fragment)
Definition: object-context.h:38
void set(tag::attribute::width, double val)
Definition: object-context.h:9
void set(tag::attribute::xlink::href, RangedChar fragment)
Definition: object-context.h:21
void set(svgpp::tag::attribute::data_original_layer, tag::iri_fragment, IRI const &fragment)
Definition: object-context.h:31
void set(tag::attribute::preserveAspectRatio, bool, MinMax, SliceMeet)
Definition: object-context.h:28
Definition: base-context.h:8
boost::iterator_range< const char * > RangedChar
Definition: svgpp-defs.h:13