Skip to content

Commit

Permalink
exportg GetLayers()
Browse files Browse the repository at this point in the history
  • Loading branch information
HomerReid committed Apr 10, 2019
1 parent e0548ce commit a6f6f2d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions lib/libGDSII.cc
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ void OpenGDSIIFile(const char *GDSIIFileName)
if (CachedGDSIIData->ErrMsg)
GDSIIData::ErrExit(CachedGDSIIData->ErrMsg->c_str());
}

iVec GetLayers(const char *GDSIIFile)
{ OpenGDSIIFile(GDSIIFile);
return CachedGDSIIData->GetLayers();
}

PolygonList GetPolygons(const char *GDSIIFile, const char *Label, int Layer)
{ OpenGDSIIFile(GDSIIFile);
Expand Down
5 changes: 3 additions & 2 deletions lib/libGDSII.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,13 @@ bool PointInPolygon(dVec Vertices, double X, double Y);

/***********************************************************************/
/* the next few routines implement a caching mechanism by which an API */
/* code can make multiple calls to GetPolygons() for a given GDSII file*/
/* without requiring the API code to keep track of a GDSIIData */
/* code can make multiple calls to e.g. GetPolygons() for a given GDSII*/
/* file without requiring the API code to keep track of a GDSIIData */
/* instance, but also without re-reading the file each time. */
/* After the final such call the API code may call ClearGDSIICache() */
/* to free memory allocated for the cache. */
/***********************************************************************/
iVec GetLayers(const char *GDSIIFile);
PolygonList GetPolygons(const char *GDSIIFile, const char *Text, int Layer=-1);
PolygonList GetPolygons(const char *GDSIIFile, int Layer=-1);
TextStringList GetTextStrings(const char *GDSIIFile, int Layer=-1);
Expand Down

0 comments on commit a6f6f2d

Please sign in to comment.