![]() |
libDXF 0.0.1
A library with DXF related functions written in C.
|
Header file for a DXF group object (GROUP).
More...
#include "global.h"

Go to the source code of this file.
Data Structures | |
| struct | dxf_group |
DXF definition of an AutoCAD group object (GROUP). More... | |
Typedefs | |
| typedef struct dxf_group | DxfGroup |
DXF definition of an AutoCAD group object (GROUP). | |
Functions | |
| DxfGroup * | dxf_group_new () |
Allocate memory for a DxfGroup. | |
| DxfGroup * | dxf_group_init (DxfGroup *group) |
Allocate memory and initialize data fields in a GROUP object. | |
| DxfGroup * | dxf_group_read (DxfFile *fp, DxfGroup *group) |
Read data from a DXF file into a DXF GROUP object. | |
| int | dxf_group_write (DxfFile *fp, DxfGroup *group) |
Write DXF output to a file for a DXF GROUP object. | |
| int | dxf_group_free (DxfGroup *group) |
Free the allocated memory for a DXF GROUP and all it's data fields. | |
| void | dxf_group_free_chain (DxfGroup *groups) |
Free the allocated memory for a chain of DXF GROUP objects and all their data fields. | |
| int | dxf_group_get_id_code (DxfGroup *group) |
Get the ID code from a DXF GROUP object. | |
| DxfGroup * | dxf_group_set_id_code (DxfGroup *group, int id_code) |
Set the ID code for a DXF GROUP object. | |
| char * | dxf_group_get_dictionary_owner_soft (DxfGroup *group) |
Get the soft pointer to the dictionary owner from a DXF GROUP object. | |
| DxfGroup * | dxf_group_set_dictionary_owner_soft (DxfGroup *group, char *dictionary_owner_soft) |
Set the pointer to the dictionary_owner_soft for a DXF GROUP object. | |
| char * | dxf_group_get_dictionary_owner_hard (DxfGroup *group) |
Get the hard pointer to the dictionary owner from a DXF GROUP object. | |
| DxfGroup * | dxf_group_set_dictionary_owner_hard (DxfGroup *group, char *dictionary_owner_hard) |
Set the pointer to the dictionary_owner_hard for a DXF GROUP object. | |
| int | dxf_group_get_unnamed_flag (DxfGroup *group) |
Get the unnamed flag value from a DXF GROUP object. | |
| DxfGroup * | dxf_group_set_unnamed_flag (DxfGroup *group, int unnamed_flag) |
Set the unnamed flag value for a DXF GROUP object. | |
| int | dxf_group_get_selectability_flag (DxfGroup *group) |
Get the selectability flag value from a DXF GROUP object. | |
| DxfGroup * | dxf_group_set_selectability_flag (DxfGroup *group, int selectability_flag) |
Set the selectability flag value for a DXF GROUP object. | |
| char * | dxf_group_get_description (DxfGroup *group) |
Get the description from a DXF GROUP object. | |
| DxfGroup * | dxf_group_set_description (DxfGroup *group, char *description) |
Set the description for a DXF GROUP object. | |
| char * | dxf_group_get_handle_entity_in_group (DxfGroup *group) |
Get the handle of entity in group from a DXF GROUP object. | |
| DxfGroup * | dxf_group_set_handle_entity_in_group (DxfGroup *group, char *handle_entity_in_group) |
Set the handle of entity in group for a DXF GROUP object. | |
| DxfGroup * | dxf_group_get_next (DxfGroup *group) |
Get the pointer to the next GROUP entity from a DXF GROUP object. | |
| DxfGroup * | dxf_group_set_next (DxfGroup *group, DxfGroup *next) |
Set the pointer to the next GROUP for a DXF GROUP object. | |
| DxfGroup * | dxf_group_get_last (DxfGroup *group) |
Get the pointer to the last GROUP object from a linked list of DXF GROUP objects. | |
Header file for a DXF group object (GROUP).
GROUP object was introduced in DXF R13.
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 group.h.
| DxfGroup* dxf_group_new | ( | ) |
Allocate memory for a DxfGroup.
Fill the memory contents with zeros.
Definition at line 52 of file group.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_group_init(), and dxf_group_read().
Allocate memory and initialize data fields in a GROUP object.
NULL when no memory was allocated, a pointer to the allocated memory when succesful. | group | DXF GROUP object. |
Definition at line 90 of file group.c.
References _, dxf_group::description, dxf_group::dictionary_owner_hard, dxf_group::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_group_new(), dxf_group::handle_entity_in_group, dxf_group::id_code, dxf_group::next, dxf_group::selectability_flag, and dxf_group::unnamed_flag.
Referenced by dxf_group_read().

Read data from a DXF file into a DXF GROUP object.
The last line read from file contained the string "GROUP".
Now follows some data for the GROUP object, to be terminated with a " 0" string announcing the following object.
While parsing the DXF file store data in group.
a pointer to group object. | fp | DXF file pointer to an input file (or device). |
| group | DXF GROUP object. |
Definition at line 140 of file group.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_13, dxf_group::description, dxf_group::dictionary_owner_hard, dxf_group::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_group_init(), dxf_group_new(), dxf_file_struct::filename, dxf_file_struct::fp, dxf_group::handle_entity_in_group, dxf_group::id_code, dxf_file_struct::line_number, dxf_group::selectability_flag, and dxf_group::unnamed_flag.

