libDXF 0.0.1
A library with DXF related functions written in C.
|
Header file for a DXF object id functions. More...
#include "global.h"
Go to the source code of this file.
Data Structures | |
struct | dxf_object_id_struct |
DXF definition of an object id. More... | |
Typedefs | |
typedef struct dxf_object_id_struct | DxfObjectId |
DXF definition of an object id. | |
Functions | |
DxfObjectId * | dxf_object_id_new () |
Allocate memory for a DXF object_id . | |
DxfObjectId * | dxf_object_id_init (DxfObjectId *object_id) |
Allocate memory and initialize data fields in a DXF object_id . | |
int | dxf_object_id_free (DxfObjectId *object_id) |
Free the allocated memory for a DXF object_id and all it's data fields. | |
void | dxf_object_id_free_chain (DxfObjectId *object_ids) |
Free the allocated memory for a chain of DXF object_ids and all their data fields. | |
int | dxf_object_id_get_group_code (DxfObjectId *object_id) |
Get the group_code from a DXF object_id . | |
DxfObjectId * | dxf_object_id_set_group_code (DxfObjectId *object_id, int group_code) |
Set the group_code for a DXF object_id . | |
char * | dxf_object_id_get_data (DxfObjectId *object_id) |
Get the data from a DXF object_id . | |
DxfObjectId * | dxf_object_id_set_data (DxfObjectId *object_id, char *data) |
Set the data for a DXF object_id . | |
int | dxf_object_id_get_length (DxfObjectId *object_id) |
Get the length from a DXF object_id . | |
DxfObjectId * | dxf_object_id_set_length (DxfObjectId *object_id, int length) |
Set the length for a DXF object_id . | |
DxfObjectId * | dxf_object_id_get_next (DxfObjectId *object_id) |
Get the pointer to the next DXF object_id from a DXF object_id . | |
DxfObjectId * | dxf_object_id_set_next (DxfObjectId *object_id, DxfObjectId *next) |
Set the pointer to the next DXF object_id for a DXF object_id . | |
DxfObjectId * | dxf_object_id_get_last (DxfObjectId *object_id) |
Get the pointer to the last DXF object_id from a linked list of DXF object_id . |
Header file for a DXF object id functions.
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_id.h.
typedef struct dxf_object_id_struct DxfObjectId |
DXF definition of an object id.
DxfObjectId* dxf_object_id_new | ( | ) |
Allocate memory for a DXF object_id
.
Fill the memory contents with zeros.
Definition at line 44 of file object_id.c.
References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_acad_proxy_entity_init(), and dxf_object_id_init().
DxfObjectId* dxf_object_id_init | ( | DxfObjectId * | object_id | ) |
Allocate memory and initialize data fields in a DXF object_id
.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful. object_id | DXF object_id. |
Definition at line 82 of file object_id.c.
References _, dxf_object_id_struct::data, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_object_id_new(), and dxf_object_id_struct::next.
Referenced by dxf_acad_proxy_entity_read().
int dxf_object_id_free | ( | DxfObjectId * | object_id | ) |
Free the allocated memory for a DXF object_id
and all it's data fields.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred. object_id | Pointer to the memory occupied by the DXF object_id . |
Definition at line 123 of file object_id.c.
References _, dxf_object_id_struct::data, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_object_id_struct::next.
Referenced by dxf_object_id_free_chain().
void dxf_object_id_free_chain | ( | DxfObjectId * | object_ids | ) |
Free the allocated memory for a chain of DXF object_ids
and all their data fields.
object_ids | a pointer to the chain of DXF object_ids . |
Definition at line 163 of file object_id.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_object_id_free(), and dxf_object_id_struct::next.
int dxf_object_id_get_group_code | ( | DxfObjectId * | object_id | ) |
Get the group_code
from a DXF object_id
.
group_code
. object_id | a pointer to a DXF object_id . |
Definition at line 196 of file object_id.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_object_id_struct::group_code.
Referenced by dxf_acad_proxy_entity_write().
DxfObjectId* dxf_object_id_set_group_code | ( | DxfObjectId * | object_id, |
int | group_code | ||
) |
Set the group_code
for a DXF object_id
.
object_id
when sucessful, NULL
when an error occurred. object_id | a pointer to a DXF object_id . |
group_code | the group_code to be set for the entity. |
Definition at line 237 of file object_id.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_object_id_struct::group_code.
Referenced by dxf_acad_proxy_entity_read().
char* dxf_object_id_get_data | ( | DxfObjectId * | object_id | ) |
Get the data
from a DXF object_id
.
data
when sucessful, NULL
when an error occurred. object_id | a pointer to a DXF object_id . |
Definition at line 280 of file object_id.c.
References _, dxf_object_id_struct::data, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_acad_proxy_entity_write().
DxfObjectId* dxf_object_id_set_data | ( | DxfObjectId * | object_id, |
char * | data | ||
) |
Set the data
for a DXF object_id
.
object_id | a pointer to a DXF object_id . |
data | a string containing the data for the entity. |
Definition at line 315 of file object_id.c.
References _, dxf_object_id_struct::data, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.
Referenced by dxf_acad_proxy_entity_init().
int dxf_object_id_get_length | ( | DxfObjectId * | object_id | ) |
Get the length
from a DXF object_id
.
length
. object_id | a pointer to a DXF object_id . |
Definition at line 355 of file object_id.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_object_id_struct::length.
DxfObjectId* dxf_object_id_set_length | ( | DxfObjectId * | object_id, |
int | length | ||
) |
Set the length
for a DXF object_id
.
object_id
when sucessful, NULL
when an error occurred. object_id | a pointer to a DXF object_id . |
length | Length to be set for the entity. |
Definition at line 393 of file object_id.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_object_id_struct::length.
DxfObjectId* dxf_object_id_get_next | ( | DxfObjectId * | object_id | ) |
Get the pointer to the next DXF object_id
from a DXF object_id
.
object_id
.object_id | a pointer to a DXF \ object_id. |
Definition at line 436 of file object_id.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_object_id_struct::next.
Referenced by dxf_acad_proxy_entity_write().
DxfObjectId* dxf_object_id_set_next | ( | DxfObjectId * | object_id, |
DxfObjectId * | next | ||
) |
Set the pointer to the next DXF object_id
for a DXF object_id
.
object_id | a pointer to a DXF object_id . |
next | a pointer to the next DXF object_id for the entity. |
Definition at line 472 of file object_id.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_object_id_struct::next.
DxfObjectId* dxf_object_id_get_last | ( | DxfObjectId * | object_id | ) |
Get the pointer to the last DXF object_id
from a linked list of DXF object_id
.
object_id
.object_id | a pointer to a DXF \ object_id. |
Definition at line 516 of file object_id.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_object_id_struct::next.
Referenced by dxf_acad_proxy_entity_read().