libDXF 0.0.1
A library with DXF related functions written in C.
|
Header file for a DXF imagedef_reactor object (IMAGEDEF_REACTOR
).
More...
#include "global.h"
Go to the source code of this file.
Data Structures | |
struct | dxf_imagedef_reactor_struct |
DXF definition of an AutoCAD imagedef_reactor object (IMAGEDEF_REACTOR ). More... | |
Typedefs | |
typedef struct dxf_imagedef_reactor_struct | DxfImagedefReactor |
DXF definition of an AutoCAD imagedef_reactor object (IMAGEDEF_REACTOR ). | |
Functions | |
DxfImagedefReactor * | dxf_imagedef_reactor_new () |
Allocate memory for a DxfImagedefReactor . | |
DxfImagedefReactor * | dxf_imagedef_reactor_init (DxfImagedefReactor *imagedef_reactor) |
Allocate memory and initialize data fields in a IMAGEDEF_REACTOR object. | |
DxfImagedefReactor * | dxf_imagedef_reactor_read (DxfFile *fp, DxfImagedefReactor *imagedef_reactor) |
Read data from a DXF file into a DXF IMAGEDEF_REACTOR object. | |
int | dxf_imagedef_reactor_write (DxfFile *fp, DxfImagedefReactor *imagedef_reactor) |
Write DXF output to a file for a DXF IMAGEDEF_REACTOR object. | |
int | dxf_imagedef_reactor_free (DxfImagedefReactor *imagedef_reactor) |
Free the allocated memory for a DXF IMAGEDEF_REACTOR and all it's data fields. | |
void | dxf_imagedef_reactor_free_chain (DxfImagedefReactor *imagedef_reactors) |
Free the allocated memory for a chain of DXF IMAGEDEF_REACTOR objects and all their data fields. | |
int | dxf_imagedef_reactor_get_id_code (DxfImagedefReactor *imagedef_reactor) |
Get the id_code from a DXF IMAGEDEF_REACTOR object. | |
DxfImagedefReactor * | dxf_imagedef_reactor_set_id_code (DxfImagedefReactor *imagedef_reactor, int id_code) |
Set the id_code for a DXF IMAGEDEF_REACTOR object. | |
char * | dxf_imagedef_reactor_get_dictionary_owner_soft (DxfImagedefReactor *imagedef_reactor) |
Get the pointer to the dictionary_owner_soft from a DXF IMAGEDEF_REACTOR object. | |
DxfImagedefReactor * | dxf_imagedef_reactor_set_dictionary_owner_soft (DxfImagedefReactor *imagedef_reactor, char *dictionary_owner_soft) |
Set the pointer to the dictionary_owner_soft for a DXF IMAGEDEF_REACTOR object. | |
char * | dxf_imagedef_reactor_get_dictionary_owner_hard (DxfImagedefReactor *imagedef_reactor) |
Get the pointer to the dictionary_owner_hard from a DXF IMAGEDEF_REACTOR object. | |
DxfImagedefReactor * | dxf_imagedef_reactor_set_dictionary_owner_hard (DxfImagedefReactor *imagedef_reactor, char *dictionary_owner_hard) |
Set the pointer to the dictionary_owner_hard for a DXF IMAGEDEF_REACTOR object. | |
int32_t | dxf_imagedef_reactor_get_class_version (DxfImagedefReactor *imagedef_reactor) |
Get the class_version from a DXF IMAGEDEF_REACTOR object. | |
DxfImagedefReactor * | dxf_imagedef_reactor_set_class_version (DxfImagedefReactor *imagedef_reactor, int32_t class_version) |
Set the class_version for a DXF IMAGEDEF_REACTOR object. | |
char * | dxf_imagedef_reactor_get_associated_image_object (DxfImagedefReactor *imagedef_reactor) |
Get the pointer to the associated_image_object from a DXF IMAGEDEF_REACTOR object. | |
DxfImagedefReactor * | dxf_imagedef_reactor_set_associated_image_object (DxfImagedefReactor *imagedef_reactor, char *associated_image_object) |
Set the pointer to the associated_image_object for a DXF IMAGEDEF_REACTOR object. | |
int | dxf_imagedef_reactor_get_associated_image_object_length (DxfImagedefReactor *imagedef_reactor) |
Get the associated_image_object_length from a DXF IMAGEDEF_REACTOR object. | |
DxfImagedefReactor * | dxf_imagedef_reactor_set_associated_image_object_length (DxfImagedefReactor *imagedef_reactor, int associated_image_object_length) |
Set the associated_image_object_length for a DXF IMAGEDEF_REACTOR object. | |
DxfImagedefReactor * | dxf_imagedef_reactor_get_next (DxfImagedefReactor *imagedef_reactor) |
Get the pointer to the next IMAGEDEF_REACTOR object from a DXF IMAGEDEF_REACTOR object. | |
DxfImagedefReactor * | dxf_imagedef_reactor_set_next (DxfImagedefReactor *imagedef_reactor, DxfImagedefReactor *next) |
Set the pointer to the next IMAGEDEF_REACTOR for a DXF IMAGEDEF_REACTOR object. | |
DxfImagedefReactor * | dxf_imagedef_reactor_get_last (DxfImagedefReactor *imagedef_reactor) |
Get the pointer to the last IMAGEDEF_REACTOR object from a linked list of DXF IMAGEDEF_REACTOR objects. |
Header file for a DXF imagedef_reactor object (IMAGEDEF_REACTOR
).
IMAGEDEF_REACTOR
object was introduced in DXF R14.IMAGEDEF_REACTOR
object requires AutoCAD version R14 or higher.
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 imagedef_reactor.h.
typedef struct dxf_imagedef_reactor_struct DxfImagedefReactor |
DXF definition of an AutoCAD imagedef_reactor object (IMAGEDEF_REACTOR
).
DxfImagedefReactor* dxf_imagedef_reactor_new | ( | ) |
Allocate memory for a DxfImagedefReactor
.
Fill the memory contents with zeros.
Definition at line 55 of file imagedef_reactor.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_imagedef_struct::imagedef_reactor.
Referenced by dxf_imagedef_init(), dxf_imagedef_reactor_init(), and dxf_imagedef_reactor_read().
DxfImagedefReactor* dxf_imagedef_reactor_init | ( | DxfImagedefReactor * | imagedef_reactor | ) |
Allocate memory and initialize data fields in a IMAGEDEF_REACTOR
object.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful. imagedef_reactor | DXF IMAGEDEF_REACTOR object. |
Definition at line 93 of file imagedef_reactor.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_imagedef_reactor_new(), dxf_imagedef_reactor_set_associated_image_object(), dxf_imagedef_reactor_set_associated_image_object_length(), dxf_imagedef_reactor_set_class_version(), dxf_imagedef_reactor_set_dictionary_owner_hard(), dxf_imagedef_reactor_set_dictionary_owner_soft(), dxf_imagedef_reactor_set_id_code(), and dxf_imagedef_reactor_set_next().
Referenced by dxf_imagedef_init(), and dxf_imagedef_reactor_read().
DxfImagedefReactor* dxf_imagedef_reactor_read | ( | DxfFile * | fp, |
DxfImagedefReactor * | imagedef_reactor | ||
) |
Read data from a DXF file into a DXF IMAGEDEF_REACTOR
object.
The last line read from file contained the string "IMAGEDEF_REACTOR".
Now follows some data for the IMAGEDEF_REACTOR
, 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 imagedef_reactor
.
a
pointer to imagedef_reactor
. fp | DXF file pointer to an input file (or device). |
imagedef_reactor | DXF IMAGEDEF_REACTOR object. |
Definition at line 144 of file imagedef_reactor.c.
References _, dxf_file_struct::acad_version_number, dxf_imagedef_reactor_struct::associated_image_object, AutoCAD_13, AutoCAD_14, dxf_imagedef_reactor_struct::class_version, dxf_imagedef_reactor_struct::dictionary_owner_hard, dxf_imagedef_reactor_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_imagedef_reactor_init(), dxf_imagedef_reactor_new(), dxf_file_struct::filename, dxf_file_struct::fp, dxf_imagedef_reactor_struct::id_code, and dxf_file_struct::line_number.
int dxf_imagedef_reactor_write | ( | DxfFile * | fp, |
DxfImagedefReactor * | imagedef_reactor | ||
) |
Write DXF output to a file for a DXF IMAGEDEF_REACTOR
object.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred. fp | DXF file pointer to an output file (or device). |
imagedef_reactor | DXF IMAGEDEF_REACTOR object. |
Definition at line 281 of file imagedef_reactor.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_13, AutoCAD_14, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_imagedef_reactor_get_associated_image_object(), dxf_imagedef_reactor_get_class_version(), dxf_imagedef_reactor_get_dictionary_owner_hard(), dxf_imagedef_reactor_get_dictionary_owner_soft(), dxf_imagedef_reactor_get_id_code(), dxf_imagedef_reactor_set_class_version(), and dxf_file_struct::fp.
int dxf_imagedef_reactor_free | ( | DxfImagedefReactor * | imagedef_reactor | ) |
Free the allocated memory for a DXF IMAGEDEF_REACTOR
and all it's data fields.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred. imagedef_reactor | Pointer to the memory occupied by the DXF IMAGEDEF_REACTOR object. |
Definition at line 376 of file imagedef_reactor.c.
References _, dxf_imagedef_reactor_struct::associated_image_object, dxf_imagedef_reactor_struct::dictionary_owner_hard, dxf_imagedef_reactor_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_imagedef_reactor_struct::next.
Referenced by dxf_imagedef_reactor_free_chain().
void dxf_imagedef_reactor_free_chain | ( | DxfImagedefReactor * | imagedef_reactors | ) |
Free the allocated memory for a chain of DXF IMAGEDEF_REACTOR
objects and all their data fields.
imagedef_reactors | pointer to the chain of DXF IMAGEDEF_REACTOR objects. |
Definition at line 418 of file imagedef_reactor.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_imagedef_reactor_free(), and dxf_imagedef_reactor_struct::next.
int dxf_imagedef_reactor_get_id_code | ( | DxfImagedefReactor * | imagedef_reactor | ) |
Get the id_code
from a DXF IMAGEDEF_REACTOR
object.
id_code
when successful, or EXIT_FAILURE
when an error occurred. imagedef_reactor | a pointer to a DXF IMAGEDEF_REACTOR object. |
Definition at line 453 of file imagedef_reactor.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_imagedef_reactor_struct::id_code.
Referenced by dxf_imagedef_reactor_write().
DxfImagedefReactor* dxf_imagedef_reactor_set_id_code | ( | DxfImagedefReactor * | imagedef_reactor, |
int | id_code | ||
) |
Set the id_code
for a DXF IMAGEDEF_REACTOR
object.
imagedef_reactor
when successful, or NULL
when an error occurred. imagedef_reactor | a pointer to a DXF IMAGEDEF_REACTOR object. |
id_code | Identification number for the entity. This is to be an unique (sequential) number in the DXF file. |
Definition at line 491 of file imagedef_reactor.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_imagedef_reactor_struct::id_code.
Referenced by dxf_imagedef_reactor_init().
char* dxf_imagedef_reactor_get_dictionary_owner_soft | ( | DxfImagedefReactor * | imagedef_reactor | ) |
Get the pointer to the dictionary_owner_soft
from a DXF IMAGEDEF_REACTOR
object.
dictionary_owner_soft
when successful, or NULL
when an error occurred.imagedef_reactor | a pointer to a DXF IMAGEDEF_REACTOR object. |
Definition at line 537 of file imagedef_reactor.c.
References _, dxf_imagedef_reactor_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_imagedef_reactor_write().
DxfImagedefReactor* dxf_imagedef_reactor_set_dictionary_owner_soft | ( | DxfImagedefReactor * | imagedef_reactor, |
char * | dictionary_owner_soft | ||
) |
Set the pointer to the dictionary_owner_soft
for a DXF IMAGEDEF_REACTOR
object.
imagedef_reactor
when successful, or NULL
when an error occurred. imagedef_reactor | a pointer to a DXF IMAGEDEF_REACTOR object. |
dictionary_owner_soft | a string containing the pointer to the dictionary_owner_soft for the entity. |
Definition at line 576 of file imagedef_reactor.c.
References _, dxf_imagedef_reactor_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_imagedef_reactor_init().
char* dxf_imagedef_reactor_get_dictionary_owner_hard | ( | DxfImagedefReactor * | imagedef_reactor | ) |
Get the pointer to the dictionary_owner_hard
from a DXF IMAGEDEF_REACTOR
object.
dictionary_owner_hard
when successful, or NULL
when an error occurred.imagedef_reactor | a pointer to a DXF IMAGEDEF_REACTOR object. |
Definition at line 621 of file imagedef_reactor.c.
References _, dxf_imagedef_reactor_struct::dictionary_owner_hard, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_imagedef_reactor_write().
DxfImagedefReactor* dxf_imagedef_reactor_set_dictionary_owner_hard | ( | DxfImagedefReactor * | imagedef_reactor, |
char * | dictionary_owner_hard | ||
) |
Set the pointer to the dictionary_owner_hard
for a DXF IMAGEDEF_REACTOR
object.
imagedef_reactor
when successful, or NULL
when an error occurred. imagedef_reactor | a pointer to a DXF IMAGEDEF_REACTOR object. |
dictionary_owner_hard | a string containing the pointer to the dictionary_owner_hard for the entity. |
Definition at line 660 of file imagedef_reactor.c.
References _, dxf_imagedef_reactor_struct::dictionary_owner_hard, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_imagedef_reactor_init().
int32_t dxf_imagedef_reactor_get_class_version | ( | DxfImagedefReactor * | imagedef_reactor | ) |
Get the class_version
from a DXF IMAGEDEF_REACTOR
object.
class_version
when successful, or EXIT_FAILURE
when an error occurred. imagedef_reactor | a pointer to a DXF IMAGEDEF_REACTOR object. |
Definition at line 702 of file imagedef_reactor.c.
References _, dxf_imagedef_reactor_struct::class_version, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_imagedef_reactor_write().
DxfImagedefReactor* dxf_imagedef_reactor_set_class_version | ( | DxfImagedefReactor * | imagedef_reactor, |
int32_t | class_version | ||
) |
Set the class_version
for a DXF IMAGEDEF_REACTOR
object.
imagedef_reactor
when successful, or NULL
when an error occurred. imagedef_reactor | a pointer to a DXF IMAGE_REACTOR entity. |
class_version | the class_version to be set for the object. |
Definition at line 747 of file imagedef_reactor.c.
References _, dxf_imagedef_reactor_struct::class_version, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_imagedef_reactor_init(), and dxf_imagedef_reactor_write().
char* dxf_imagedef_reactor_get_associated_image_object | ( | DxfImagedefReactor * | imagedef_reactor | ) |
Get the pointer to the associated_image_object
from a DXF IMAGEDEF_REACTOR
object.
associated_image_object
when successful, or NULL
when an error occurred.imagedef_reactor | a pointer to a DXF IMAGEDEF_REACTOR object. |
Definition at line 798 of file imagedef_reactor.c.
References _, dxf_imagedef_reactor_struct::associated_image_object, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_imagedef_reactor_write(), and dxf_imagedef_write().
DxfImagedefReactor* dxf_imagedef_reactor_set_associated_image_object | ( | DxfImagedefReactor * | imagedef_reactor, |
char * | associated_image_object | ||
) |
Set the pointer to the associated_image_object
for a DXF IMAGEDEF_REACTOR
object.
associated_image_object
when successful, or NULL
when an error occurred. imagedef_reactor | a pointer to a DXF IMAGEDEF_REACTOR object. |
associated_image_object | a string containing the pointer to the associated_image_object for the entity. |
Definition at line 837 of file imagedef_reactor.c.
References _, dxf_imagedef_reactor_struct::associated_image_object, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_imagedef_reactor_init().
int dxf_imagedef_reactor_get_associated_image_object_length | ( | DxfImagedefReactor * | imagedef_reactor | ) |
Get the associated_image_object_length
from a DXF IMAGEDEF_REACTOR
object.
associated_image_object_length
when successful, or EXIT_FAILURE
when an error occurred. imagedef_reactor | a pointer to a DXF IMAGEDEF_REACTOR object. |
Definition at line 880 of file imagedef_reactor.c.
References _, dxf_imagedef_reactor_struct::associated_image_object_length, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
DxfImagedefReactor* dxf_imagedef_reactor_set_associated_image_object_length | ( | DxfImagedefReactor * | imagedef_reactor, |
int | associated_image_object_length | ||
) |
Set the associated_image_object_length
for a DXF IMAGEDEF_REACTOR
object.
imagedef_reactor
when successful, or NULL
when an error occurred. imagedef_reactor | a pointer to a DXF IMAGEDEF_REACTOR object. |
associated_image_object_length | The associated_image_object_length for the object. |
Definition at line 918 of file imagedef_reactor.c.
References _, dxf_imagedef_reactor_struct::associated_image_object_length, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_imagedef_reactor_init().
DxfImagedefReactor* dxf_imagedef_reactor_get_next | ( | DxfImagedefReactor * | imagedef_reactor | ) |
Get the pointer to the next IMAGEDEF_REACTOR
object from a DXF IMAGEDEF_REACTOR
object.
IMAGEDEF_REACTOR
object.imagedef_reactor | a pointer to a DXF IMAGEDEF_REACTOR object. |
Definition at line 962 of file imagedef_reactor.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_imagedef_reactor_struct::next.
Referenced by dxf_imagedef_write().
DxfImagedefReactor* dxf_imagedef_reactor_set_next | ( | DxfImagedefReactor * | imagedef_reactor, |
DxfImagedefReactor * | next | ||
) |
Set the pointer to the next IMAGEDEF_REACTOR
for a DXF IMAGEDEF_REACTOR
object.
imagedef_reactor | a pointer to a DXF IMAGEDEF_REACTOR object. |
next | a pointer to the next IMAGEDEF_REACTOR for the object. |
Definition at line 998 of file imagedef_reactor.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_imagedef_reactor_struct::next.
Referenced by dxf_imagedef_reactor_init().
DxfImagedefReactor* dxf_imagedef_reactor_get_last | ( | DxfImagedefReactor * | imagedef_reactor | ) |
Get the pointer to the last IMAGEDEF_REACTOR
object from a linked list of DXF IMAGEDEF_REACTOR
objects.
IMAGEDEF_REACTOR
object.imagedef_reactor | a pointer to a DXF IMAGEDEF_REACTOR object. |
Definition at line 1042 of file imagedef_reactor.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_imagedef_reactor_struct::next.