![]() |
libDXF 0.0.1
A library with DXF related functions written in C.
|
Functions for a DXF xrecord object (XRECORD).
More...
#include "xrecord.h"
Go to the source code of this file.
Functions | |
| DxfXrecord * | dxf_xrecord_new () |
Allocate memory for a DxfXrecord. | |
| DxfXrecord * | dxf_xrecord_init (DxfXrecord *xrecord) |
Allocate memory and initialize data fields in a XRECORD object. | |
| DxfXrecord * | dxf_xrecord_read (DxfFile *fp, DxfXrecord *xrecord) |
Read data from a DXF file into a DXF XRECORD object. | |
| int | dxf_xrecord_write (DxfFile *fp, DxfXrecord *xrecord) |
Write DXF output to a file for a DXF XRECORD object. | |
| int | dxf_xrecord_free (DxfXrecord *xrecord) |
Free the allocated memory for a DXF XRECORD and all it's data fields. | |
| void | dxf_xrecord_free_chain (DxfXrecord *xrecords) |
Free the allocated memory for a chain of DXF XRECORD objects and all their data fields. | |
Functions for a DXF xrecord object (XRECORD).
XRECORD object was introduced in DXF R13.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program 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 this program; if not, write to:
Free Software Foundation, Inc.,
59 Temple Place,
Suite 330,
Boston,
MA 02111 USA.
Drawing eXchange Format (DXF) is a defacto industry standard for the exchange of drawing files between various Computer Aided Drafting programs.
DXF is an industry standard designed by Autodesk(TM).
For more details see http://www.autodesk.com.
Definition in file xrecord.c.
| DxfXrecord* dxf_xrecord_new | ( | ) |
Allocate memory for a DxfXrecord.
Fill the memory contents with zeros.
Definition at line 52 of file xrecord.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_xrecord_init(), and dxf_xrecord_read().
| DxfXrecord* dxf_xrecord_init | ( | DxfXrecord * | xrecord | ) |
Allocate memory and initialize data fields in a XRECORD object.
NULL when no memory was allocated, a pointer to the allocated memory when succesful.| xrecord | a pointer to the DXF XRECORD object. |
Definition at line 96 of file xrecord.c.
References _, dxf_xrecord::D, dxf_xrecord::dictionary_owner_hard, dxf_xrecord::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_xrecord_new(), dxf_xrecord::F, dxf_xrecord::I16, dxf_xrecord::I32, dxf_xrecord::I8, dxf_xrecord::id_code, and dxf_xrecord::next.
Referenced by dxf_xrecord_read().

| DxfXrecord* dxf_xrecord_read | ( | DxfFile * | fp, |
| DxfXrecord * | xrecord | ||
| ) |
Read data from a DXF file into a DXF XRECORD object.
The last line read from file contained the string "XRECORD".
Now follows some data for the XRECORD, to be terminated with a " 0" string announcing the following object, or the end of the OBJECTS section marker ENDSEC.
While parsing the DXF file store data in xrecord.
xrecord.| fp | DXF file pointer to an input file (or device). |
| xrecord | a pointer to the DXF XRECORD object. |
Definition at line 154 of file xrecord.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_13, AutoCAD_14, dxf_xrecord::D, dxf_xrecord::dictionary_owner_hard, dxf_xrecord::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_xrecord_init(), dxf_xrecord_new(), dxf_xrecord::F, dxf_file_struct::filename, dxf_file_struct::fp, dxf_xrecord::group_code, dxf_xrecord::I16, dxf_xrecord::I32, dxf_xrecord::I8, dxf_xrecord::id_code, dxf_file_struct::line_number, and dxf_xrecord::S.

| int dxf_xrecord_write | ( | DxfFile * | fp, |
| DxfXrecord * | xrecord | ||
| ) |
Write DXF output to a file for a DXF XRECORD object.
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred.| fp | DXF file pointer to an output file (or device). |
| xrecord | a pointer to the DXF XRECORD object. |
Definition at line 340 of file xrecord.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_13, AutoCAD_14, dxf_xrecord::D, dxf_xrecord::dictionary_owner_hard, dxf_xrecord::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_xrecord::F, dxf_file_struct::fp, dxf_xrecord::group_code, dxf_xrecord::I16, dxf_xrecord::I32, dxf_xrecord::I8, dxf_xrecord::id_code, and dxf_xrecord::S.
| int dxf_xrecord_free | ( | DxfXrecord * | xrecord | ) |
Free the allocated memory for a DXF XRECORD and all it's data fields.
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred.| xrecord | a pointer to the memory occupied by the DXF XRECORD object. |
Definition at line 488 of file xrecord.c.
References _, dxf_xrecord::dictionary_owner_hard, dxf_xrecord::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_xrecord::next.
Referenced by dxf_xrecord_free_chain().
| void dxf_xrecord_free_chain | ( | DxfXrecord * | xrecords | ) |
Free the allocated memory for a chain of DXF XRECORD objects and all their data fields.
| xrecords | a pointer to the chain of DXF XRECORD objects. |
Definition at line 535 of file xrecord.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_xrecord_free(), and dxf_xrecord::next.

1.7.3