libDXF 0.0.1
A library with DXF related functions written in C.
|
Header file for a DXF object_ptr object (OBJECT_PTR
).
More...
#include "global.h"
Go to the source code of this file.
Data Structures | |
struct | dxf_object_ptr_struct |
DXF definition of an AutoCAD object_ptr object (OBJECT_PTR ). More... | |
Typedefs | |
typedef struct dxf_object_ptr_struct | DxfObjectPtr |
DXF definition of an AutoCAD object_ptr object (OBJECT_PTR ). | |
Functions | |
DxfObjectPtr * | dxf_object_ptr_new () |
Allocate memory for a DxfObjectPtr . | |
DxfObjectPtr * | dxf_object_ptr_init (DxfObjectPtr *object_ptr) |
Allocate memory and initialize data fields in a OBJECT_PTR object. | |
DxfObjectPtr * | dxf_object_ptr_read (DxfFile *fp, DxfObjectPtr *object_ptr) |
Read data from a DXF file into a DXF OBJECT_PTR object. | |
int | dxf_object_ptr_write (DxfFile *fp, DxfObjectPtr *object_ptr) |
Write DXF output to a file for a DXF OBJECT_PTR object. | |
int | dxf_object_ptr_free (DxfObjectPtr *object_ptr) |
Free the allocated memory for a DXF OBJECT_PTR and all it's data fields. | |
void | dxf_object_ptr_free_chain (DxfObjectPtr *objectptrs) |
Free the allocated memory for a chain of DXF OBJECT_PTR objects and all their data fields. | |
int | dxf_object_ptr_get_id_code (DxfObjectPtr *object_ptr) |
Get the id_code from a DXF OBJECT_PTR object. | |
DxfObjectPtr * | dxf_object_ptr_set_id_code (DxfObjectPtr *object_ptr, int id_code) |
Set the id_code for a DXF OBJECT_PTR object. | |
char * | dxf_object_ptr_get_dictionary_owner_soft (DxfObjectPtr *object_ptr) |
Get the pointer to the dictionary_owner_soft from a DXF OBJECT_PTR object. | |
DxfObjectPtr * | dxf_object_ptr_set_dictionary_owner_soft (DxfObjectPtr *object_ptr, char *dictionary_owner_soft) |
Set the pointer to the dictionary_owner_soft for a DXF OBJECT_PTR object. | |
char * | dxf_object_ptr_get_dictionary_owner_hard (DxfObjectPtr *object_ptr) |
Get the hard pointer to the dictionary owner from a DXF OBJECT_PTR object. | |
DxfObjectPtr * | dxf_object_ptr_set_dictionary_owner_hard (DxfObjectPtr *object_ptr, char *dictionary_owner_hard) |
Set the pointer to the dictionary_owner_hard for a DXF OBJECT_PTR object. | |
DxfObjectPtr * | dxf_object_ptr_get_next (DxfObjectPtr *object_ptr) |
Get the pointer to the next OBJECT_PTR object from a DXF OBJECT_PTR object. | |
DxfObjectPtr * | dxf_object_ptr_set_next (DxfObjectPtr *object_ptr, DxfObjectPtr *next) |
Set the pointer to the next OBJECT_PTR object for a DXF OBJECT_PTR object. | |
DxfObjectPtr * | dxf_object_ptr_get_last (DxfObjectPtr *object_ptr) |
Get the pointer to the last OBJECT_PTR object from a linked list of DXF OBJECT_PTR objects. |
Header file for a DXF object_ptr object (OBJECT_PTR
).
OBJECT_PTR
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 object_ptr.h.
typedef struct dxf_object_ptr_struct DxfObjectPtr |
DXF definition of an AutoCAD object_ptr object (OBJECT_PTR
).
DxfObjectPtr* dxf_object_ptr_new | ( | ) |
Allocate memory for a DxfObjectPtr
.
Fill the memory contents with zeros.
Definition at line 52 of file object_ptr.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_object_ptr_init(), and dxf_object_ptr_read().
DxfObjectPtr* dxf_object_ptr_init | ( | DxfObjectPtr * | object_ptr | ) |
Allocate memory and initialize data fields in a OBJECT_PTR
object.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful. object_ptr | a pointer to the DXF OBJECT_PTR object. |
Definition at line 90 of file object_ptr.c.
References _, dxf_object_ptr_struct::dictionary_owner_hard, dxf_object_ptr_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_object_ptr_new(), dxf_object_ptr_struct::id_code, dxf_char_struct::length, dxf_object_ptr_struct::next, dxf_char_struct::next, dxf_char_struct::value, and dxf_object_ptr_struct::xdata.
Referenced by dxf_object_ptr_read().
DxfObjectPtr* dxf_object_ptr_read | ( | DxfFile * | fp, |
DxfObjectPtr * | object_ptr | ||
) |
Read data from a DXF file into a DXF OBJECT_PTR
object.
The last line read from file contained the string "OBJECT_PTR".
Now follows some data for the OBJECT_PTR
, to be terminated with a " 0" string announcing the following entity, or the end of the ENTITY
section marker ENDSEC
.
While parsing the DXF file store data in object_ptr
.
object_ptr
. fp | DXF file pointer to an input file (or device). |
object_ptr | a pointer to the DXF OBJECT_PTR object. |
Definition at line 140 of file object_ptr.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_14, dxf_object_ptr_struct::dictionary_owner_hard, dxf_object_ptr_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_object_ptr_init(), dxf_object_ptr_new(), dxf_file_struct::filename, dxf_file_struct::fp, dxf_object_ptr_struct::id_code, dxf_char_struct::length, dxf_file_struct::line_number, dxf_char_struct::value, and dxf_object_ptr_struct::xdata.
int dxf_object_ptr_write | ( | DxfFile * | fp, |
DxfObjectPtr * | object_ptr | ||
) |
Write DXF output to a file for a DXF OBJECT_PTR
object.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred. fp | DXF file pointer to an output file (or device). |
object_ptr | a pointer to the DXF OBJECT_PTR object. |
Definition at line 251 of file object_ptr.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_14, dxf_object_ptr_struct::dictionary_owner_hard, dxf_object_ptr_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_file_struct::fp, dxf_object_ptr_struct::id_code, dxf_char_struct::value, and dxf_object_ptr_struct::xdata.
int dxf_object_ptr_free | ( | DxfObjectPtr * | object_ptr | ) |
Free the allocated memory for a DXF OBJECT_PTR
and all it's data fields.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred. object_ptr | a pointer to the memory occupied by the DXF OBJECT_PTR object. |
Definition at line 341 of file object_ptr.c.
References _, dxf_object_ptr_struct::dictionary_owner_hard, dxf_object_ptr_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_char_struct::next, dxf_object_ptr_struct::next, dxf_char_struct::value, and dxf_object_ptr_struct::xdata.
Referenced by dxf_object_ptr_free_chain().
void dxf_object_ptr_free_chain | ( | DxfObjectPtr * | objectptrs | ) |
Free the allocated memory for a chain of DXF OBJECT_PTR
objects and all their data fields.
objectptrs | a pointer to the chain of DXF OBJECT_PTR objects. |
Definition at line 396 of file object_ptr.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_object_ptr_free(), and dxf_object_ptr_struct::next.
int dxf_object_ptr_get_id_code | ( | DxfObjectPtr * | object_ptr | ) |
Get the id_code
from a DXF OBJECT_PTR
object.
id_code
. object_ptr | a pointer to a DXF OBJECT_PTR object. |
Definition at line 429 of file object_ptr.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_object_ptr_struct::id_code.
DxfObjectPtr* dxf_object_ptr_set_id_code | ( | DxfObjectPtr * | object_ptr, |
int | id_code | ||
) |
Set the id_code
for a DXF OBJECT_PTR
object.
object_ptr | a pointer to a DXF OBJECT_PTR object. |
id_code | Identification number for the object. This is to be an unique (sequential) number in the DXF file. |
Definition at line 464 of file object_ptr.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_object_ptr_struct::id_code.
char* dxf_object_ptr_get_dictionary_owner_soft | ( | DxfObjectPtr * | object_ptr | ) |
Get the pointer to the dictionary_owner_soft
from a DXF OBJECT_PTR
object.
dictionary_owner_soft
.object_ptr | a pointer to a DXF OBJECT_PTR object. |
Definition at line 509 of file object_ptr.c.
References _, dxf_object_ptr_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
DxfObjectPtr* dxf_object_ptr_set_dictionary_owner_soft | ( | DxfObjectPtr * | object_ptr, |
char * | dictionary_owner_soft | ||
) |
Set the pointer to the dictionary_owner_soft
for a DXF OBJECT_PTR
object.
object_ptr | a pointer to a DXF OBJECT_PTR object. |
dictionary_owner_soft | a string containing the pointer to the dictionary_owner_soft for the object. |
Definition at line 545 of file object_ptr.c.
References _, dxf_object_ptr_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
char* dxf_object_ptr_get_dictionary_owner_hard | ( | DxfObjectPtr * | object_ptr | ) |
Get the hard pointer to the dictionary owner from a DXF OBJECT_PTR
object.
object_ptr | a pointer to a DXF OBJECT_PTR object. |
Definition at line 589 of file object_ptr.c.
References _, dxf_object_ptr_struct::dictionary_owner_hard, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
DxfObjectPtr* dxf_object_ptr_set_dictionary_owner_hard | ( | DxfObjectPtr * | object_ptr, |
char * | dictionary_owner_hard | ||
) |
Set the pointer to the dictionary_owner_hard for a DXF OBJECT_PTR
object.
object_ptr | a pointer to a DXF OBJECT_PTR object. |
dictionary_owner_hard | a string containing the pointer to the dictionary_owner_hard for the object. |
Definition at line 625 of file object_ptr.c.
References _, dxf_object_ptr_struct::dictionary_owner_hard, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
DxfObjectPtr* dxf_object_ptr_get_next | ( | DxfObjectPtr * | object_ptr | ) |
Get the pointer to the next OBJECT_PTR
object from a DXF OBJECT_PTR
object.
OBJECT_PTR
object.object_ptr | a pointer to a DXF OBJECT_PTR object. |
Definition at line 669 of file object_ptr.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_object_ptr_struct::next.
DxfObjectPtr* dxf_object_ptr_set_next | ( | DxfObjectPtr * | object_ptr, |
DxfObjectPtr * | next | ||
) |
Set the pointer to the next OBJECT_PTR
object for a DXF OBJECT_PTR
object.
object_ptr | a pointer to a DXF OBJECT_PTR object. |
next | a pointer to the next OBJECT_PTR object for the object. |
Definition at line 705 of file object_ptr.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_object_ptr_struct::next.
DxfObjectPtr* dxf_object_ptr_get_last | ( | DxfObjectPtr * | object_ptr | ) |
Get the pointer to the last OBJECT_PTR
object from a linked list of DXF OBJECT_PTR
objects.
OBJECT_PTR
object.object_ptr | a pointer to a DXF OBJECT_PTR object. |
Definition at line 749 of file object_ptr.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_object_ptr_struct::next.