Code

Node tool: special case node duplication for endnodes - select new endnode
[inkscape.git] / src / extension / dxf2svg / tables.h
1 /* Code for the conversion of DXF information in the TABLES section
2 Matt Squires
3 SoC
4 2005*/
6 #ifndef DXF_TABLES_H
7 #define DXF_TABLES_H
9 #include<vector>
10 #include"read_dxf.h"
12 class table{
13         public:
14                 int ret_maxN();
15         private:
16                 int max_number;
17 };
20 class layer : public table{
21         public:
22                 layer( std::vector< dxfpair > info);
23                 void display();
24                 char* name(char* string);
25         private:
26                 char layer_name[10000];
27                 char ltype_name[10000]; // The layer may also hold the ltype infomation
28                 int color_number;
29                 int plotting_flag;
30         
31 };
34 class ltype : public table{
35         public:
36                 ltype( std::vector< dxfpair > info);
37                 char* name(char* string);
38                 std::vector< double > ret_pattern();
39         private:
40                 char ltype_name[10000];
41                 char descriptive_txt[10000];
42                 int num_elements;
43                 double pattern_length;
44                 std::vector< double > pattern;
45         
46 };
49 class tables{
50         // Well I said that I would only use STL containers internally, but I would have to use a dynamically linked list, and I haven't done for a long time soo STL is my crutch.
51         public:
52                 tables(std::vector< std::vector< dxfpair > > sections); // Put the various entities into their respective vectors
53                 void display_all();
54                 
55                 ltype ret_ltype(char ltype_name[10000], char layer_name[10000]);
56                 layer ret_layer(char layer_name[10000]);
57                 
58                 std::vector< layer > ret_layers();
59                 
60                 
61         private:
62                 //void add_dimstyle(polyline pline);
63                 void add_layer(layer layr);
64                 void add_ltype(ltype line_type);
65                 
66                 std::vector< layer > tables_layer;
67                 std::vector< ltype > tables_ltype;
68 };
71 #endif