Update include file hierarchy: Move include file to central include tree
This commit is contained in:
@@ -34,8 +34,6 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
#include "gds-parser.h"
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
@@ -43,6 +41,8 @@
|
||||
#include <math.h>
|
||||
#include <cairo.h>
|
||||
|
||||
#include <gds-render/gds-utils/gds-parser.h>
|
||||
|
||||
/**
|
||||
* @brief Default units assumed for library.
|
||||
* @note This value is usually overwritten with the value defined in the library.
|
||||
|
@@ -1,49 +0,0 @@
|
||||
/*
|
||||
* GDSII-Converter
|
||||
* Copyright (C) 2018 Mario Hüttel <mario.huettel@gmx.net>
|
||||
*
|
||||
* This file is part of GDSII-Converter.
|
||||
*
|
||||
* GDSII-Converter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* GDSII-Converter is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file gds-parser.h
|
||||
* @brief Header file for the GDS-Parser
|
||||
* @author Mario Hüttel <mario.huettel@gmx.net>
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup GDS-Utilities
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef __GDSPARSE_H__
|
||||
#define __GDSPARSE_H__
|
||||
|
||||
#include <glib.h>
|
||||
#include "gds-types.h"
|
||||
|
||||
#define GDS_PRINT_DEBUG_INFOS (0) /**< @brief 1: Print infos, 0: Don't print */
|
||||
|
||||
int parse_gds_from_file(const char *filename, GList **library_array);
|
||||
/**
|
||||
* @brief Deletes all libraries including cells, references etc.
|
||||
* @param library_list Pointer to a list of #gds_library. Is set to NULL after completion.
|
||||
* @return 0
|
||||
*/
|
||||
int clear_lib_list(GList **library_list);
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif /* __GDSPARSE_H__ */
|
@@ -33,9 +33,10 @@
|
||||
* @{
|
||||
*/
|
||||
|
||||
#include "gds-tree-checker.h"
|
||||
#include <stdio.h>
|
||||
|
||||
#include <gds-render/gds-utils/gds-tree-checker.h>
|
||||
|
||||
int gds_tree_check_cell_references(struct gds_library *lib)
|
||||
{
|
||||
GList *cell_iter;
|
||||
|
@@ -1,61 +0,0 @@
|
||||
/*
|
||||
* GDSII-Converter
|
||||
* Copyright (C) 2019 Mario Hüttel <mario.huettel@gmx.net>
|
||||
*
|
||||
* This file is part of GDSII-Converter.
|
||||
*
|
||||
* GDSII-Converter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* GDSII-Converter is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file gds-tree-checker.h
|
||||
* @brief Checking functions of a cell tree (Header)
|
||||
* @author Mario Hüttel <mario.huettel@gmx.net>
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup GDS-Utilities
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef _GDS_TREE_CHECKER_H_
|
||||
#define _GDS_TREE_CHECKER_H_
|
||||
|
||||
#include "gds-types.h"
|
||||
|
||||
/**
|
||||
* @brief gds_tree_check_cell_references checks if all child cell references can be resolved in the given library
|
||||
*
|
||||
* This function will only mark cells that
|
||||
* directly contain unresolved references.
|
||||
*
|
||||
* If a cell contains a reference to a cell with unresolved references, it is not flagged.
|
||||
*
|
||||
* @param lib The GDS library to check
|
||||
* @return less than 0 if an error occured during processing; 0 if all child cells could be resolved;
|
||||
* greater than zero if the processing was successful but not all cell references could be resolved.
|
||||
* In this case the number of unresolved references is returned
|
||||
*/
|
||||
int gds_tree_check_cell_references(struct gds_library *lib);
|
||||
|
||||
/**
|
||||
* @brief gds_tree_check_reference_loops checks if the given library contains reference loops
|
||||
* @param lib GDS library
|
||||
* @return negative if an error occured, zero if there are no reference loops, else a positive number representing the number
|
||||
* of affected cells
|
||||
*/
|
||||
int gds_tree_check_reference_loops(struct gds_library *lib);
|
||||
|
||||
#endif /* _GDS_TREE_CHECKER_H_ */
|
||||
|
||||
/** @} */
|
@@ -1,146 +0,0 @@
|
||||
/*
|
||||
* GDSII-Converter
|
||||
* Copyright (C) 2018 Mario Hüttel <mario.huettel@gmx.net>
|
||||
*
|
||||
* This file is part of GDSII-Converter.
|
||||
*
|
||||
* GDSII-Converter is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* GDSII-Converter is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with GDSII-Converter. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file gds-types.h
|
||||
* @brief Defines types and macros used by the GDS-Parser
|
||||
* @author Mario Hüttel <mario.huettel@gmx.net>
|
||||
*/
|
||||
|
||||
/**
|
||||
* @addtogroup GDS-Utilities
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifndef __GDS_TYPES_H__
|
||||
#define __GDS_TYPES_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include <glib.h>
|
||||
|
||||
#define CELL_NAME_MAX (100) /**< @brief Maximum length of a gds_cell::name or a gds_library::name */
|
||||
|
||||
/* Maybe use the macros that ship with the compiler? */
|
||||
#define MIN(a,b) (((a) < (b)) ? (a) : (b)) /**< @brief Return smaller number */
|
||||
#define MAX(a,b) (((a) > (b)) ? (a) : (b)) /**< @brief Return bigger number */
|
||||
|
||||
/** @brief Defintion of check counter default value
|
||||
* that indicates that the corresponding check has not yet been executed */
|
||||
enum {GDS_CELL_CHECK_NOT_RUN = -1};
|
||||
|
||||
/** @brief Types of graphic objects */
|
||||
enum graphics_type
|
||||
{
|
||||
GRAPHIC_PATH = 0, /**< @brief Path. Esentially a line */
|
||||
GRAPHIC_POLYGON = 1, /**< @brief An arbitrary polygon */
|
||||
GRAPHIC_BOX = 2 /**< @brief A rectangle. @warning Implementation in renderers might be buggy!*/
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Defines the line caps of a path
|
||||
*/
|
||||
enum path_type {PATH_FLUSH = 0, PATH_ROUNDED = 1, PATH_SQUARED = 2}; /**< Path line caps */
|
||||
|
||||
/**
|
||||
* @brief A point in the 2D plane. Sometimes references as vertex
|
||||
*/
|
||||
struct gds_point {
|
||||
int x;
|
||||
int y;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Stores the result of the cell checks.
|
||||
*/
|
||||
struct gds_cell_checks {
|
||||
int unresolved_child_count; /**< @brief Number of unresolved cell instances inside this cell. Default: GDS_CELL_CHECK_NOT_RUN */
|
||||
int affected_by_reference_loop; /**< @brief 1 if the cell is affected by a reference loop and therefore not renderable. Default: GDS_CELL_CHECK_NOT_RUN*/
|
||||
/**
|
||||
* @brief For the internal use of the checker.
|
||||
* @warning Do not use this structure and its contents!
|
||||
*/
|
||||
struct _check_internals {
|
||||
int marker;
|
||||
} _internal;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Date information for cells and libraries
|
||||
*/
|
||||
struct gds_time_field {
|
||||
uint16_t year;
|
||||
uint16_t month;
|
||||
uint16_t day;
|
||||
uint16_t hour;
|
||||
uint16_t minute;
|
||||
uint16_t second;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A GDS graphics object
|
||||
*/
|
||||
struct gds_graphics {
|
||||
enum graphics_type gfx_type; /**< \brief Type of graphic */
|
||||
GList *vertices; /**< @brief List of #gds_point */
|
||||
enum path_type path_render_type; /**< @brief Line cap */
|
||||
int width_absolute; /**< @brief Width. Not used for objects other than paths */
|
||||
int16_t layer; /**< @brief Layer the graphic object is on */
|
||||
uint16_t datatype;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief This represents an instanc of a cell inside another cell
|
||||
*/
|
||||
struct gds_cell_instance {
|
||||
char ref_name[CELL_NAME_MAX]; /**< @brief Name of referenced cell */
|
||||
struct gds_cell *cell_ref; /**< @brief Referenced gds_cell structure */
|
||||
struct gds_point origin; /**< @brief Origin */
|
||||
int flipped; /**< @brief Mirrored on x-axis before rotation */
|
||||
double angle; /**< @brief Angle of rotation (counter clockwise) in degrees */
|
||||
double magnification; /**< @brief magnification */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief A Cell inside a gds_library
|
||||
*/
|
||||
struct gds_cell {
|
||||
char name[CELL_NAME_MAX];
|
||||
struct gds_time_field mod_time;
|
||||
struct gds_time_field access_time;
|
||||
GList *child_cells; /**< @brief List of #gds_cell_instance elements */
|
||||
GList *graphic_objs; /**< @brief List of #gds_graphics */
|
||||
struct gds_library *parent_library; /**< @brief Pointer to parent library */
|
||||
struct gds_cell_checks checks; /**< @brief Checking results */
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief GDS Toplevel library
|
||||
*/
|
||||
struct gds_library {
|
||||
char name[CELL_NAME_MAX];
|
||||
struct gds_time_field mod_time;
|
||||
struct gds_time_field access_time;
|
||||
double unit_in_meters; /**< Length of a database unit in meters */
|
||||
GList *cells; /**< List of #gds_cell that contains all cells in this library*/
|
||||
GList *cell_names /**< List of strings that contains all cell names */;
|
||||
};
|
||||
|
||||
/** @} */
|
||||
|
||||
#endif /* __GDS_TYPES_H__ */
|
Reference in New Issue
Block a user