![]() |
libDXF 0.0.1
A library with DXF related functions written in C.
|
Functions for a DXF end of block marker entity (ENDBLK).
More...
#include "endblk.h"
Go to the source code of this file.
Functions | |
| DxfEndblk * | dxf_endblk_new () |
Allocate memory for a DxfEndblk (a DXF ENDBLK entity). | |
| DxfEndblk * | dxf_endblk_init (DxfEndblk *endblk) |
Allocate memory and initialize data fields in a DxfEndblk (a DXF ENDBLK entity). | |
| DxfEndblk * | dxf_endblk_read (DxfFile *fp, DxfEndblk *endblk) |
Read data from a DXF file into a DxfEndblk (a DXF ENDBLK entity). | |
| int | dxf_endblk_write (DxfFile *fp, DxfEndblk *endblk) |
Write DXF output to a file for an end of block marker (a DXF ENDBLK entity). | |
| int | dxf_endblk_free (DxfEndblk *endblk) |
Free the allocated memory for a DxfEndblk (a DXF ENDBLK entity) and all it's data fields. | |
| int | dxf_endblk_get_id_code (DxfEndblk *endblk) |
Get the ID code from a DxfEndblk (a DXF ENDBLK entity). | |
| DxfEndblk * | dxf_endblk_set_id_code (DxfEndblk *endblk, int id_code) |
Set the ID code for a DxfEndblk (a DXF ENDBLK entity). | |
| char * | dxf_endblk_get_layer (DxfEndblk *endblk) |
Get the layer from a DxfEndblk (a DXF ENDBLK entity). | |
| DxfEndblk * | dxf_endblk_set_layer (DxfEndblk *endblk, char *layer) |
Set the layer for a DxfEndblk (a DXF ENDBLK entity). | |
| char * | dxf_endblk_get_dictionary_owner_soft (DxfEndblk *endblk) |
Get the soft pointer to the dictionary owner from a DxfEndblk (a DXF ENDBLK entity). | |
| DxfEndblk * | dxf_endblk_set_dictionary_owner_soft (DxfEndblk *endblk, char *dictionary_owner_soft) |
Set the pointer to the dictionary_owner_soft for a DxfEndblk (a DXF ENDBLK entity). | |
Functions for a DXF end of block marker entity (ENDBLK).
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 endblk.c.
| DxfEndblk* dxf_endblk_new | ( | ) |
Allocate memory for a DxfEndblk (a DXF ENDBLK entity).
Fill the memory contents with zeros.
DxfEndblk.Definition at line 53 of file endblk.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_block_init(), dxf_endblk_init(), and dxf_endblk_read().
Allocate memory and initialize data fields in a DxfEndblk (a DXF ENDBLK entity).
NULL when no memory was allocated, a pointer to the allocated memory when succesful.| endblk | Pointer to the DXF end of block marker entity |
Definition at line 97 of file endblk.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, dxf_endblk_new(), dxf_endblk_set_dictionary_owner_soft(), dxf_endblk_set_id_code(), and dxf_endblk_set_layer().
Referenced by dxf_endblk_read().

Read data from a DXF file into a DxfEndblk (a DXF ENDBLK entity).
The last line read from file contained the string "ENDBLK".
Now follows some data for the ENDBLK, to be terminated with a " 0" string announcing the following entity, or the end of the ENTITY section marker ENDSEC.
While parsing the DXF file store data in endblk.
endblk.BLOCK entity up until the closing Group code 0, the pointer to the following ENDBLK entity needs to be stored in the current (last) DxfBlock struct member endblk. | fp | DXF file pointer to an input file (or device). |
| endblk | Pointer to the DXF end of block marker entity |
Definition at line 154 of file endblk.c.
References _, dxf_endblk_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, dxf_endblk_init(), dxf_endblk_new(), dxf_file_struct::filename, dxf_file_struct::fp, dxf_endblk_struct::id_code, dxf_endblk_struct::layer, and dxf_file_struct::line_number.

Write DXF output to a file for an end of block marker (a DXF ENDBLK entity).
Appears only in BLOCKS section.
| fp | DXF file pointer to an output file (or device). |
| endblk | Pointer to the DXF end of block marker entity |
Definition at line 255 of file endblk.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_13, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_endblk_get_id_code(), dxf_endblk_get_layer(), and dxf_file_struct::fp.
Referenced by dxf_block_write().

| int dxf_endblk_free | ( | DxfEndblk * | endblk | ) |
Free the allocated memory for a DxfEndblk (a DXF ENDBLK entity) and all it's data fields.
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred.| endblk | Pointer to the DXF end of block marker entity |
Definition at line 324 of file endblk.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_endblk_get_dictionary_owner_soft(), and dxf_endblk_get_layer().

| int dxf_endblk_get_id_code | ( | DxfEndblk * | endblk | ) |
Get the ID code from a DxfEndblk (a DXF ENDBLK entity).
| endblk | a pointer to a DxfEndblk (a DXF ENDBLK entity). |
Definition at line 364 of file endblk.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_endblk_struct::id_code.
Referenced by dxf_endblk_write().
Set the ID code for a DxfEndblk (a DXF ENDBLK entity).
| endblk | a pointer to a DxfEndblk (a DXF ENDBLK entity). |
| id_code | Identification number for the entity. This is to be an unique (sequential) number in the DXF file. |
Definition at line 408 of file endblk.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_ellipse_struct::id_code, and dxf_endblk_struct::id_code.
Referenced by dxf_endblk_init().
| char* dxf_endblk_get_layer | ( | DxfEndblk * | endblk | ) |
Get the layer from a DxfEndblk (a DXF ENDBLK entity).
NULL when an error occurred.| endblk | a pointer to a DxfEndblk (a DXF ENDBLK entity). |
Definition at line 456 of file endblk.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_endblk_struct::layer.
Referenced by dxf_endblk_free(), and dxf_endblk_write().
Set the layer for a DxfEndblk (a DXF ENDBLK entity).
| endblk | a pointer to a DxfEndblk (a DXF ENDBLK entity). |
| layer | a string containing the layer for the entity. |
Definition at line 500 of file endblk.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_endblk_struct::layer.
Referenced by dxf_endblk_init().
| char* dxf_endblk_get_dictionary_owner_soft | ( | DxfEndblk * | endblk | ) |
Get the soft pointer to the dictionary owner from a DxfEndblk (a DXF ENDBLK entity).
| endblk | a pointer to a DxfEndblk (a DXF ENDBLK entity). |
Definition at line 549 of file endblk.c.
References _, dxf_endblk_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_endblk_free().
| DxfEndblk* dxf_endblk_set_dictionary_owner_soft | ( | DxfEndblk * | endblk, |
| char * | dictionary_owner_soft | ||
| ) |
Set the pointer to the dictionary_owner_soft for a DxfEndblk (a DXF ENDBLK entity).
| endblk | a pointer to a DxfEndblk (a DXF ENDBLK entity). |
| dictionary_owner_soft | a string containing the pointer to the dictionary_owner_soft for the entity. |
Definition at line 594 of file endblk.c.
References _, dxf_endblk_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_endblk_init().
1.7.3