libDXF 0.0.1
A library with DXF related functions written in C.
|
Functions for a DXF table entry (TABLE
).
More...
#include "table.h"
Go to the source code of this file.
Functions | |
DxfTableCell * | dxf_table_cell_new () |
Allocate memory for a DXF TABLE cell. | |
DxfTable * | dxf_table_new () |
Allocate memory for a DXF TABLE . | |
DxfTableCell * | dxf_table_cell_init (DxfTableCell *cell) |
Allocate memory and initialize data fields in a DXF TABLE cell. | |
DxfTable * | dxf_table_init (DxfTable *table) |
Allocate memory and initialize data fields in a DXF TABLE entity. | |
DxfTable * | dxf_table_read (DxfFile *fp, DxfTable *table) |
Read data from a DXF file into a DXF TABLE entity. | |
int | dxf_table_cell_write (DxfFile *fp, DxfTableCell *cell) |
Write DXF output to a file for a DXF TABLE cell. | |
int | dxf_table_write (DxfFile *fp, DxfTable *table) |
Write DXF output to a file for a DXF TABLE entity. | |
int | dxf_table_cell_free (DxfTableCell *cell) |
Free the allocated memory for a DXF TABLE cell and all it's data fields. | |
int | dxf_table_free (DxfTable *table) |
Free the allocated memory for a DXF TABLE and all it's data fields. | |
void | dxf_table_cell_free_chain (DxfTableCell *cells) |
Free the allocated memory for a chain of DXF TABLE cells and all their data fields. | |
void | dxf_table_free_chain (DxfTable *tables) |
Free the allocated memory for a chain of DXF TABLE entities and all their data fields. |
Functions for a DXF table entry (TABLE
).
TABLE
entity was introduced in DXF R2005.
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 table.c.
DxfTableCell* dxf_table_cell_new | ( | ) |
Allocate memory for a DXF TABLE
cell.
Fill the memory contents with zeros.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful.Definition at line 59 of file table.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_table_cell_init().
DxfTable* dxf_table_new | ( | ) |
Allocate memory for a DXF TABLE
.
Fill the memory contents with zeros.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful.Definition at line 104 of file table.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_table_init(), and dxf_table_read().
DxfTableCell* dxf_table_cell_init | ( | DxfTableCell * | cell | ) |
Allocate memory and initialize data fields in a DXF TABLE
cell.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful.cell | a pointer to a DXF TABLE cell. |
Definition at line 149 of file table.c.
References _, dxf_table_cell::alignment, dxf_table_cell::attdef_soft_pointer, dxf_table_cell::attdef_text_string, dxf_table_cell::autofit, dxf_table_cell::block_rotation, dxf_table_cell::block_scale, dxf_table_cell::block_table_record_hard_pointer, dxf_table_cell::border_color_bottom, dxf_table_cell::border_color_left, dxf_table_cell::border_color_right, dxf_table_cell::border_color_top, dxf_table_cell::border_height, dxf_table_cell::border_lineweight_bottom, dxf_table_cell::border_lineweight_left, dxf_table_cell::border_lineweight_right, dxf_table_cell::border_lineweight_top, dxf_table_cell::border_visibility_override_bottom, dxf_table_cell::border_visibility_override_left, dxf_table_cell::border_visibility_override_right, dxf_table_cell::border_visibility_override_top, dxf_table_cell::border_width, dxf_table_cell::color_bg, dxf_table_cell::color_fg, dxf_table_cell::color_fill_override, DXF_COLOR_BYLAYER, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_TEXTSTYLE, DXF_MAX_PARAM, dxf_table_cell_new(), dxf_table_cell::field_object_pointer, dxf_table_cell::flag, dxf_table_cell::merged, dxf_table_cell::next, dxf_table_cell::number_of_block_attdefs, dxf_table_cell::optional_text_string, dxf_table_cell::override, dxf_table_cell::text_height, dxf_table_cell::text_string, dxf_table_cell::text_style_name, dxf_table_cell::type, and dxf_table_cell::virtual_edge.
Allocate memory and initialize data fields in a DXF TABLE
entity.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful.table | a pointer to a DXF TABLE entity. |
Definition at line 236 of file table.c.
References _, dxf_table::binary_graphics_data, dxf_table::block_name, dxf_table::border_color_override_flag, dxf_table::border_lineweight_override_flag, dxf_table::border_visibility_override_flag, dxf_table::cells, dxf_table::color, dxf_table::column_height, dxf_table::dictionary_owner_hard, dxf_table::dictionary_owner_soft, DXF_COLOR_BYLAYER, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LAYER, DXF_DEFAULT_LINETYPE, DXF_MAX_PARAM, DXF_MODELSPACE, dxf_table_new(), dxf_table::elevation, dxf_table::flow_direction, dxf_table::graphics_data_size, dxf_table::horizontal_cell_margin, dxf_table::id_code, dxf_table::layer, dxf_table::linetype, dxf_table::next, dxf_table::number_of_columns, dxf_table::number_of_rows, dxf_table::override_flag, dxf_table::owning_block_pointer, dxf_table::paperspace, dxf_table::row_height, dxf_table::suppress_header_row, dxf_table::suppress_table_title, dxf_table::table_cell_alignment, dxf_table::table_cell_border_color_bottom, dxf_table::table_cell_border_color_horizontal, dxf_table::table_cell_border_color_right, dxf_table::table_cell_border_color_vertical, dxf_table::table_cell_border_lineweight_right, dxf_table::table_cell_color_bg, dxf_table::table_cell_color_fg, dxf_table::table_cell_color_fill_override, dxf_table::table_text_height, dxf_table::table_text_style_name, dxf_table::table_value_flag, dxf_table::tablestyle_object_pointer, dxf_table::thickness, dxf_table::vertical_cell_margin, dxf_table::visibility, dxf_table::x0, dxf_table::x1, dxf_table::y0, dxf_table::y1, dxf_table::z0, and dxf_table::z1.
Referenced by dxf_table_read().
Read data from a DXF file into a DXF TABLE
entity.
The last line read from file contained the string "TABLE".
Now follows some data for the TABLE
, to be terminated with a " 0" string announcing the following table record, or the end of the TABLE
section marker ENDTAB
.
While parsing the DXF file store data in table
.
table
.fp | DXF file pointer to an input file (or device). |
table | a pointer to a DXF TABLE entity. |
Definition at line 339 of file table.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_13, dxf_table::binary_graphics_data, dxf_table::block_name, dxf_table::border_color_override_flag, dxf_table::border_lineweight_override_flag, dxf_table::border_visibility_override_flag, dxf_table::column_height, dxf_table::dictionary_owner_hard, dxf_table::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_table_init(), dxf_table_new(), dxf_file_struct::filename, dxf_file_struct::fp, dxf_table::graphics_data_size, dxf_table::id_code, dxf_file_struct::line_number, dxf_table::number_of_columns, dxf_table::number_of_rows, dxf_table::override_flag, dxf_table::owning_block_pointer, dxf_table::row_height, dxf_table::table_value_flag, dxf_table::tablestyle_object_pointer, dxf_table::x0, dxf_table::x1, dxf_table::y0, dxf_table::y1, dxf_table::z0, and dxf_table::z1.
int dxf_table_cell_write | ( | DxfFile * | fp, |
DxfTableCell * | cell | ||
) |
Write DXF output to a file for a DXF TABLE
cell.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred.fp | DXF file pointer to an output file (or device). |
cell | a pointer to a DXF TABLE entity. |
Definition at line 614 of file table.c.
References _, dxf_table_cell::attdef_soft_pointer, dxf_table_cell::autofit, dxf_table_cell::block_rotation, dxf_table_cell::block_scale, dxf_table_cell::block_table_record_hard_pointer, dxf_table_cell::border_height, dxf_table_cell::border_width, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_table_cell::field_object_pointer, dxf_table_cell::flag, dxf_file_struct::fp, dxf_table_cell::merged, dxf_table_cell::number_of_block_attdefs, dxf_table_cell::optional_text_string, dxf_table_cell::override_flag, dxf_table_cell::text_string, dxf_table_cell::type, and dxf_table_cell::virtual_edge.
Write DXF output to a file for a DXF TABLE
entity.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred.fp | DXF file pointer to an output file (or device). |
table | a pointer to a DXF TABLE entity. |
Definition at line 705 of file table.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_13, dxf_table::binary_graphics_data, dxf_table::block_name, dxf_table::border_color_override_flag, dxf_table::border_lineweight_override_flag, dxf_table::border_visibility_override_flag, dxf_table::column_height, dxf_table::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_file_struct::fp, dxf_table::graphics_data_size, dxf_table::id_code, dxf_table::number_of_columns, dxf_table::number_of_rows, dxf_table::override_flag, dxf_table::owning_block_pointer, dxf_table::row_height, dxf_table::table_data_version, dxf_table::table_value_flag, dxf_table::tablestyle_object_pointer, dxf_table::x0, dxf_table::x1, dxf_table::y0, dxf_table::y1, dxf_table::z0, and dxf_table::z1.
int dxf_table_cell_free | ( | DxfTableCell * | cell | ) |
Free the allocated memory for a DXF TABLE
cell and all it's data fields.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred.cell | a pointer to a DXF TABLE cell. |
Definition at line 814 of file table.c.
References _, dxf_table_cell::attdef_soft_pointer, dxf_table_cell::attdef_text_string, dxf_table_cell::block_table_record_hard_pointer, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_MAX_PARAM, dxf_table_cell::field_object_pointer, dxf_table_cell::next, dxf_table_cell::optional_text_string, dxf_table_cell::text_string, and dxf_table_cell::text_style_name.
Referenced by dxf_table_cell_free_chain().
int dxf_table_free | ( | DxfTable * | table | ) |
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.table | a pointer to a DXF TABLE entity. |
Definition at line 874 of file table.c.
References _, dxf_table::binary_graphics_data, dxf_table::block_name, dxf_table::dictionary_owner_hard, dxf_table::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_MAX_PARAM, dxf_table::layer, dxf_table::linetype, dxf_table::next, dxf_table::owning_block_pointer, dxf_table::table_text_style_name, and dxf_table::tablestyle_object_pointer.
Referenced by dxf_table_free_chain().
void dxf_table_cell_free_chain | ( | DxfTableCell * | cells | ) |
Free the allocated memory for a chain of DXF TABLE
cells and all their data fields.
cells | pointer to the chain of DXF TABLE cells. |
Definition at line 934 of file table.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_table_cell_free(), and dxf_table_cell::next.
void dxf_table_free_chain | ( | DxfTable * | tables | ) |
Free the allocated memory for a chain of DXF TABLE
entities and all their data fields.
tables | pointer to the chain of DXF TABLE entities. |
Definition at line 974 of file table.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_table_free(), and dxf_table::next.