OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
Gds2Import.h
Go to the documentation of this file.
1#ifndef GDS2IMPORT_H_
2#define GDS2IMPORT_H_
3
4#include <vector>
5#include <string>
6#include <map>
7#include "Polygon.h"
8#include "Gds2Path.h"
9#include "StructRef.h"
10#include "Gds2Structure.h"
12private:
13 std::vector<std::byte> data;
14 uint32_t filesize;
15
16 inline void checkSize(unsigned int x);
17 int getWordInt(std::byte a, std::byte b);
18 int getCoordinate(std::byte a, std::byte b, std::byte c, std::byte d);
19 int getElemSize(std::byte a, std::byte b);
20 std::string getStructName(uint32_t readPosition);
21 std::vector<std::pair<int, int>> getXY(uint32_t readPosition);
22 std::vector<MyPolygon> getStrRefPolygons(Gds2Structure& str, std::map<std::string, Gds2Structure>& structMap, std::vector<MyPolygon>& polygons);
23 StructRef getStructRef(uint32_t& readPosition);
24 MyPolygon getPolygon(uint32_t& readPosition);
25 Gds2Path getPath(uint32_t& readPosition);
26 Gds2Structure getStruct(uint32_t& readPosition);
27 std::pair<std::vector<MyPolygon>, std::vector<Gds2Path>> getStrRefData(Gds2Structure& structure, std::map<std::string, Gds2Structure>& structMap, std::pair<std::vector<MyPolygon>, std::vector<Gds2Path>>& strReFData);
28public:
30 Gds2Import(std::string filePath);
31 std::vector<std::byte> readFileData(const std::string& name);
32 std::vector<MyPolygon> getPolygons();
33 std::vector<Gds2Structure> getModelData();
34 std::pair<std::vector<MyPolygon>,std::vector<Gds2Path>> modelData();
35 std::pair<std::vector<MyPolygon>, std::vector<Gds2Path>> getStructData(std::vector<Gds2Structure>& structures);
36 std::vector<std::pair<int, std::vector<int>>> readStackUp(std::string path);
37};
38#endif
Definition Gds2Import.h:11
std::pair< std::vector< MyPolygon >, std::vector< Gds2Path > > modelData()
Definition Gds2Import.cpp:473
std::vector< MyPolygon > getPolygons()
Definition Gds2Import.cpp:323
std::vector< std::pair< int, std::vector< int > > > readStackUp(std::string path)
Definition Gds2Import.cpp:576
std::vector< std::byte > readFileData(const std::string &name)
Definition Gds2Import.cpp:561
std::vector< Gds2Structure > getModelData()
Definition Gds2Import.cpp:405
std::pair< std::vector< MyPolygon >, std::vector< Gds2Path > > getStructData(std::vector< Gds2Structure > &structures)
Definition Gds2Import.cpp:364
Definition Gds2Path.h:8
Definition Gds2Structure.h:15
Definition Polygon.h:9
Definition StructRef.h:9