#include <keyio.h>


Public Member Functions | |
| bool | LinkReferences () |
| link references to their destination | |
| 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 | SetFormat (const wxString &format) |
| set the format for double to be this | |
| void | SetFromViewAsTop (bool fromViewAsTop) |
| if set, the current view its ShowObject will be saved top down. | |
| bool | GetFromViewAsTop () |
| /see SetFromViewAsTop() | |
Protected Member Functions | |
| virtual void | WriteDouble (double d) |
| write a double number. | |
| a2dIOHandlerKeyOut & | operator<< (const wxChar *string) |
| a2dIOHandlerKeyOut & | operator<< (const wxString &string) |
| a2dIOHandlerKeyOut & | operator<< (char c) |
| a2dIOHandlerKeyOut & | operator<< (wxInt16 c) |
| a2dIOHandlerKeyOut & | operator<< (wxInt32 c) |
| a2dIOHandlerKeyOut & | operator<< (wxUint16 c) |
| a2dIOHandlerKeyOut & | operator<< (wxUint32 c) |
| a2dIOHandlerKeyOut & | operator<< (double f) |
| a2dIOHandlerKeyOut & | operator<< (float f) |
| const wxChar | Endl () |
| void | WriteProperties (const a2dNamedPropertyList &props) |
| void | WriteFlags (int i) |
| void | Write (Strans *Strans) |
| void | SetFlags (a2dCanvasObject *Element) |
| void | WritePoint (double xi, double yi) |
| void | WriteSegment (const a2dAffineMatrix &lworld, a2dLineSegment *prevSegment, a2dLineSegment *Segment) |
| void | WriteVpath (const a2dAffineMatrix &lworld, const a2dVpath *path, int layer, int datatype, int pathtype, double width) |
| void | WritePoly (const a2dAffineMatrix &lworld, a2dVertexList *vlist, bool close) |
| void | WriteVertexArrayPolyline (const a2dAffineMatrix &lworld, a2dVertexArray *points, int layer, int datatype, int pathtype, double width, bool spline=false, bool close=true) |
| void | WriteVertexListPolyline (const a2dAffineMatrix &lworld, a2dVertexList *points, int layer, int datatype, int pathtype, double width, bool spline=false, bool close=true) |
| void | WriteVertexArrayPolygon (const a2dAffineMatrix &lworld, a2dVertexArray *points, int layer, int datatype, double width, bool spline=false, bool close=true) |
| void | WriteVertexListPolygon (const a2dAffineMatrix &lworld, a2dVertexList *points, int layer, int datatype, double width, bool spline=false, bool close=true) |
| 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 (a2dSurface *surface, 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 | DoSave (a2dCircle *Circle, a2dCanvasObjectList *towrite) |
Protected Attributes | |
| 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 |
| unsigned int | m_points_written |
| wxUint16 | m_lastElementLayer |
| bool | m_textAsPath |
| if true, vonvert text to a2dVpath | |
| bool | m_fromViewAsTop |
Every object in the document is written into the right KEY file structure Info on the different record types that are read can be found in the KEY format manual
Definition at line 161 of file keyio.h.
| bool a2dIOHandlerKeyOut::LinkReferences | ( | ) | [virtual] |
link references to their destination
Override this to define input format specific needs for linking references in a certain format. In the default situation the parser uses m_objecthashmap to store object to which references can be made, while m_lastObjectId is used to store unresolved references. Here those to are resolved.
In the CVG format one can store multiple refrences to one and the same object. The object that is referenced is only written once, for the other references only the object with refid or specific id attributes are written to the CVG file. When loading a file in CVG, such references are resolved and removed from the document. So in the end the old reference is restored. When loading an object, it is created, but its contents will be empty, after resolving, this one will be replaced by the real referenced object. The reason behind all this, is that the actual object might need to be read yet, when a reference is encountered in the CVG file, and therefore the link can not be directly created. In other formats references are used in a simular manner, and to resolve them the same mechanism is used.
Some input/ouput formats are organized in a list of grouped objects, the hierarchy is created after the whole file is read into memory. All non referenced objects are direct childs of the rootobject. In the GDSII format these are called top structures.
Reimplemented from a2dIOHandler.
| bool a2dIOHandlerKeyOut::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 a2dIOHandlerKeyOut::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.