libDXF 0.0.1
A library with DXF related functions written in C.
|
Header file for a DXF dictionaryvar object (DICTIONARYVAR
).
More...
#include "global.h"
Go to the source code of this file.
Data Structures | |
struct | dxf_dictionaryvar_struct |
DXF definition of an AutoCAD dictionaryvar object (DICTIONARYVAR ). More... | |
Typedefs | |
typedef struct dxf_dictionaryvar_struct | DxfDictionaryVar |
DXF definition of an AutoCAD dictionaryvar object (DICTIONARYVAR ). | |
Functions | |
DxfDictionaryVar * | dxf_dictionaryvar_new () |
Allocate memory for a DXF DICTIONARYVAR object. | |
DxfDictionaryVar * | dxf_dictionaryvar_init (DxfDictionaryVar *dictionaryvar) |
Allocate memory and initialize data fields in a DICTIONARYVAR object. | |
DxfDictionaryVar * | dxf_dictionaryvar_read (DxfFile *fp, DxfDictionaryVar *dictionaryvar) |
Read data from a DXF file into a DXF DICTIONARYVAR object. | |
int | dxf_dictionaryvar_write (DxfFile *fp, DxfDictionaryVar *dictionaryvar) |
Write DXF output to a file for a DXF DICTIONARYVAR object. | |
int | dxf_dictionaryvar_free (DxfDictionaryVar *dictionaryvar) |
Free the allocated memory for a DXF DICTIONARYVAR and all it's data fields. | |
void | dxf_dictionaryvar_free_chain (DxfDictionaryVar *dictionaryvars) |
Free the allocated memory for a chain of DXF DICTIONARYVAR objects and all their data fields. | |
int | dxf_dictionaryvar_get_id_code (DxfDictionaryVar *dictionaryvar) |
Get the ID code from a DXF DICTIONARYVAR object. | |
DxfDictionaryVar * | dxf_dictionaryvar_set_id_code (DxfDictionaryVar *dictionaryvar, int id_code) |
Set the ID code for a DXF DICTIONARYVAR object. | |
char * | dxf_dictionaryvar_get_dictionary_owner_soft (DxfDictionaryVar *dictionaryvar) |
Get the soft pointer to the dictionary owner from a DXF DICTIONARYVAR object. | |
DxfDictionaryVar * | dxf_dictionaryvar_set_dictionary_owner_soft (DxfDictionaryVar *dictionaryvar, char *dictionary_owner_soft) |
Set the pointer to the dictionary_owner_soft for a DXF DICTIONARYVAR object. | |
char * | dxf_dictionaryvar_get_dictionary_owner_hard (DxfDictionaryVar *dictionaryvar) |
Get the hard pointer to the dictionary owner from a DXF DICTIONARYVAR object. | |
DxfDictionaryVar * | dxf_dictionaryvar_set_dictionary_owner_hard (DxfDictionaryVar *dictionaryvar, char *dictionary_owner_hard) |
Set the pointer to the dictionary_owner_hard for a DXF DICTIONARYVAR object. | |
char * | dxf_dictionaryvar_get_value (DxfDictionaryVar *dictionaryvar) |
Get the value from a DXF DICTIONARYVAR object. | |
DxfDictionaryVar * | dxf_dictionaryvar_set_value (DxfDictionaryVar *dictionaryvar, char *value) |
Set the entry name for a DXF DICTIONARYVAR object. | |
char * | dxf_dictionaryvar_get_object_schema_number (DxfDictionaryVar *dictionaryvar) |
Get the object schema number from a DXF DICTIONARYVAR object. | |
DxfDictionaryVar * | dxf_dictionaryvar_set_object_schema_number (DxfDictionaryVar *dictionaryvar, char *object_schema_number) |
Set the object schema number for a DXF DICTIONARYVAR object. | |
DxfDictionaryVar * | dxf_dictionaryvar_get_next (DxfDictionaryVar *dictionaryvar) |
Get the pointer to the next DICTIONARYVAR object from a DXF DICTIONARYVAR object. | |
DxfDictionaryVar * | dxf_dictionaryvar_set_next (DxfDictionaryVar *dictionaryvar, DxfDictionaryVar *next) |
Set the pointer to the next DICTIONARYVAR object for a DXF DICTIONARYVAR object. | |
DxfDictionaryVar * | dxf_dictionaryvar_get_last (DxfDictionaryVar *dictionaryvar) |
Get the pointer to the last DICTIONARYVAR object from a linked list of DXF DICTIONARYVAR objects. |
Header file for a DXF dictionaryvar object (DICTIONARYVAR
).
DICTIONARYVAR
object was introduced in DXF R14.
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 dictionaryvar.h.
typedef struct dxf_dictionaryvar_struct DxfDictionaryVar |
DXF definition of an AutoCAD dictionaryvar object (DICTIONARYVAR
).
DxfDictionaryVar* dxf_dictionaryvar_new | ( | ) |
Allocate memory for a DXF DICTIONARYVAR
object.
Fill the memory contents with zeros.
Definition at line 53 of file dictionaryvar.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_dictionaryvar_init(), and dxf_dictionaryvar_read().
DxfDictionaryVar* dxf_dictionaryvar_init | ( | DxfDictionaryVar * | dictionaryvar | ) |
Allocate memory and initialize data fields in a DICTIONARYVAR
object.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful. dictionaryvar | DXF DICTIONARYVAR object. |
Definition at line 91 of file dictionaryvar.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_dictionaryvar_new(), dxf_dictionaryvar_set_dictionary_owner_hard(), dxf_dictionaryvar_set_dictionary_owner_soft(), dxf_dictionaryvar_set_id_code(), dxf_dictionaryvar_set_next(), dxf_dictionaryvar_set_object_schema_number(), and dxf_dictionaryvar_set_value().
Referenced by dxf_dictionaryvar_read().
DxfDictionaryVar* dxf_dictionaryvar_read | ( | DxfFile * | fp, |
DxfDictionaryVar * | dictionaryvar | ||
) |
Read data from a DXF file into a DXF DICTIONARYVAR
object.
The last line read from file contained the string "DICTIONARYVAR".
Now follows some data for the DICTIONARYVAR
object, to be terminated with a " 0" string announcing the following object.
While parsing the DXF file store data in dictionaryvar
.
a
pointer to dictionaryvar
. fp | DXF file pointer to an input file (or device). |
dictionaryvar | DXF DICTIONARYVAR object. |
Definition at line 139 of file dictionaryvar.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_13, AutoCAD_14, dxf_dictionaryvar_struct::dictionary_owner_hard, dxf_dictionaryvar_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_dictionaryvar_init(), dxf_dictionaryvar_new(), dxf_file_struct::filename, dxf_file_struct::fp, dxf_dictionaryvar_struct::id_code, dxf_file_struct::line_number, dxf_dictionaryvar_struct::object_schema_number, and dxf_dictionaryvar_struct::value.
int dxf_dictionaryvar_write | ( | DxfFile * | fp, |
DxfDictionaryVar * | dictionaryvar | ||
) |
Write DXF output to a file for a DXF DICTIONARYVAR
object.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred. fp | DXF file pointer to an output file (or device). |
dictionaryvar | DXF DICTIONARYVAR object. |
Definition at line 269 of file dictionaryvar.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_13, AutoCAD_14, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_dictionaryvar_get_dictionary_owner_hard(), dxf_dictionaryvar_get_dictionary_owner_soft(), dxf_dictionaryvar_get_id_code(), dxf_dictionaryvar_get_object_schema_number(), dxf_dictionaryvar_get_value(), and dxf_file_struct::fp.
int dxf_dictionaryvar_free | ( | DxfDictionaryVar * | dictionaryvar | ) |
Free the allocated memory for a DXF DICTIONARYVAR
and all it's data fields.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred. dictionaryvar | Pointer to the memory occupied by the DXF DICTIONARYVAR object. |
Definition at line 372 of file dictionaryvar.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_dictionaryvar_get_dictionary_owner_hard(), dxf_dictionaryvar_get_dictionary_owner_soft(), dxf_dictionaryvar_get_next(), dxf_dictionaryvar_get_object_schema_number(), and dxf_dictionaryvar_get_value().
Referenced by dxf_dictionaryvar_free_chain().
void dxf_dictionaryvar_free_chain | ( | DxfDictionaryVar * | dictionaryvars | ) |
Free the allocated memory for a chain of DXF DICTIONARYVAR
objects and all their data fields.
dictionaryvars | pointer to the chain of DXF DICTIONARYVAR objects. |
Definition at line 415 of file dictionaryvar.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_dictionaryvar_free(), and dxf_dictionaryvar_struct::next.
int dxf_dictionaryvar_get_id_code | ( | DxfDictionaryVar * | dictionaryvar | ) |
Get the ID code from a DXF DICTIONARYVAR
object.
dictionaryvar | a pointer to a DXF DICTIONARYVAR object. |
Definition at line 448 of file dictionaryvar.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_dictionaryvar_struct::id_code.
Referenced by dxf_dictionaryvar_write().
DxfDictionaryVar* dxf_dictionaryvar_set_id_code | ( | DxfDictionaryVar * | dictionaryvar, |
int | id_code | ||
) |
Set the ID code for a DXF DICTIONARYVAR
object.
dictionaryvar | a pointer to a DXF DICTIONARYVAR object. |
id_code | Identification number for the object. This is to be an unique (sequential) number in the DXF file. |
Definition at line 483 of file dictionaryvar.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_dictionaryvar_struct::id_code.
Referenced by dxf_dictionaryvar_init().
char* dxf_dictionaryvar_get_dictionary_owner_soft | ( | DxfDictionaryVar * | dictionaryvar | ) |
Get the soft pointer to the dictionary owner from a DXF DICTIONARYVAR
object.
dictionaryvar | a pointer to a DXF DICTIONARYVAR object. |
Definition at line 528 of file dictionaryvar.c.
References _, dxf_dictionaryvar_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_dictionaryvar_free(), and dxf_dictionaryvar_write().
DxfDictionaryVar* dxf_dictionaryvar_set_dictionary_owner_soft | ( | DxfDictionaryVar * | dictionaryvar, |
char * | dictionary_owner_soft | ||
) |
Set the pointer to the dictionary_owner_soft for a DXF DICTIONARYVAR
object.
dictionaryvar | a pointer to a DXF DICTIONARYVAR object. |
dictionary_owner_soft | a string containing the pointer to the dictionary_owner_soft for the object. |
Definition at line 564 of file dictionaryvar.c.
References _, dxf_dictionaryvar_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_dictionaryvar_init().
char* dxf_dictionaryvar_get_dictionary_owner_hard | ( | DxfDictionaryVar * | dictionaryvar | ) |
Get the hard pointer to the dictionary owner from a DXF DICTIONARYVAR
object.
dictionaryvar | a pointer to a DXF DICTIONARYVAR object. |
Definition at line 608 of file dictionaryvar.c.
References _, dxf_dictionaryvar_struct::dictionary_owner_hard, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_dictionaryvar_free(), and dxf_dictionaryvar_write().
DxfDictionaryVar* dxf_dictionaryvar_set_dictionary_owner_hard | ( | DxfDictionaryVar * | dictionaryvar, |
char * | dictionary_owner_hard | ||
) |
Set the pointer to the dictionary_owner_hard for a DXF DICTIONARYVAR
object.
dictionaryvar | a pointer to a DXF DICTIONARYVAR object. |
dictionary_owner_hard | a string containing the pointer to the dictionary_owner_hard for the entity. |
Definition at line 644 of file dictionaryvar.c.
References _, dxf_dictionaryvar_struct::dictionary_owner_hard, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_dictionaryvar_init().
char* dxf_dictionaryvar_get_value | ( | DxfDictionaryVar * | dictionaryvar | ) |
Get the value from a DXF DICTIONARYVAR
object.
NULL
when an error occurred. dictionaryvar | a pointer to a DXF DICTIONARYVAR object. |
Definition at line 685 of file dictionaryvar.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_dictionaryvar_struct::value.
Referenced by dxf_dictionaryvar_free(), and dxf_dictionaryvar_write().
DxfDictionaryVar* dxf_dictionaryvar_set_value | ( | DxfDictionaryVar * | dictionaryvar, |
char * | value | ||
) |
Set the entry name for a DXF DICTIONARYVAR
object.
dictionaryvar | a pointer to a DXF DICTIONARYVAR object. |
value | a string containing the value for the object. |
Definition at line 720 of file dictionaryvar.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_dictionaryvar_struct::value.
Referenced by dxf_dictionaryvar_init().
char* dxf_dictionaryvar_get_object_schema_number | ( | DxfDictionaryVar * | dictionaryvar | ) |
Get the object schema number from a DXF DICTIONARYVAR
object.
NULL
when an error occurred. dictionaryvar | a pointer to a DXF DICTIONARYVAR object. |
Definition at line 762 of file dictionaryvar.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_dictionaryvar_struct::object_schema_number.
Referenced by dxf_dictionaryvar_free(), and dxf_dictionaryvar_write().
DxfDictionaryVar* dxf_dictionaryvar_set_object_schema_number | ( | DxfDictionaryVar * | dictionaryvar, |
char * | object_schema_number | ||
) |
Set the object schema number for a DXF DICTIONARYVAR
object.
dictionaryvar | a pointer to a DXF DICTIONARYVAR object. |
object_schema_number | a string containing the object schema number for the object. |
Definition at line 797 of file dictionaryvar.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_dictionaryvar_struct::object_schema_number.
Referenced by dxf_dictionaryvar_init().
DxfDictionaryVar* dxf_dictionaryvar_get_next | ( | DxfDictionaryVar * | dictionaryvar | ) |
Get the pointer to the next DICTIONARYVAR
object from a DXF DICTIONARYVAR
object.
DICTIONARYVAR
object.dictionaryvar | a pointer to a DXF DICTIONARYVAR object. |
Definition at line 841 of file dictionaryvar.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_dictionaryvar_struct::next.
Referenced by dxf_dictionaryvar_free().
DxfDictionaryVar* dxf_dictionaryvar_set_next | ( | DxfDictionaryVar * | dictionaryvar, |
DxfDictionaryVar * | next | ||
) |
Set the pointer to the next DICTIONARYVAR
object for a DXF DICTIONARYVAR
object.
dictionaryvar | a pointer to a DXF DICTIONARYVAR object. |
next | a pointer to the next DICTIONARYVAR object for the object. |
Definition at line 877 of file dictionaryvar.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_dictionaryvar_struct::next.
Referenced by dxf_dictionaryvar_init().
DxfDictionaryVar* dxf_dictionaryvar_get_last | ( | DxfDictionaryVar * | dictionaryvar | ) |
Get the pointer to the last DICTIONARYVAR
object from a linked list of DXF DICTIONARYVAR
objects.
DICTIONARYVAR
object.dictionaryvar | a pointer to a DXF DICTIONARYVAR object. |
Definition at line 921 of file dictionaryvar.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_dictionaryvar_struct::next.