![]() |
libDXF 0.0.1
A library with DXF related functions written in C.
|
Functions for DXF objects. More...
#include "object.h"
Go to the source code of this file.
Functions | |
| DxfObject * | dxf_object_new () |
Allocate memory for a DXF object. | |
| DxfObject * | dxf_object_init (DxfObject *object) |
Allocate memory and initialize data fields in a DXF OBJECT entity. | |
| int | dxf_object_write_objects (DxfFile *fp, DxfObject *dxf_objects_list) |
| Write DXF output to a file for a table of objects. | |
| int | dxf_object_free (DxfObject *object) |
Free the allocated memory for a DXF object and all it's data fields. | |
| void | dxf_object_free_chain (DxfObject *objects) |
Free the allocated memory for a chain of DXF objects and all their data fields. | |
| DxfEntityType * | dxf_object_get_entity_type (DxfObject *object) |
Get the entity_type from a DXF OBJECT entity. | |
| DxfObject * | dxf_object_set_entity_type (DxfObject *object, DxfEntityType entity_type) |
Set the entity_type to the DXF OBJECT entity. | |
| DxfObject * | dxf_object_get_next (DxfObject *object) |
Get the pointer to the next OBJECT entity from a DXF OBJECT entity. | |
| DxfObject * | dxf_object_set_next (DxfObject *object, DxfObject *next) |
Set the pointer to the next OBJECT for a DXF OBJECT entity. | |
| DxfObject * | dxf_object_get_last (DxfObject *object) |
Get the pointer to the last OBJECT entity from a linked list of DXF OBJECT entities. | |
Functions for DXF objects.
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.c.
| DxfObject* dxf_object_new | ( | ) |
Allocate memory for a DXF object.
Fill the memory contents with zeros.
Definition at line 45 of file object.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_object_init().
Allocate memory and initialize data fields in a DXF OBJECT entity.
NULL when no memory was allocated, a pointer to the allocated memory when succesful. | object | DXF object entity. |
Definition at line 83 of file object.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_MAX_PARAM, dxf_object_new(), and UNKNOWN_ENTITY.
Referenced by dxf_drawing_init().

Write DXF output to a file for a table of objects.
Appears only in TABLES section.
| fp | DXF file pointer to an output file (or device). |
| dxf_objects_list | Pointer to a list of DXF objects. |
Definition at line 128 of file object.c.
References DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
| int dxf_object_free | ( | DxfObject * | object | ) |
Free the allocated memory for a DXF object and all it's data fields.
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred. | object | Pointer to the memory occupied by the DXF object entity. |
Definition at line 155 of file object.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_object_struct::next.
Referenced by dxf_object_free_chain().
| void dxf_object_free_chain | ( | DxfObject * | objects | ) |
Free the allocated memory for a chain of DXF objects and all their data fields.
| objects | a pointer to the chain of DXF objects. |
Definition at line 195 of file object.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_object_free(), and dxf_object_struct::next.
Referenced by dxf_drawing_free().

| DxfEntityType* dxf_object_get_entity_type | ( | DxfObject * | object | ) |
Get the entity_type from a DXF OBJECT entity.
entity_type.| object | a pointer to a DXF OBJECT entity. |
Definition at line 230 of file object.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_object_struct::entity_type.
| DxfObject* dxf_object_set_entity_type | ( | DxfObject * | object, |
| DxfEntityType | entity_type | ||
| ) |
Set the entity_type to the DXF OBJECT entity.
| object | an DXF OBJECT entity. |
| entity_type | a pointer to the entity_type for the DXF OBJECT entity. |
Definition at line 264 of file object.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_object_struct::entity_type.
Get the pointer to the next OBJECT entity from a DXF OBJECT entity.
OBJECT entity.| object | a pointer to a DXF OBJECT entity. |
Definition at line 308 of file object.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_object_struct::next.
Set the pointer to the next OBJECT for a DXF OBJECT entity.
| object | a pointer to a DXF OBJECT entity. |
| next | a pointer to the next OBJECT for the entity. |
Definition at line 344 of file object.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Get the pointer to the last OBJECT entity from a linked list of DXF OBJECT entities.
OBJECT entity.| object | a pointer to a DXF OBJECT entity. |
Definition at line 387 of file object.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_object_struct::next.
1.7.3