libDXF 0.0.1
A library with DXF related functions written in C.
|
Header file for a DXF layer name object. More...
#include "global.h"
Go to the source code of this file.
Data Structures | |
struct | dxf_layer_name_struct |
DXF definition of an AutoCAD layer name object. More... | |
Typedefs | |
typedef struct dxf_layer_name_struct | DxfLayerName |
DXF definition of an AutoCAD layer name object. | |
Functions | |
DxfLayerName * | dxf_layer_name_new () |
Allocate memory for a DxfLayerName . | |
DxfLayerName * | dxf_layer_name_init (DxfLayerName *layer_name) |
Allocate memory and initialize data fields in a LAYER_NAME object. | |
int | dxf_layer_name_free (DxfLayerName *layer_name) |
Free the allocated memory for a DXF LAYER_NAME and all it's data fields. | |
void | dxf_layer_name_free_chain (DxfLayerName *layer_names) |
Free the allocated memory for a chain of DXF LAYER_NAME objects and all their data fields. | |
char * | dxf_layer_name_get_name (DxfLayerName *layer_name) |
Get the name from a DXF LAYER_NAME object. | |
DxfLayerName * | dxf_layer_name_set_name (DxfLayerName *layer_name, char *name) |
Set the name for a DXF LAYER_NAME object. | |
int | dxf_layer_name_get_length (DxfLayerName *layer_name) |
Get the length from the name member in a DXF LAYER_NAME object. | |
DxfLayerName * | dxf_layer_name_set_length (DxfLayerName *layer_name, int length) |
Set the length of the name member for a DXF LAYER_NAME object. | |
DxfLayerName * | dxf_layer_name_get_next (DxfLayerName *layer_name) |
Get the pointer to the next LAYER_NAME object from a DXF LAYER_NAME object. | |
DxfLayerName * | dxf_layer_name_set_next (DxfLayerName *layer_name, DxfLayerName *next) |
Set the pointer to the next LAYER_NAME object for a DXF LAYER_NAME object. | |
DxfLayerName * | dxf_layer_name_get_last (DxfLayerName *layer_name) |
Get the pointer to the last LAYER_NAME object from a linked list of DXF LAYER_NAME object. |
Header file for a DXF layer name object.
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 layer_name.h.
typedef struct dxf_layer_name_struct DxfLayerName |
DXF definition of an AutoCAD layer name object.
DxfLayerName* dxf_layer_name_new | ( | ) |
Allocate memory for a DxfLayerName
.
Fill the memory contents with zeros.
Definition at line 52 of file layer_name.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_index_struct::layer_name.
Referenced by dxf_layer_index_init(), and dxf_layer_name_init().
DxfLayerName* dxf_layer_name_init | ( | DxfLayerName * | layer_name | ) |
Allocate memory and initialize data fields in a LAYER_NAME
object.
NULL
when no memory was allocated, a pointer to the allocated memory when succesful. layer_name | DXF LAYER_NAME object. |
Definition at line 90 of file layer_name.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_layer_name_new(), dxf_layer_name_struct::length, dxf_layer_name_struct::name, and dxf_layer_name_struct::next.
Referenced by dxf_layer_index_init(), and dxf_layer_index_read().
int dxf_layer_name_free | ( | DxfLayerName * | layer_name | ) |
Free the allocated memory for a DXF LAYER_NAME
and all it's data fields.
EXIT_SUCCESS
when done, or EXIT_FAILURE
when an error occurred. layer_name | Pointer to the memory occupied by the DXF LAYER_NAME object. |
Definition at line 132 of file layer_name.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_layer_name_struct::name, and dxf_layer_name_struct::next.
Referenced by dxf_layer_name_free_chain().
void dxf_layer_name_free_chain | ( | DxfLayerName * | layer_names | ) |
Free the allocated memory for a chain of DXF LAYER_NAME
objects and all their data fields.
layer_names | pointer to the chain of DXF LAYER_NAME objects. |
Definition at line 172 of file layer_name.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_layer_name_free(), and dxf_layer_name_struct::next.
Referenced by dxf_layer_index_free().
char* dxf_layer_name_get_name | ( | DxfLayerName * | layer_name | ) |
Get the name
from a DXF LAYER_NAME
object.
name
.layer_name | a pointer to a DXF LAYER_NAME object. |
Definition at line 207 of file layer_name.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_name_struct::name.
DxfLayerName* dxf_layer_name_set_name | ( | DxfLayerName * | layer_name, |
char * | name | ||
) |
Set the name
for a DXF LAYER_NAME
object.
layer_name | a pointer to a DXF LAYER_NAME object. |
name | a string containing the name for the entity. |
Definition at line 242 of file layer_name.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_name_struct::name.
int dxf_layer_name_get_length | ( | DxfLayerName * | layer_name | ) |
Get the length
from the name
member in a DXF LAYER_NAME
object.
length
. layer_name | a pointer to a DXF LAYER_NAME object. |
Definition at line 283 of file layer_name.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_name_struct::length.
DxfLayerName* dxf_layer_name_set_length | ( | DxfLayerName * | layer_name, |
int | length | ||
) |
Set the length
of the name
member for a DXF LAYER_NAME
object.
layer_name | a pointer to a DXF LAYER_NAME object. |
length | length . |
Definition at line 319 of file layer_name.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_name_struct::length.
DxfLayerName* dxf_layer_name_get_next | ( | DxfLayerName * | layer_name | ) |
Get the pointer to the next LAYER_NAME
object from a DXF LAYER_NAME
object.
LAYER_NAME
object.layer_name | a pointer to a DXF LAYER_NAME object. |
Definition at line 362 of file layer_name.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_name_struct::next.
DxfLayerName* dxf_layer_name_set_next | ( | DxfLayerName * | layer_name, |
DxfLayerName * | next | ||
) |
Set the pointer to the next LAYER_NAME
object for a DXF LAYER_NAME
object.
layer_name | a pointer to a DXF LAYER_NAME object. |
next | a pointer to the next LAYER_NAME object for the object. |
Definition at line 398 of file layer_name.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_name_struct::next.
DxfLayerName* dxf_layer_name_get_last | ( | DxfLayerName * | layer_name | ) |
Get the pointer to the last LAYER_NAME
object from a linked list of DXF LAYER_NAME
object.
LAYER_NAME
object.layer_name | a pointer to a DXF LAYER_NAME object. |
Definition at line 442 of file layer_name.c.
References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_name_struct::next.