libDXF 0.0.1
A library with DXF related functions written in C.
|
Header file for a DXF block record symbol table entry (BLOCK_RECORD
).
More...
#include "global.h"
Go to the source code of this file.
Data Structures | |
struct | dxf_block_record_struct |
Definition of an AutoCAD block record symbol table entry (BLOCK_RECORD ). More... | |
Typedefs | |
typedef struct dxf_block_record_struct | DxfBlockRecord |
Definition of an AutoCAD block record symbol table entry (BLOCK_RECORD ). | |
Functions | |
DxfBlockRecord * | dxf_block_record_new () |
Allocate memory for a DXF BLOCK_RECORD symbol table entry. | |
DxfBlockRecord * | dxf_block_record_init (DxfBlockRecord *block_record) |
Allocate memory and initialize data fields in a DXF BLOCK_RECORD symbol table entry. | |
DxfBlockRecord * | dxf_block_record_read (DxfFile *fp, DxfBlockRecord *block_record) |
Read data from a DXF file into a DXF BLOCK_RECORD symbol table entry. | |
int | dxf_block_record_write (DxfFile *fp, DxfBlockRecord *block_record) |
Write DXF output to a file for a DXF BLOCK_RECORD symbol table entry. | |
int | dxf_block_record_free (DxfBlockRecord *block_record) |
Free the allocated memory for a DXF BLOCK_RECORD and all it's data fields. | |
void | dxf_block_record_free_chain (DxfBlockRecord *block_records) |
Free the allocated memory for a chain of DXF BLOCK_RECORD entities and all their data fields. | |
int | dxf_block_record_get_id_code (DxfBlockRecord *block_record) |
Get the ID code from a DXF BLOCK_RECORD symbol table entry. | |
DxfBlockRecord * | dxf_block_record_set_id_code (DxfBlockRecord *block_record, int id_code) |
Set the ID code for a DXF BLOCK_RECORD symbol table entry. | |
char * | dxf_block_record_get_block_name (DxfBlockRecord *block_record) |
Get the block name from a DXF BLOCK_RECORD symbol table entry. | |
DxfBlockRecord * | dxf_block_record_set_block_name (DxfBlockRecord *block_record, char *block_name) |
Set the block name for a DXF BLOCK_RECORD symbol table entry. | |
int | dxf_block_record_get_flag (DxfBlockRecord *block_record) |
Get the flag value from a DXF BLOCK_RECORD symbol table entry. | |
DxfBlockRecord * | dxf_block_record_set_flag (DxfBlockRecord *block_record, int flag) |
Set the flag value for a DXF BLOCK_RECORD symbol table entry. | |
int | dxf_block_record_is_xreferenced (DxfBlockRecord *block_record) |
Test if this DXF BLOCK_RECORD is externally dependent on an xref. | |
int | dxf_block_record_is_xresolved (DxfBlockRecord *block_record) |
Test if this DXF BLOCK_RECORD is externally dependent on a xref and has been successfully resolved. | |
int | dxf_block_record_is_referenced (DxfBlockRecord *block_record) |
Test if this DXF BLOCK_RECORD is internally referenced by an entity. | |
char * | dxf_block_record_get_dictionary_owner_soft (DxfBlockRecord *block_record) |
Get the soft pointer to the dictionary owner from a DXF BLOCK_RECORD symbol table entry. | |
DxfBlockRecord * | dxf_block_record_set_dictionary_owner_soft (DxfBlockRecord *block_record, char *dictionary_owner_soft) |
Set the pointer to the dictionary_owner_soft for a DXF BLOCK_RECORD symbol table entry. | |
char * | dxf_block_record_get_dictionary_owner_hard (DxfBlockRecord *block_record) |
Get the hard pointer to the dictionary owner from a DXF BLOCK_RECORD symbol table entry. | |
DxfBlockRecord * | dxf_block_record_set_dictionary_owner_hard (DxfBlockRecord *block_record, char *dictionary_owner_hard) |
Set the pointer to the dictionary_owner_hard for a DXF BLOCK_RECORD symbol table entry. | |
DxfBlockRecord * | dxf_block_record_get_next (DxfBlockRecord *block_record) |
Get the pointer to the next BLOCK_RECORD symbol table entry from a DXF BLOCK_RECORD symbol table entry. | |
DxfBlockRecord * | dxf_block_record_set_next (DxfBlockRecord *block_record, DxfBlockRecord *next) |
Set the pointer to the next BLOCK_RECORD symbol table entry for a DXF BLOCK_RECORD symbol table entry. | |
DxfBlockRecord * | dxf_block_record_get_last (DxfBlockRecord *block_record) |
Get the pointer to the last BLOCK_RECORD symbol table entry from a linked list of DXF BLOCK_RECORD symbol table entries. |
Header file for a DXF block record symbol table entry (BLOCK_RECORD
).
BLOCK_RECORD
table 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 block_record.h.
typedef struct dxf_block_record_struct DxfBlockRecord |
Definition of an AutoCAD block record symbol table entry (BLOCK_RECORD
).
This table entry contains an entry to a block registered within a drawing.
DxfBlockRecord* dxf_block_record_new | ( | ) |
Allocate memory for a DXF BLOCK_RECORD
symbol table entry.
Fill the memory contents with zeros.
Definition at line 53 of file block_record.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_block_record_init(), and dxf_block_record_read().
DxfBlockRecord* dxf_block_record_init | ( | DxfBlockRecord * | block_record | ) |
Allocate memory and initialize data fields in a DXF BLOCK_RECORD
symbol table entry.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful. block_record | DXF block record symbol table entry. |
Definition at line 91 of file block_record.c.
References _, dxf_block_record_new(), dxf_block_record_set_block_name(), dxf_block_record_set_dictionary_owner_hard(), dxf_block_record_set_dictionary_owner_soft(), dxf_block_record_set_flag(), dxf_block_record_set_id_code(), dxf_block_record_set_next(), DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_block_record_read().
DxfBlockRecord* dxf_block_record_read | ( | DxfFile * | fp, |
DxfBlockRecord * | block_record | ||
) |
Read data from a DXF file into a DXF BLOCK_RECORD
symbol table entry.
The last line read from file contained the string "BLOCK_RECORD".
Now follows some data for the BLOCK_RECORD
, 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 block_record
.
block_record
. fp | DXF file pointer to an input file (or device). |
block_record | DXF block_record symbol table entry. |
Definition at line 141 of file block_record.c.
References _, dxf_block_record_struct::block_name, dxf_block_record_struct::dictionary_owner_hard, dxf_block_record_struct::dictionary_owner_soft, dxf_block_record_init(), dxf_block_record_new(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_file_struct::filename, dxf_block_record_struct::flag, dxf_file_struct::fp, dxf_block_record_struct::id_code, and dxf_file_struct::line_number.
int dxf_block_record_write | ( | DxfFile * | fp, |
DxfBlockRecord * | block_record | ||
) |
Write DXF output to a file for a DXF BLOCK_RECORD
symbol table entry.
fp | DXF file pointer to an output file (or device). |
block_record | DXF BLOCK_RECORD symbol table entry. |
Definition at line 249 of file block_record.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_13, AutoCAD_14, dxf_block_record_get_block_name(), dxf_block_record_get_dictionary_owner_hard(), dxf_block_record_get_dictionary_owner_soft(), dxf_block_record_get_flag(), dxf_block_record_get_id_code(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_file_struct::fp.
int dxf_block_record_free | ( | DxfBlockRecord * | block_record | ) |
Free the allocated memory for a DXF BLOCK_RECORD
and all it's data fields.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred. block_record | DXF BLOCK_RECORD symbol table entry. |
Definition at line 357 of file block_record.c.
References _, dxf_block_record_struct::block_name, dxf_block_record_struct::dictionary_owner_hard, dxf_block_record_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_record_struct::next.
Referenced by dxf_block_record_free_chain().
void dxf_block_record_free_chain | ( | DxfBlockRecord * | block_records | ) |
Free the allocated memory for a chain of DXF BLOCK_RECORD
entities and all their data fields.
block_records | pointer to the chain of DXF BLOCK_RECORD entities. |
Definition at line 397 of file block_record.c.
References _, dxf_block_record_free(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_record_struct::next.
int dxf_block_record_get_id_code | ( | DxfBlockRecord * | block_record | ) |
Get the ID code from a DXF BLOCK_RECORD
symbol table entry.
block_record | a pointer to a DXF BLOCK_RECORD symbol table entry. |
Definition at line 430 of file block_record.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_record_struct::id_code.
Referenced by dxf_block_record_write().
DxfBlockRecord* dxf_block_record_set_id_code | ( | DxfBlockRecord * | block_record, |
int | id_code | ||
) |
Set the ID code for a DXF BLOCK_RECORD
symbol table entry.
block_record | a pointer to a DXF BLOCK_RECORD symbol table entry. |
id_code | Identification number for the entity. This is to be an unique (sequential) number in the DXF file. |
Definition at line 466 of file block_record.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_record_struct::id_code.
Referenced by dxf_block_record_init().
char* dxf_block_record_get_block_name | ( | DxfBlockRecord * | block_record | ) |
Get the block name from a DXF BLOCK_RECORD
symbol table entry.
NULL
when an error occurred. block_record | a pointer to a DXF BLOCK_RECORD symbol table entry. |
Definition at line 510 of file block_record.c.
References _, dxf_block_record_struct::block_name, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_block_record_write().
DxfBlockRecord* dxf_block_record_set_block_name | ( | DxfBlockRecord * | block_record, |
char * | block_name | ||
) |
Set the block name for a DXF BLOCK_RECORD
symbol table entry.
block_record | a pointer to a DXF BLOCK_RECORD symbol table entry. |
block_name | a string containing the block name for the symbol table entry. |
Definition at line 547 of file block_record.c.
References _, dxf_block_record_struct::block_name, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_block_record_init().
int dxf_block_record_get_flag | ( | DxfBlockRecord * | block_record | ) |
Get the flag value from a DXF BLOCK_RECORD
symbol table entry.
block_record | a pointer to a DXF BLOCK_RECORD symbol table entry. |
Definition at line 590 of file block_record.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_record_struct::flag.
Referenced by dxf_block_record_write().
DxfBlockRecord* dxf_block_record_set_flag | ( | DxfBlockRecord * | block_record, |
int | flag | ||
) |
Set the flag value for a DXF BLOCK_RECORD
symbol table entry.
block_record | a pointer to a DXF BLOCK_RECORD symbol table entry. |
flag | This flag is for the benefit of AutoCAD commands; it can be ignored by most programs that read DXF files, and need not be set by programs that write DXF files. |
Definition at line 634 of file block_record.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_record_struct::flag.
Referenced by dxf_block_record_init().
int dxf_block_record_is_xreferenced | ( | DxfBlockRecord * | block_record | ) |
Test if this DXF BLOCK_RECORD
is externally dependent on an xref.
TRUE
when BLOCK_RECORD
is externally dependent on an xref, or FALSE
when BLOCK_RECORD
is not externally dependent on an xref, or (-1) when an error occured. block_record | DXF BLOCK_RECORD symbol table entry. |
Definition at line 687 of file block_record.c.
References _, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_record_struct::flag.
int dxf_block_record_is_xresolved | ( | DxfBlockRecord * | block_record | ) |
Test if this DXF BLOCK_RECORD
is externally dependent on a xref and has been successfully resolved.
TRUE
when BLOCK_RECORD
is externally dependent on a xref and has been successfully resolved, or FALSE
when BLOCK_RECORD
is not externally dependent on a xref and has not been successfully resolved, or (-1) when an error occured. block_record | DXF BLOCK_RECORD symbol table entry. |
Definition at line 721 of file block_record.c.
References _, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_record_struct::flag.
int dxf_block_record_is_referenced | ( | DxfBlockRecord * | block_record | ) |
Test if this DXF BLOCK_RECORD
is internally referenced by an entity.
TRUE
when BLOCK_RECORD
is internally referenced by an entity, or FALSE
when BLOCK_RECORD
is not internally referenced by an entity, or (-1) when an error occured. block_record | DXF BLOCK_RECORD symbol table entry. |
Definition at line 755 of file block_record.c.
References _, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_record_struct::flag.
char* dxf_block_record_get_dictionary_owner_soft | ( | DxfBlockRecord * | block_record | ) |
Get the soft pointer to the dictionary owner from a DXF BLOCK_RECORD
symbol table entry.
block_record | a pointer to a DXF BLOCK_RECORD symbol table entry. |
Definition at line 788 of file block_record.c.
References _, dxf_block_record_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_block_record_write().
DxfBlockRecord* dxf_block_record_set_dictionary_owner_soft | ( | DxfBlockRecord * | block_record, |
char * | dictionary_owner_soft | ||
) |
Set the pointer to the dictionary_owner_soft for a DXF BLOCK_RECORD
symbol table entry.
block_record | a pointer to a DXF BLOCK_RECORD symbol table entry. |
dictionary_owner_soft | a string containing the pointer to the dictionary_owner_soft for the entity. |
Definition at line 825 of file block_record.c.
References _, dxf_block_record_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_block_record_init().
char* dxf_block_record_get_dictionary_owner_hard | ( | DxfBlockRecord * | block_record | ) |
Get the hard pointer to the dictionary owner from a DXF BLOCK_RECORD
symbol table entry.
block_record | a pointer to a DXF BLOCK_RECORD symbol table entry. |
Definition at line 870 of file block_record.c.
References _, dxf_block_record_struct::dictionary_owner_hard, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_block_record_write().
DxfBlockRecord* dxf_block_record_set_dictionary_owner_hard | ( | DxfBlockRecord * | block_record, |
char * | dictionary_owner_hard | ||
) |
Set the pointer to the dictionary_owner_hard for a DXF BLOCK_RECORD
symbol table entry.
block_record | a pointer to a DXF BLOCK_RECORD symbol table entry. |
dictionary_owner_hard | a string containing the pointer to the dictionary_owner_hard for the symbol table entry. |
Definition at line 907 of file block_record.c.
References _, dxf_block_record_struct::dictionary_owner_hard, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_block_record_init().
DxfBlockRecord* dxf_block_record_get_next | ( | DxfBlockRecord * | block_record | ) |
Get the pointer to the next BLOCK_RECORD
symbol table entry from a DXF BLOCK_RECORD
symbol table entry.
BLOCK_RECORD
symbol table entry.block_record | a pointer to a DXF BLOCK_RECORD symbol table entry. |
Definition at line 952 of file block_record.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_record_struct::next.
DxfBlockRecord* dxf_block_record_set_next | ( | DxfBlockRecord * | block_record, |
DxfBlockRecord * | next | ||
) |
Set the pointer to the next BLOCK_RECORD
symbol table entry for a DXF BLOCK_RECORD
symbol table entry.
block_record | a pointer to a DXF BLOCK_RECORD symbol table entry. |
next | a pointer to the next BLOCK_RECORD symbol table entry for the symbol table entry. |
Definition at line 989 of file block_record.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_record_struct::next.
Referenced by dxf_block_record_init().
DxfBlockRecord* dxf_block_record_get_last | ( | DxfBlockRecord * | block_record | ) |
Get the pointer to the last BLOCK_RECORD
symbol table entry from a linked list of DXF BLOCK_RECORD
symbol table entries.
BLOCK_RECORD
symbol table entry.block_record | a pointer to a DXF BLOCK_RECORD symbol table entry. |
Definition at line 1033 of file block_record.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_block_record_struct::next.