libDXF 0.0.1
A library with DXF related functions written in C.
|
Header file for a DXF application identity symbol table entry (APPID
).
More...
#include "global.h"
Go to the source code of this file.
Data Structures | |
struct | dxf_appid_struct |
DXF Definition of an AutoCAD application identification (APPID ). More... | |
Typedefs | |
typedef struct dxf_appid_struct | DxfAppid |
DXF Definition of an AutoCAD application identification (APPID ). | |
Functions | |
DxfAppid * | dxf_appid_new () |
Allocate memory for a DXF APPID symbol table entry. | |
DxfAppid * | dxf_appid_init (DxfAppid *appid) |
Allocate memory and initialize data fields in a DXF APPID symbol table entry. | |
DxfAppid * | dxf_appid_read (DxfFile *fp, DxfAppid *appid) |
Read data from a DXF file into a DXF APPID symbol table entry. | |
int | dxf_appid_write (DxfFile *fp, DxfAppid *appid) |
Write DXF output to a file for a DXF APPID symbol table entry. | |
int | dxf_appid_free (DxfAppid *appid) |
Free the allocated memory for a DXF APPID and all it's data fields. | |
void | dxf_appid_free_chain (DxfAppid *appids) |
Free the allocated memory for a chain of DXF APPID symbol table entries and all their data fields. | |
int | dxf_appid_get_id_code (DxfAppid *appid) |
Get the ID code from this DXF APPID symbol table entry. | |
DxfAppid * | dxf_appid_set_id_code (DxfAppid *appid, int id_code) |
Set the ID code for this DXF APPID symbol table entry. | |
char * | dxf_appid_get_application_name (DxfAppid *appid) |
Get the application name from this DXF APPID symbol table entry. | |
DxfAppid * | dxf_appid_set_application_name (DxfAppid *appid, char *name) |
Set the application name for this DXF APPID symbol table entry. | |
int | dxf_appid_get_flag (DxfAppid *appid) |
Get the flag value from this DXF APPID symbol table entry. | |
DxfAppid * | dxf_appid_set_flag (DxfAppid *appid, int flag) |
Set the flag for this DXF APPID symbol table entry. | |
int | dxf_appid_is_xreferenced (DxfAppid *appid) |
Test if this DXF APPID is externally dependent on an xref. | |
int | dxf_appid_is_xresolved (DxfAppid *appid) |
Test if this DXF APPID is externally dependent on a xref and has been successfully resolved. | |
int | dxf_appid_is_referenced (DxfAppid *appid) |
Test if this DXF APPID is internally referenced by an entity. | |
int | dxf_appid_is_no_save_xdata (DxfAppid *appid) |
Test if xdata associated with this DXF APPID is not to be written when SAVEASR12 is performed. | |
char * | dxf_appid_get_dictionary_owner_soft (DxfAppid *appid) |
Get the soft pointer to the dictionary owner from this DXF APPID symbol table entry. | |
DxfAppid * | dxf_appid_set_dictionary_owner_soft (DxfAppid *appid, char *dictionary_owner_soft) |
Set the pointer to the dictionary_owner_soft for a DXF APPID entity. | |
char * | dxf_appid_get_dictionary_owner_hard (DxfAppid *appid) |
Get the hard pointer to the dictionary owner from this DXF APPID symbol table entry. | |
DxfAppid * | dxf_appid_set_dictionary_owner_hard (DxfAppid *appid, char *dictionary_owner_hard) |
Set the pointer to the dictionary_owner_hard for a DXF APPID entity. | |
DxfAppid * | dxf_appid_get_next (DxfAppid *appid) |
Get the pointer to the next APPID entity from a DXF APPID entity. | |
DxfAppid * | dxf_appid_set_next (DxfAppid *appid, DxfAppid *next) |
Set the pointer to the next APPID for a DXF APPID entity. | |
DxfAppid * | dxf_appid_get_last (DxfAppid *appid) |
Get the pointer to the last APPID entity from a linked list of DXF APPID entities. |
Header file for a DXF application identity symbol table entry (APPID
).
APPID
table was introduced in DXF R12.A DXF APPID
entity contains data concerning the application registered with the drawing involved.
It is a table entry in the TABLES
section of the DXF file. These table entries maintain a set of names for all applications registered with a drawing.
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 appid.h.
typedef struct dxf_appid_struct DxfAppid |
DXF Definition of an AutoCAD application identification (APPID
).
This table entry contains a name for an application registered with a drawing.
DxfAppid* dxf_appid_new | ( | ) |
Allocate memory for a DXF APPID
symbol table entry.
Fill the memory contents with zeros.
Definition at line 68 of file appid.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_appid_init(), and dxf_appid_read().
Allocate memory and initialize data fields in a DXF APPID
symbol table entry.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful. appid | a pointer to a DXF APPID symbol table entry. |
Definition at line 106 of file appid.c.
References _, dxf_appid_new(), dxf_appid_set_application_name(), dxf_appid_set_dictionary_owner_hard(), dxf_appid_set_dictionary_owner_soft(), dxf_appid_set_flag(), dxf_appid_set_id_code(), dxf_appid_set_next(), DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_appid_read().
Read data from a DXF file into a DXF APPID
symbol table entry.
The last line read from file contained the string "APPID".
Now follows some data for the APPID
, 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 appid
.
appid
. fp | a DXF file pointer to an input file (or device). |
appid | a pointer to a DXF APPID symbol table entry. |
Definition at line 156 of file appid.c.
References _, dxf_appid_struct::application_name, dxf_appid_struct::dictionary_owner_hard, dxf_appid_struct::dictionary_owner_soft, dxf_appid_init(), dxf_appid_new(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_file_struct::filename, dxf_appid_struct::flag, dxf_file_struct::fp, dxf_appid_struct::id_code, and dxf_file_struct::line_number.
Write DXF output to a file for a DXF APPID
symbol table entry.
fp | a DXF file pointer to an output file (or device). |
appid | a pointer to a DXF APPID symbol table entry. |
Definition at line 264 of file appid.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_12, AutoCAD_13, AutoCAD_14, dxf_appid_get_application_name(), dxf_appid_get_dictionary_owner_hard(), dxf_appid_get_dictionary_owner_soft(), dxf_appid_get_flag(), dxf_appid_get_id_code(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_file_struct::fp.
int dxf_appid_free | ( | DxfAppid * | appid | ) |
Free the allocated memory for a DXF APPID
and all it's data fields.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred. appid | a pointer to a DXF APPID symbol table entry. |
Definition at line 369 of file appid.c.
References _, dxf_appid_struct::application_name, dxf_appid_struct::dictionary_owner_hard, dxf_appid_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_appid_struct::next.
Referenced by dxf_appid_free_chain().
void dxf_appid_free_chain | ( | DxfAppid * | appids | ) |
Free the allocated memory for a chain of DXF APPID
symbol table entries and all their data fields.
appids | a pointer to a chain of DXF APPID symbol table entries. |
Definition at line 409 of file appid.c.
References _, dxf_appid_free(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_appid_struct::next.
int dxf_appid_get_id_code | ( | DxfAppid * | appid | ) |
Get the ID code from this DXF APPID
symbol table entry.
appid | a pointer to a DXF APPID symbol table entry. |
Definition at line 443 of file appid.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_appid_struct::id_code.
Referenced by dxf_appid_write().
Set the ID code for this DXF APPID
symbol table entry.
appid | a pointer to a DXF APPID 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 471 of file appid.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_appid_struct::id_code.
Referenced by dxf_appid_init().
char* dxf_appid_get_application_name | ( | DxfAppid * | appid | ) |
Get the application name from this DXF APPID
symbol table entry.
appid | a pointer to a DXF APPID symbol table entry. |
Definition at line 507 of file appid.c.
References _, dxf_appid_struct::application_name, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_appid_write().
Set the application name for this DXF APPID
symbol table entry.
APPID
symbol table entry if successful, a NULL
when an error occurred.application_name
member of the DxfAppid
struct is performed.name
variable is not freed by this function and needs to be freed by the caller. appid | a pointer to a DXF APPID symbol table entry. |
name | application name. |
Definition at line 545 of file appid.c.
References _, dxf_appid_struct::application_name, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_appid_init().
int dxf_appid_get_flag | ( | DxfAppid * | appid | ) |
Get the flag value from this DXF APPID
symbol table entry.
appid | a pointer to a DXF APPID symbol table entry. |
Definition at line 585 of file appid.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_appid_struct::flag.
Referenced by dxf_appid_write().
Set the flag for this DXF APPID
symbol table entry.
appid | a pointer to a DXF APPID symbol table entry. |
flag | the flag value to be set. |
Definition at line 613 of file appid.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_appid_struct::flag.
Referenced by dxf_appid_init().
int dxf_appid_is_xreferenced | ( | DxfAppid * | appid | ) |
Test if this DXF APPID
is externally dependent on an xref.
TRUE
when APPID
is externally dependent on an xref, or FALSE
when APPID
is not externally dependent on an xref. appid | a pointer to a DXF APPID symbol table entry. |
Definition at line 679 of file appid.c.
References _, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_appid_struct::flag.
int dxf_appid_is_xresolved | ( | DxfAppid * | appid | ) |
Test if this DXF APPID
is externally dependent on a xref and has been successfully resolved.
TRUE
when APPID
is externally dependent on a xref and has been successfully resolved, or FALSE
when APPID
is not externally dependent on a xref and has not been successfully resolved. appid | a pointer to a DXF APPID symbol table entry. |
Definition at line 712 of file appid.c.
References _, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_appid_struct::flag.
int dxf_appid_is_referenced | ( | DxfAppid * | appid | ) |
Test if this DXF APPID
is internally referenced by an entity.
TRUE
when APPID
is internally referenced by an entity, or FALSE
when APPID
is not internally referenced by an entity. appid | a pointer to a DXF APPID symbol table entry. |
Definition at line 745 of file appid.c.
References _, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_appid_struct::flag.
int dxf_appid_is_no_save_xdata | ( | DxfAppid * | appid | ) |
Test if xdata associated with this DXF APPID
is not to be written when SAVEASR12
is performed.
TRUE
when not to be written, or FALSE
when to be written. appid | a pointer to a DXF APPID symbol table entry. |
Definition at line 648 of file appid.c.
References _, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_appid_struct::flag.
char* dxf_appid_get_dictionary_owner_soft | ( | DxfAppid * | appid | ) |
Get the soft pointer to the dictionary owner from this DXF APPID
symbol table entry.
appid | a pointer to a DXF APPID symbol table entry. |
Definition at line 778 of file appid.c.
References _, dxf_appid_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_appid_write().
Set the pointer to the dictionary_owner_soft for a DXF APPID
entity.
appid | a pointer to a DXF APPID entity. |
dictionary_owner_soft | a string containing the pointer to the dictionary_owner_soft for the entity. |
Definition at line 814 of file appid.c.
References _, dxf_appid_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_appid_init().
char* dxf_appid_get_dictionary_owner_hard | ( | DxfAppid * | appid | ) |
Get the hard pointer to the dictionary owner from this DXF APPID
symbol table entry.
appid | a pointer to a DXF APPID symbol table entry. |
Definition at line 858 of file appid.c.
References _, dxf_appid_struct::dictionary_owner_hard, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_appid_write().
Set the pointer to the dictionary_owner_hard for a DXF APPID
entity.
appid | a pointer to a DXF APPID entity. |
dictionary_owner_hard | a string containing the pointer to the dictionary_owner_hard for the entity. |
Definition at line 894 of file appid.c.
References _, dxf_appid_struct::dictionary_owner_hard, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_appid_init().
Get the pointer to the next APPID
entity from a DXF APPID
entity.
APPID
entity.appid | a pointer to a DXF APPID entity. |
Definition at line 938 of file appid.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_appid_struct::next.
Set the pointer to the next APPID
for a DXF APPID
entity.
appid | a pointer to a DXF APPID entity. |
next | a pointer to the next APPID for the entity. |
Definition at line 974 of file appid.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_appid_struct::next.
Referenced by dxf_appid_init().
Get the pointer to the last APPID
entity from a linked list of DXF APPID
entities.
APPID
entity.appid | a pointer to a DXF APPID entity. |
Definition at line 1017 of file appid.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_appid_struct::next.