dxf_line_arc_parser.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017, <copyright holder> <email>
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * * Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the name of the <organization> nor the
13  * names of its contributors may be used to endorse or promote products
14  * derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY <copyright holder> <email> ''AS IS'' AND ANY
17  * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19  * DISCLAIMED. IN NO EVENT SHALL <copyright holder> <email> BE LIABLE FOR ANY
20  * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  *
27  */
28 
29 #ifndef DXF_CREATION_INTERFACE_H
30 #define DXF_CREATION_INTERFACE_H
31 
32 #include <dxflib/dl_creationadapter.h>
33 #include <dxflib/dl_entities.h>
34 #include <vector>
35 
36 namespace tuw_graph
37 {
38  class DxfLineArcParser : public DL_CreationAdapter
39  {
40  public:
41  //overloaded functions for receiving the dxf entities
42  virtual void addLine(const DL_LineData& _line);
43  virtual void addArc(const DL_ArcData& _arc);
44  virtual void addCircle(const DL_CircleData& _circle);
45  virtual void addImage(const DL_ImageData& _image);
49  void reset();
53  const std::vector<DL_LineData> &getLines();
57  const std::vector<DL_ArcData> &getArcs();
61  const std::vector<DL_CircleData> &getCircles();
65  const std::vector<DL_ImageData> &getImage();
66  private:
67  std::vector<DL_LineData> lines_;
68  std::vector<DL_ArcData> arcs_;
69  std::vector<DL_CircleData> circles_;
70  std::vector<DL_ImageData> images_;
71  bool imageFound_ = false;
72  bool error_ = false;
73  };
74 }
75 
76 #endif
std::vector< DL_ArcData > arcs_
std::vector< DL_CircleData > circles_
std::vector< DL_ImageData > images_
const std::vector< DL_ArcData > & getArcs()
virtual void addCircle(const DL_CircleData &_circle)
const std::vector< DL_CircleData > & getCircles()
void reset()
resets the creation interface
const std::vector< DL_ImageData > & getImage()
virtual void addArc(const DL_ArcData &_arc)
std::vector< DL_LineData > lines_
virtual void addLine(const DL_LineData &_line)
virtual void addImage(const DL_ImageData &_image)
const std::vector< DL_LineData > & getLines()


tuw_voronoi_graph
Author(s): Benjamin Binder
autogenerated on Mon Jun 10 2019 15:42:44