Write DXF output to a file for a DXF GROUP object.
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred. | fp | DXF file pointer to an output file (or device). |
| group | DXF Group object. |
Definition at line 283 of file group.c.
References _, dxf_file_struct::acad_version_number, AutoCAD_13, AutoCAD_14, dxf_group::description, dxf_group::dictionary_owner_hard, dxf_group::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_file_struct::fp, dxf_group::handle_entity_in_group, dxf_group::id_code, dxf_group::selectability_flag, and dxf_group::unnamed_flag.
| int dxf_group_free | ( | DxfGroup * | group | ) |
Free the allocated memory for a DXF GROUP and all it's data fields.
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred. | group | Pointer to the memory occupied by the DXF GROUP object. |
Definition at line 394 of file group.c.
References _, dxf_group::description, dxf_group::dictionary_owner_hard, dxf_group::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_group::handle_entity_in_group, and dxf_group::next.
Referenced by dxf_group_free_chain().
| void dxf_group_free_chain | ( | DxfGroup * | groups | ) |
Free the allocated memory for a chain of DXF GROUP objects and all their data fields.
| groups | pointer to the chain of DXF GROUP objects. |
Definition at line 437 of file group.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_group_free(), and dxf_group::next.

| int dxf_group_get_id_code | ( | DxfGroup * | group | ) |
Get the ID code from a DXF GROUP object.
| group | a pointer to a DXF GROUP object. |
Definition at line 470 of file group.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_group::id_code.
Set the ID code for a DXF GROUP object.
| group | a pointer to a DXF GROUP object. |
| id_code | Identification number for the entity. This is to be an unique (sequential) number in the DXF file. |
Definition at line 508 of file group.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_group::id_code.
| char* dxf_group_get_dictionary_owner_soft | ( | DxfGroup * | group | ) |
Get the soft pointer to the dictionary owner from a DXF GROUP object.
| group | a pointer to a DXF GROUP object. |
Definition at line 553 of file group.c.
References _, dxf_group::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Set the pointer to the dictionary_owner_soft for a DXF GROUP object.
| group | a pointer to a DXF GROUP object. |
| dictionary_owner_soft | a string containing the pointer to the dictionary_owner_soft for the entity. |
Definition at line 592 of file group.c.
References _, dxf_group::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
| char* dxf_group_get_dictionary_owner_hard | ( | DxfGroup * | group | ) |
Get the hard pointer to the dictionary owner from a DXF GROUP object.
| group | a pointer to a DXF GROUP object. |
Definition at line 636 of file group.c.
References _, dxf_group::dictionary_owner_hard, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Set the pointer to the dictionary_owner_hard for a DXF GROUP object.
| group | a pointer to a DXF GROUP object. |
| dictionary_owner_hard | a string containing the pointer to the dictionary_owner_hard for the entity. |
Definition at line 675 of file group.c.
References _, dxf_group::dictionary_owner_hard, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
| int dxf_group_get_unnamed_flag | ( | DxfGroup * | group | ) |
Get the unnamed flag value from a DXF GROUP object.
| group | a pointer to a DXF GROUP object. |
Definition at line 716 of file group.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_group::unnamed_flag.
Set the unnamed flag value for a DXF GROUP object.
| group | a pointer to a DXF GROUP object. |
| unnamed_flag | the unnamed flag value to be set for the entity. |
Definition at line 759 of file group.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_group::unnamed_flag.
| int dxf_group_get_selectability_flag | ( | DxfGroup * | group | ) |
Get the selectability flag value from a DXF GROUP object.
| group | a pointer to a DXF GROUP object. |
Definition at line 798 of file group.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_group::selectability_flag.
Set the selectability flag value for a DXF GROUP object.
| group | a pointer to a DXF GROUP object. |
| selectability_flag | the selectability flag value to be set for the entity. |
Definition at line 841 of file group.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_group::selectability_flag.
| char* dxf_group_get_description | ( | DxfGroup * | group | ) |
Get the description from a DXF GROUP object.
NULL when an error occurred. | group | a pointer to a DXF GROUP object. |
Definition at line 886 of file group.c.
References _, dxf_group::description, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Set the description for a DXF GROUP object.
| group | a pointer to a DXF GROUP object. |
| description | a string containing the description for the object. |
Definition at line 924 of file group.c.
References _, dxf_group::description, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
| char* dxf_group_get_handle_entity_in_group | ( | DxfGroup * | group | ) |
Get the handle of entity in group from a DXF GROUP object.
NULL when an error occurred. | group | a pointer to a DXF GROUP object. |
Definition at line 965 of file group.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_group::handle_entity_in_group.
Set the handle of entity in group for a DXF GROUP object.
| group | a pointer to a DXF GROUP object. |
| handle_entity_in_group | a string containing the handle of entity in group for the object. |
Definition at line 1003 of file group.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_group::handle_entity_in_group.
Get the pointer to the next GROUP entity from a DXF GROUP object.
GROUP object.| group | a pointer to a DXF GROUP object. |
Definition at line 1047 of file group.c.
References _, DEBUG, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_group::next.
Set the pointer to the next GROUP for a DXF GROUP object.
| group | a pointer to a DXF GROUP object. |
| next | a pointer to the next GROUP for the object. |
Definition at line 1086 of file group.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_group::next.
Get the pointer to the last GROUP object from a linked list of DXF GROUP objects.
GROUP object.| group | a pointer to a DXF GROUP object. |
Definition at line 1129 of file group.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_group::next.
1.7.3