libDXF 0.0.1
A library with DXF related functions written in C.
|
Header file for of a DXF tables section (TABLES
).
More...
#include "global.h"
Go to the source code of this file.
Data Structures | |
struct | dxf_tables |
DXF definition of a tables section. More... | |
Typedefs | |
typedef struct dxf_tables | DxfTables |
DXF definition of a tables section. | |
Functions | |
DxfTables * | dxf_tables_new () |
Allocate memory for a DXF TABLES section. | |
DxfTables * | dxf_tables_init (DxfTables *tables) |
Allocate memory and initialize data fields in a DXF TABLES section. | |
int | dxf_tables_write (DxfFile *fp, DxfTables *tables) |
Write DXF output to a file for a table section. | |
int | dxf_tables_free (DxfTables *tables) |
Free the allocated memory for a DXF TABLE and all it's data fields. |
Header file for of a DXF tables section (TABLES
).
The TABLES section contains several tables, each of which contain a variable number of table entries.
The order of the tables may change, but the LTYPE table will always precede the LAYER table. Each table is introduced with a 0 group with the label TABLE.
This is followed by a 2 group identifying the particular table (VPORT, LTYPE, LAYER, STYLE, VIEW, DIMSTYLE, UCS or APPID) and a 70 group that specifies the maximum number of table entries that may follow.
Table names are always output in uppercase characters.
The tables in a drawing can contain deleted items, but these are not written to the DXF file.
Thus, fewer table entries may follow the table header than are indicated by the 70 group, so don't use the count in the 70 group as an index to read in the table.
This group is provided so that a program which reads DXF files can allocate an array large enough to hold all the table entries that follow.
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 tables.h.
typedef struct dxf_tables DxfTables |
DXF definition of a tables section.
DxfTables* dxf_tables_new | ( | ) |
Allocate memory for a DXF TABLES
section.
Fill the memory contents with zeros.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful. Definition at line 48 of file tables.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_tables_init().
Allocate memory and initialize data fields in a DXF TABLES
section.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful. tables | DXF tables section. |
Definition at line 86 of file tables.c.
References _, dxf_tables::appids, dxf_tables::block_records, dxf_tables::dimstyles, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_tables_new(), dxf_tables::layers, dxf_tables::ltypes, dxf_tables::max_table_entries, dxf_tables::styles, dxf_tables::ucss, dxf_tables::views, and dxf_tables::vports.
Write DXF output to a file for a table section.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred. fp | DXF file pointer to an output file (or device). |
tables | DXF table section. |
Definition at line 134 of file tables.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_endsec_write(), and dxf_section_write().
int dxf_tables_free | ( | DxfTables * | tables | ) |
Free the allocated memory for a DXF TABLE
and all it's data fields.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred. tables | DXF table section. |
Definition at line 175 of file tables.c.
References _, dxf_tables::appids, dxf_tables::block_records, dxf_tables::dimstyles, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_tables::layers, dxf_tables::ltypes, dxf_tables::styles, dxf_tables::ucss, dxf_tables::views, and dxf_tables::vports.