From 58bb74b905dbb69f49d837eb667eb21d4bc6635d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mario=20H=C3=BCttel?= Date: Tue, 5 Mar 2019 19:48:03 +0100 Subject: [PATCH] Add checks to cell structure --- gds-parser/gds-types.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/gds-parser/gds-types.h b/gds-parser/gds-types.h index d6630cb..29b0a95 100644 --- a/gds-parser/gds-types.h +++ b/gds-parser/gds-types.h @@ -35,6 +35,8 @@ #include #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 */ @@ -59,6 +61,21 @@ struct gds_point { 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 */ + int affected_by_reference_loop; /**< @brief 1 if the cell is affected by a reference loop and therefore not renderable */ + /** + * @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 */ @@ -105,6 +122,7 @@ struct gds_cell { 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 */ }; /**