#include <gdsio.h>


Public Member Functions | |
| bool | CanSave (const wxObject *obj=NULL) |
| Should return true if the handler can write this document to a stream. | |
| virtual bool | Save (a2dDocumentOutputStream &stream, const wxObject *doc) |
| Override to write to the stream and store (part of) of the document contents in the stream. | |
| virtual void | InitializeSave () |
| Inits the handler for writing. | |
| virtual void | ResetSave () |
| Reset the object after saving. | |
| void | SetSaveTextAsVpath (bool textAsPath) |
| if set text will be converted to a vectorpath, and as polygons and polylines. | |
| bool | GetSaveTextAsVpath () |
| /see SetSaveTextAsVpath() | |
| void | SetFromViewAsTop (bool fromViewAsTop) |
| if set, the current view its ShowObject will be saved top down. | |
| bool | GetFromViewAsTop () |
| /see SetFromViewAsTop() | |
Protected Member Functions | |
| unsigned int | ReadUnsignedInt () |
| int | ReadInt () |
| long | ReadLong () |
| float | ReadFloat () |
| double | ReadDouble () |
| void | WriteByte (G_BYTE ch) |
| void | WriteUnsignedInt (TWO_G_BYTE_UNSIGNED_INTEGER i) |
| void | WriteInt (TWO_G_BYTE_SIGNED_INTEGER i) |
| void | WriteLong (FOUR_G_BYTE_SIGNED_INTEGER i) |
| void | WriteFloat (FOUR_G_BYTE_REAL i) |
| void | WriteDouble (EIGHT_G_BYTE_REAL i) |
| void | Write (Strans *Strans) |
| void | WriteHeader (TWO_G_BYTE_UNSIGNED_INTEGER nw_recordsize, G_BYTE nw_datatype, G_BYTE nw_recordtype) |
| void | WriteString (const wxString &a_string) |
| write a string | |
| void | SetFlags (a2dCanvasObject *Element) |
| void | WritePoint (double xi, double yi) |
| void | WriteVpath (const a2dAffineMatrix &lworld, const a2dVpath *path, int layer, int datatype, int pathtype, double width) |
| void | WritePath (const a2dAffineMatrix &lworld, a2dVertexArray *points, int layer, int datatype, int pathtype, double width) |
| void | WritePath (const a2dAffineMatrix &lworld, a2dVertexList *points, int layer, int datatype, int pathtype, double width) |
| void | WriteBoundary (const a2dAffineMatrix &lworld, a2dVertexArray *points, int layer, int datatype) |
| void | WriteBoundary (const a2dAffineMatrix &lworld, a2dVertexList *points, int layer, int datatype, bool spline=false) |
| void | SaveStructure (a2dCanvasObject *object, a2dCanvasObjectList *towrite) |
| void | Save (a2dCanvasObject *object, a2dCanvasObjectList *towrite) |
| void | DoSave (a2dPolylineL *obj, a2dCanvasObjectList *towrite) |
| void | DoSave (a2dPolygonL *obj, a2dCanvasObjectList *towrite) |
| void | DoSave (a2dVectorPath *obj, a2dCanvasObjectList *towrite) |
| void | DoSave (a2dText *obj, a2dCanvasObjectList *towrite) |
| void | DoSave (a2dTextGDS *obj, a2dCanvasObjectList *towrite) |
| void | DoSave (a2dCanvasObjectReference *obj, a2dCanvasObjectList *towrite) |
| void | DoSave (a2dCanvasObjectArrayReference *obj, a2dCanvasObjectList *towrite) |
| void | double2gds (unsigned char fb[]) |
| convert a machine real to a gdsii real | |
Protected Attributes | |
| bool | m_back |
| last read record is stored | |
| TWO_G_BYTE_UNSIGNED_INTEGER | m_recordsize |
| size of the last read record | |
| G_BYTE | m_recordtype |
| recordtype of last read record | |
| G_BYTE | m_datatype |
| the type of the data in the last read record | |
| int | m_mapping [wxMAXLAYER] |
| mapping of GDSII layers to internal layers | |
| a2dCanvasDocument * | m_doc |
| the document to store/load the data found into | |
| double | m_scale_out |
| double | m_userunits_out |
| int | m_objectFlags |
| bool | m_textAsPath |
| if true, convert text to a2dVpath | |
| bool | m_fromViewAsTop |
Every record in the GDSII file is read/mapped into the right gds file structure Info on the different record types that are read can be found in the GDSII format manual
Definition at line 447 of file gdsio.h.
| bool a2dIOHandlerGDSOut::CanSave | ( | const wxObject * | obj = NULL |
) | [virtual] |
Should return true if the handler can write this document to a stream.
Mostly implemented by simply returning true if the handler can indeed do this job. Understand that a a2dDocument itself is useless for storing data, so it needs to be casted internal to a specific a2dDocument.
| obj | pointer to object to save, normally a document. |
Implements a2dIOHandlerStrOut.
| bool a2dIOHandlerGDSOut::Save | ( | a2dDocumentOutputStream & | stream, | |
| const wxObject * | obj | |||
| ) | [virtual] |
Override to write to the stream and store (part of) of the document contents in the stream.
Understand that a a2dDocument itself is useless for storing data, so it needs to be casted internal to a specific a2dDocument.
| stream | the open stream to which the object needs to be saved | |
| obj | object to save into stream, needs to be casted to the right one internal. |
Implements a2dIOHandlerStrOut.
| void a2dIOHandlerGDSOut::double2gds | ( | unsigned char | fb[] | ) | [protected] |
convert a machine real to a gdsii real
convert a machine double to gds double usage: void double2gds( fb ) input arguments : unsigned char fb[] 8byte array with machine double output arguments : unsigned char fb[] 8byte array with gds double
Important note: The number of mantissa bit in VAX representation is one less than the number of mantissa bits in GDSII representation. This routine is not able to generate the last 2 bits of the GDSII representation exactly. There does not exist a general solution for this problem!! In order to overcome the single problem that we are aware of, the UNITs record that is sometimes compared to a UNITs record, the solution is hard coded in this routine. The last 8 bits of a number representing 1E-9 result in 53, but should produce 51 (See GDSII documentation of UNIT record and the given example of it).
!! The same story holds for APOLLO and wxBIG_ENDIAN, but even worse. 1E-3 results in F0 for the last 8 bits instead of EF. Also corrected.