libDXF 0.0.1
A library with DXF related functions written in C.
Data Structures | Typedefs | Functions

imagedef_reactor.h File Reference

Header file for a DXF imagedef_reactor object (IMAGEDEF_REACTOR). More...

#include "global.h"
Include dependency graph for imagedef_reactor.h:
This graph shows which files directly or indirectly include this file:

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

DxfImagedefReactordxf_imagedef_reactor_new ()
 Allocate memory for a DxfImagedefReactor.
DxfImagedefReactordxf_imagedef_reactor_init (DxfImagedefReactor *imagedef_reactor)
 Allocate memory and initialize data fields in a IMAGEDEF_REACTOR object.
DxfImagedefReactordxf_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.
DxfImagedefReactordxf_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.
DxfImagedefReactordxf_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.
DxfImagedefReactordxf_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.
DxfImagedefReactordxf_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.
DxfImagedefReactordxf_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.
DxfImagedefReactordxf_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.
DxfImagedefReactordxf_imagedef_reactor_get_next (DxfImagedefReactor *imagedef_reactor)
 Get the pointer to the next IMAGEDEF_REACTOR object from a DXF IMAGEDEF_REACTOR object.
DxfImagedefReactordxf_imagedef_reactor_set_next (DxfImagedefReactor *imagedef_reactor, DxfImagedefReactor *next)
 Set the pointer to the next IMAGEDEF_REACTOR for a DXF IMAGEDEF_REACTOR object.
DxfImagedefReactordxf_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.

Detailed Description

Header file for a DXF imagedef_reactor object (IMAGEDEF_REACTOR).

Author:
Copyright (C) 2015, 2016, 2017 by Bert Timmerman <bert.timmerman@xs4all.nl>.
Since:
The IMAGEDEF_REACTOR object was introduced in DXF R14.
Warning:
The IMAGEDEF_REACTOR object requires AutoCAD version R14 or higher.
Version:
According to DXF R10 (backward compatibility).
According to DXF R11 (backward compatibility).
According to DXF R12 (backward compatibility).
According to DXF R13 (backward compatibility).
According to DXF R14.

Copyright Notices.


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 Documentation

DXF definition of an AutoCAD imagedef_reactor object (IMAGEDEF_REACTOR).


Function Documentation

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.

Returns:
NULL when no memory was allocated, a pointer to the allocated memory when succesful.
Parameters:
imagedef_reactorDXF 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().

Here is the call graph for this function:

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.

Returns:
a pointer to imagedef_reactor.
Parameters:
fpDXF file pointer to an input file (or device).
imagedef_reactorDXF 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.

Here is the call graph for this function:

int dxf_imagedef_reactor_write ( DxfFile fp,
DxfImagedefReactor imagedef_reactor 
)

Write DXF output to a file for a DXF IMAGEDEF_REACTOR object.

Returns:
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred.

Todo:
for version R14.
Implementing the start of application-defined group "{application_name", with Group code 102.
For example: "{ACAD_REACTORS" indicates the start of the AutoCAD persistent reactors group.

application-defined codes: Group codes and values within the 102 groups are application defined (optional).

End of group, "}" (optional), with Group code 102.

Parameters:
fpDXF file pointer to an output file (or device).
imagedef_reactorDXF 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.

Here is the call graph for this function:

int dxf_imagedef_reactor_free ( DxfImagedefReactor imagedef_reactor)

Free the allocated memory for a DXF IMAGEDEF_REACTOR and all it's data fields.

Returns:
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred.
Parameters:
imagedef_reactorPointer 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.

Parameters:
imagedef_reactorspointer 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.

Here is the call graph for this function:

int dxf_imagedef_reactor_get_id_code ( DxfImagedefReactor imagedef_reactor)

Get the id_code from a DXF IMAGEDEF_REACTOR object.

Returns:
id_code when successful, or EXIT_FAILURE when an error occurred.
Parameters:
imagedef_reactora 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.

Returns:
a pointer to imagedef_reactor when successful, or NULL when an error occurred.
Parameters:
imagedef_reactora pointer to a DXF IMAGEDEF_REACTOR object.
id_codeIdentification 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.

Returns:
a pointer to dictionary_owner_soft when successful, or NULL when an error occurred.
Warning:
No checks are performed on the returned pointer.
Parameters:
imagedef_reactora 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.

Returns:
a pointer to imagedef_reactor when successful, or NULL when an error occurred.
Parameters:
imagedef_reactora pointer to a DXF IMAGEDEF_REACTOR object.
dictionary_owner_softa 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.

Returns:
a pointer to dictionary_owner_hard when successful, or NULL when an error occurred.
Warning:
No checks are performed on the returned pointer.
Parameters:
imagedef_reactora 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.

Returns:
a pointer to imagedef_reactor when successful, or NULL when an error occurred.
Parameters:
imagedef_reactora pointer to a DXF IMAGEDEF_REACTOR object.
dictionary_owner_harda 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.

Returns:
class_version when successful, or EXIT_FAILURE when an error occurred.
Parameters:
imagedef_reactora 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.

Returns:
a pointer to imagedef_reactor when successful, or NULL when an error occurred.
Parameters:
imagedef_reactora pointer to a DXF IMAGE_REACTOR entity.
class_versionthe 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.

Returns:
a pointer to associated_image_object when successful, or NULL when an error occurred.
Warning:
No checks are performed on the returned pointer.
Parameters:
imagedef_reactora 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.

Returns:
a pointer to associated_image_object when successful, or NULL when an error occurred.
Parameters:
imagedef_reactora pointer to a DXF IMAGEDEF_REACTOR object.
associated_image_objecta 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.

Returns:
associated_image_object_length when successful, or EXIT_FAILURE when an error occurred.
Parameters:
imagedef_reactora 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.

Returns:
a pointer to imagedef_reactor when successful, or NULL when an error occurred.
Parameters:
imagedef_reactora pointer to a DXF IMAGEDEF_REACTOR object.
associated_image_object_lengthThe 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.

Returns:
pointer to the next IMAGEDEF_REACTOR object.
Warning:
No checks are performed on the returned pointer.
Parameters:
imagedef_reactora 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.

Parameters:
imagedef_reactora pointer to a DXF IMAGEDEF_REACTOR object.
nexta 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.

Returns:
pointer to the last IMAGEDEF_REACTOR object.
Warning:
No checks are performed on the returned pointer.
Parameters:
imagedef_reactora 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.