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

layer.h File Reference

Header file for a DXF layer table (LAYER). More...

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

Go to the source code of this file.

Data Structures

struct  dxf_layer_struct
 DXF definition of an AutoCAD layer entity. More...

Typedefs

typedef struct dxf_layer_struct DxfLayer
 DXF definition of an AutoCAD layer entity.

Functions

DxfLayerdxf_layer_new ()
 Allocate memory for a DXF LAYER.
DxfLayerdxf_layer_init (DxfLayer *layer)
 Allocate memory and initialize data fields in a DXF LAYER table.
DxfLayerdxf_layer_read (DxfFile *fp, DxfLayer *layer)
 Read data from a DXF file into a DXF LAYER table.
int dxf_layer_write (DxfFile *fp, DxfLayer *layer)
 Write DXF output for a DXF LAYER table.
int dxf_layer_free (DxfLayer *layer)
 Free the allocated memory for a DXF LAYER and all it's data fields.
void dxf_layer_free_chain (DxfLayer *layers)
 Free the allocated memory for a chain of DXF LAYER tables and all their data fields.
int dxf_layer_get_id_code (DxfLayer *layer)
 Get the ID code from a DXF LAYER entity.
DxfLayerdxf_layer_set_id_code (DxfLayer *layer, int id_code)
 Set the ID code for a DXF LAYER entity.
char * dxf_layer_get_layer_name (DxfLayer *layer)
 Get the layer_name from a DXF LAYER entity.
DxfLayerdxf_layer_set_layer_name (DxfLayer *layer, char *layer_name)
 Set the layer_name for a DXF LAYER entity.
char * dxf_layer_get_linetype (DxfLayer *layer)
 Get the linetype from a DXF LAYER entity.
DxfLayerdxf_layer_set_linetype (DxfLayer *layer, char *linetype)
 Set the linetype for a DXF LAYER entity.
int dxf_layer_get_color (DxfLayer *layer)
 Get the color from a DXF LAYER entity.
DxfLayerdxf_layer_set_color (DxfLayer *layer, int color)
 Set the color for a DXF LAYER entity.
int dxf_layer_is_off (DxfLayer *layer)
 Test if layer is off.
int dxf_layer_get_flag (DxfLayer *layer)
 Get the flag from a DXF LAYER entity.
DxfLayerdxf_layer_set_flag (DxfLayer *layer, int flag)
 Set the flag for a DXF LAYER entity.
int dxf_layer_is_frozen (DxfLayer *layer)
 Test if layer is frozen.
int dxf_layer_is_locked (DxfLayer *layer)
 Test if layer is locked.
int dxf_layer_is_xreferenced (DxfLayer *layer)
 Test if layer is externally dependent on an xref.
int dxf_layer_is_xresolved (DxfLayer *layer)
 Test if layer is externally dependent on a xref and has been successfully resolved.
int dxf_layer_is_referenced (DxfLayer *layer)
 Test if layer is internally referenced by an entity.
int dxf_layer_get_plotting_flag (DxfLayer *layer)
 Get the plotting_flag from a DXF LAYER entity.
DxfLayerdxf_layer_set_plotting_flag (DxfLayer *layer, int plotting_flag)
 Set the plotting_flag for a DXF LAYER entity.
char * dxf_layer_get_dictionary_owner_soft (DxfLayer *layer)
 Get the soft pointer to the dictionary owner from a DXF LAYER entity.
DxfLayerdxf_layer_set_dictionary_owner_soft (DxfLayer *layer, char *dictionary_owner_soft)
 Set the pointer to the dictionary_owner_soft for a DXF LAYER entity.
char * dxf_layer_get_material (DxfLayer *layer)
 Get the pointer to the material from a DXF LAYER entity.
DxfLayerdxf_layer_set_material (DxfLayer *layer, char *material)
 Set the pointer to the material for a DXF LAYER entity.
char * dxf_layer_get_dictionary_owner_hard (DxfLayer *layer)
 Get the hard pointer to the dictionary owner from a DXF LAYER entity.
DxfLayerdxf_layer_set_dictionary_owner_hard (DxfLayer *layer, char *dictionary_owner_hard)
 Set the pointer to the dictionary_owner_hard for a DXF LAYER entity.
int16_t dxf_layer_get_lineweight (DxfLayer *layer)
 Get the lineweight from a DXF LAYER entity.
DxfLayerdxf_layer_set_lineweight (DxfLayer *layer, int16_t lineweight)
 Set the lineweight for a DXF LAYER entity.
char * dxf_layer_get_plot_style_name (DxfLayer *layer)
 Get the plot_style_name from a DXF LAYER entity.
DxfLayerdxf_layer_set_plot_style_name (DxfLayer *layer, char *plot_style_name)
 Set the plot_style_name for a DXF LAYER entity.
DxfLayerdxf_layer_get_next (DxfLayer *layer)
 Get the pointer to the next LAYER entity from a DXF LAYER entity.
DxfLayerdxf_layer_set_next (DxfLayer *layer, DxfLayer *next)
 Set the pointer to the next LAYER for a DXF LAYER entity.
DxfLayerdxf_layer_get_last (DxfLayer *layer)
 Get the pointer to the last LAYER entity from a linked list of DXF LAYER entities.

Detailed Description

Header file for a DXF layer table (LAYER).

Author:
Copyright (C) 2008, 2010, 2012, 2013,2014, 2015, 2016, 2017 by Bert Timmerman <bert.timmerman@xs4all.nl>.

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 layer.h.


Typedef Documentation

typedef struct dxf_layer_struct DxfLayer

DXF definition of an AutoCAD layer entity.

Version:
According to DXF R13.
According to DXF R14.

Function Documentation

DxfLayer* dxf_layer_new ( )

Allocate memory for a DXF LAYER.

Fill the memory contents with zeros.

Returns:
NULL when no memory was allocated, a pointer to the allocated memory when succesful.

Definition at line 52 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_insert_struct::layer.

Referenced by dxf_layer_init(), and dxf_layer_read().

DxfLayer* dxf_layer_init ( DxfLayer layer)

Allocate memory and initialize data fields in a DXF LAYER table.

Returns:
NULL when no memory was allocated, a pointer to the allocated memory when succesful.
Parameters:
layerDXF LAYER table.

Definition at line 90 of file layer.c.

References _, DXF_COLOR_BYLAYER, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LINETYPE, dxf_layer_new(), dxf_layer_set_color(), dxf_layer_set_dictionary_owner_hard(), dxf_layer_set_dictionary_owner_soft(), dxf_layer_set_flag(), dxf_layer_set_id_code(), dxf_layer_set_layer_name(), dxf_layer_set_linetype(), dxf_layer_set_lineweight(), dxf_layer_set_material(), dxf_layer_set_next(), dxf_layer_set_plot_style_name(), and dxf_layer_set_plotting_flag().

Referenced by dxf_layer_read().

Here is the call graph for this function:

DxfLayer* dxf_layer_read ( DxfFile fp,
DxfLayer layer 
)

Read data from a DXF file into a DXF LAYER table.

The last line read from file contained the string "LAYER".
Now follows some data for the LAYER, to be terminated with a " 0" string announcing the following table, or the end of the TABLE section marker ENDTAB.
While parsing the DXF file store data in layer.

Returns:
a pointer to layer.
Parameters:
fpDXF file pointer to an input file (or device).
layerDXF LAYER table.

Definition at line 145 of file layer.c.

References _, dxf_file_struct::acad_version_number, AutoCAD_13, dxf_layer_struct::color, dxf_layer_struct::dictionary_owner_hard, dxf_layer_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LINETYPE, dxf_layer_init(), dxf_layer_new(), dxf_file_struct::filename, dxf_layer_struct::flag, dxf_file_struct::fp, dxf_layer_struct::layer_name, dxf_file_struct::line_number, dxf_layer_struct::linetype, dxf_layer_struct::lineweight, dxf_layer_struct::material, dxf_layer_struct::plot_style_name, and dxf_layer_struct::plotting_flag.

Here is the call graph for this function:

int dxf_layer_write ( DxfFile fp,
DxfLayer layer 
)

Write DXF output for a DXF LAYER table.

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).
layerDXF LAYER table.

Definition at line 318 of file layer.c.

References _, dxf_file_struct::acad_version_number, AutoCAD_14, AutoCAD_2000, AutoCAD_2007, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_DEFAULT_LINETYPE, dxf_layer_get_color(), dxf_layer_get_dictionary_owner_soft(), dxf_layer_get_flag(), dxf_layer_get_id_code(), dxf_layer_get_layer_name(), dxf_layer_get_linetype(), dxf_layer_get_lineweight(), dxf_layer_get_material(), dxf_layer_get_plot_style_name(), dxf_layer_get_plotting_flag(), dxf_layer_set_linetype(), dxf_file_struct::fp, and dxf_layer_struct::id_code.

Here is the call graph for this function:

int dxf_layer_free ( DxfLayer layer)

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

Returns:
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred.
Parameters:
layerPointer to the memory occupied by the DXF LAYER table.

Definition at line 431 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_layer_get_dictionary_owner_hard(), dxf_layer_get_dictionary_owner_soft(), dxf_layer_get_layer_name(), dxf_layer_get_linetype(), dxf_layer_get_material(), dxf_layer_get_plot_style_name(), and dxf_layer_struct::next.

Referenced by dxf_layer_free_chain().

Here is the call graph for this function:

void dxf_layer_free_chain ( DxfLayer layers)

Free the allocated memory for a chain of DXF LAYER tables and all their data fields.

Version:
According to DXF R10.
According to DXF R11.
According to DXF R12.
According to DXF R13.
According to DXF R14.
Parameters:
layerspointer to the chain of DXF LAYER tables.

Definition at line 482 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_layer_free(), and dxf_layer_struct::next.

Here is the call graph for this function:

int dxf_layer_get_id_code ( DxfLayer layer)

Get the ID code from a DXF LAYER entity.

Returns:
ID code.
Parameters:
layera pointer to a DXF LAYER entity.

Definition at line 515 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_struct::id_code.

Referenced by dxf_layer_write().

DxfLayer* dxf_layer_set_id_code ( DxfLayer layer,
int  id_code 
)

Set the ID code for a DXF LAYER entity.

Parameters:
layera pointer to a DXF LAYER entity.
id_codeIdentification number for the entity.
This is to be an unique (sequential) number in the DXF file.

Definition at line 550 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_struct::id_code.

Referenced by dxf_layer_init().

char* dxf_layer_get_layer_name ( DxfLayer layer)

Get the layer_name from a DXF LAYER entity.

Returns:
layer_name when sucessful, NULL when an error occurred.
Parameters:
layera pointer to a DXF LAYER entity.

Definition at line 592 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_struct::layer_name.

Referenced by dxf_layer_free(), and dxf_layer_write().

DxfLayer* dxf_layer_set_layer_name ( DxfLayer layer,
char *  layer_name 
)

Set the layer_name for a DXF LAYER entity.

Parameters:
layera pointer to a DXF LAYER entity.
layer_namea string containing the layer_name for the entity.

Definition at line 627 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_struct::layer_name.

Referenced by dxf_layer_init().

char* dxf_layer_get_linetype ( DxfLayer layer)

Get the linetype from a DXF LAYER entity.

Returns:
linetype when sucessful, NULL when an error occurred.
Parameters:
layera pointer to a DXF LAYER entity.

Definition at line 668 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_struct::linetype.

Referenced by dxf_layer_free(), and dxf_layer_write().

DxfLayer* dxf_layer_set_linetype ( DxfLayer layer,
char *  linetype 
)

Set the linetype for a DXF LAYER entity.

Parameters:
layera pointer to a DXF LAYER entity.
linetypea string containing the linetype for the entity.

Definition at line 703 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_struct::linetype.

Referenced by dxf_layer_init(), and dxf_layer_write().

int dxf_layer_get_color ( DxfLayer layer)

Get the color from a DXF LAYER entity.

Returns:
color.
Parameters:
layera pointer to a DXF LAYER entity.

Definition at line 743 of file layer.c.

References _, dxf_layer_struct::color, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_layer_write().

DxfLayer* dxf_layer_set_color ( DxfLayer layer,
int  color 
)

Set the color for a DXF LAYER entity.

Parameters:
layera pointer to a DXF LAYER entity.
colorthe color to be set for the entity.

Definition at line 777 of file layer.c.

References _, dxf_layer_struct::color, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_layer_init().

int dxf_layer_is_off ( DxfLayer layer)

Test if layer is off.

Returns:
TRUE when layer is off, or FALSE when layer is on, or (-1) when an error occurred.
Parameters:
layerDXF LAYER table.

Definition at line 817 of file layer.c.

References _, dxf_layer_struct::color, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and FALSE.

int dxf_layer_get_flag ( DxfLayer layer)

Get the flag from a DXF LAYER entity.

Returns:
flag.
Parameters:
layera pointer to a DXF LAYER entity.

Definition at line 850 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_struct::flag.

Referenced by dxf_layer_write().

DxfLayer* dxf_layer_set_flag ( DxfLayer layer,
int  flag 
)

Set the flag for a DXF LAYER entity.

Parameters:
layera pointer to a DXF LAYER entity.
flaga flag value for the entity.

Definition at line 885 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_struct::flag.

Referenced by dxf_layer_init().

int dxf_layer_is_frozen ( DxfLayer layer)

Test if layer is frozen.

Returns:
TRUE when layer is frozen, or FALSE when layer is thawed, or (-1) when an error occurred.
Parameters:
layerDXF LAYER table.

Definition at line 926 of file layer.c.

References _, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, DXF_DEBUG_END, FALSE, and dxf_layer_struct::flag.

int dxf_layer_is_locked ( DxfLayer layer)

Test if layer is locked.

Returns:
TRUE when layer is locked, or FALSE when layer is not locked, or (-1) when an error occurred.
Parameters:
layerDXF LAYER table.

Definition at line 961 of file layer.c.

References _, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, DXF_DEBUG_END, FALSE, and dxf_layer_struct::flag.

int dxf_layer_is_xreferenced ( DxfLayer layer)

Test if layer is externally dependent on an xref.

Returns:
TRUE when layer is externally dependent on an xref, or FALSE when layer is not externally dependent on an xref, or (-1) when an error occurred.
Parameters:
layerDXF LAYER table.

Definition at line 996 of file layer.c.

References _, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, DXF_DEBUG_END, FALSE, and dxf_layer_struct::flag.

int dxf_layer_is_xresolved ( DxfLayer layer)

Test if layer is externally dependent on a xref and has been successfully resolved.

Returns:
TRUE when layer is externally dependent on a xref and has been successfully resolved, or FALSE when layer is not externally dependent on a xref and has not been successfully resolved, or (-1) when an error occurred.
Parameters:
layerDXF LAYER table.

Definition at line 1033 of file layer.c.

References _, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, DXF_DEBUG_END, FALSE, and dxf_layer_struct::flag.

int dxf_layer_is_referenced ( DxfLayer layer)

Test if layer is internally referenced by an entity.

Returns:
TRUE when layer is internally referenced by an entity, or FALSE when layer is not internally referenced by an entity, or (-1) when an error occurred.
Parameters:
layerDXF LAYER table.

Definition at line 1069 of file layer.c.

References _, DXF_CHECK_BIT, DXF_DEBUG_BEGIN, DXF_DEBUG_END, FALSE, and dxf_layer_struct::flag.

int dxf_layer_get_plotting_flag ( DxfLayer layer)

Get the plotting_flag from a DXF LAYER entity.

Returns:
flag.
Parameters:
layera pointer to a DXF LAYER entity.

Definition at line 1102 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_struct::plotting_flag.

Referenced by dxf_layer_write().

DxfLayer* dxf_layer_set_plotting_flag ( DxfLayer layer,
int  plotting_flag 
)

Set the plotting_flag for a DXF LAYER entity.

Parameters:
layera pointer to a DXF LAYER entity.
plotting_flaga plotting_flag value for the entity.

Definition at line 1137 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_struct::plotting_flag.

Referenced by dxf_layer_init().

char* dxf_layer_get_dictionary_owner_soft ( DxfLayer layer)

Get the soft pointer to the dictionary owner from a DXF LAYER entity.

Returns:
soft pointer to the dictionary owner.
Warning:
No checks are performed on the returned pointer (string).
Parameters:
layera pointer to a DXF LAYER entity.

Definition at line 1180 of file layer.c.

References _, dxf_layer_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_layer_free(), and dxf_layer_write().

DxfLayer* dxf_layer_set_dictionary_owner_soft ( DxfLayer layer,
char *  dictionary_owner_soft 
)

Set the pointer to the dictionary_owner_soft for a DXF LAYER entity.

Parameters:
layera pointer to a DXF LAYER entity.
dictionary_owner_softa string containing the pointer to the dictionary_owner_soft for the entity.

Definition at line 1216 of file layer.c.

References _, dxf_layer_struct::dictionary_owner_soft, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_layer_init().

char* dxf_layer_get_material ( DxfLayer layer)

Get the pointer to the material from a DXF LAYER entity.

Returns:
a pointer to material when successful, or NULL when an error occurred.
Warning:
No checks are performed on the returned pointer.
Parameters:
layera pointer to a DXF LAYER entity.

Definition at line 1260 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_struct::material.

Referenced by dxf_layer_free(), and dxf_layer_write().

DxfLayer* dxf_layer_set_material ( DxfLayer layer,
char *  material 
)

Set the pointer to the material for a DXF LAYER entity.

Returns:
a pointer to layer when successful, or NULL when an error occurred.
Parameters:
layera pointer to a DXF LAYER entity.
materiala string containing the pointer to the material for the entity.

Definition at line 1298 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_struct::material.

Referenced by dxf_layer_init().

char* dxf_layer_get_dictionary_owner_hard ( DxfLayer layer)

Get the hard pointer to the dictionary owner from a DXF LAYER entity.

Returns:
hard pointer to the dictionary owner.
Warning:
No checks are performed on the returned pointer (string).
Parameters:
layera pointer to a DXF LAYER entity.

Definition at line 1342 of file layer.c.

References _, dxf_layer_struct::dictionary_owner_hard, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_layer_free().

DxfLayer* dxf_layer_set_dictionary_owner_hard ( DxfLayer layer,
char *  dictionary_owner_hard 
)

Set the pointer to the dictionary_owner_hard for a DXF LAYER entity.

Parameters:
layera pointer to a DXF LAYER entity.
dictionary_owner_harda string containing the pointer to the dictionary_owner_hard for the entity.

Definition at line 1378 of file layer.c.

References _, dxf_layer_struct::dictionary_owner_hard, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_layer_init().

int16_t dxf_layer_get_lineweight ( DxfLayer layer)

Get the lineweight from a DXF LAYER entity.

Returns:
lineweight when successful, or EXIT_FAILURE when an error occurred.
Parameters:
layera pointer to a DXF LAYER entity.

Definition at line 1420 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_struct::lineweight.

Referenced by dxf_layer_write().

DxfLayer* dxf_layer_set_lineweight ( DxfLayer layer,
int16_t  lineweight 
)

Set the lineweight for a DXF LAYER entity.

Returns:
a pointer to layer when successful, or NULL when an error occurred.
Parameters:
layera pointer to a DXF LAYER entity.
lineweightthe lineweight to be set for the entity.

Definition at line 1451 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_struct::lineweight.

Referenced by dxf_layer_init().

char* dxf_layer_get_plot_style_name ( DxfLayer layer)

Get the plot_style_name from a DXF LAYER entity.

Returns:
a pointer to plot_style_name when sucessful, or NULL when an error occurred.
Parameters:
layera pointer to a DXF LAYER entity.

Definition at line 1485 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_struct::plot_style_name.

Referenced by dxf_layer_free(), and dxf_layer_write().

DxfLayer* dxf_layer_set_plot_style_name ( DxfLayer layer,
char *  plot_style_name 
)

Set the plot_style_name for a DXF LAYER entity.

Returns:
a pointer to layer when successful, or NULL when an error occurred.
Parameters:
layera pointer to a DXF LAYER entity.
plot_style_namea string containing the plot_style_name for the entity.

Definition at line 1523 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_struct::plot_style_name.

Referenced by dxf_layer_init().

DxfLayer* dxf_layer_get_next ( DxfLayer layer)

Get the pointer to the next LAYER entity from a DXF LAYER entity.

Returns:
pointer to the next LAYER entity.
Warning:
No checks are performed on the returned pointer.
Parameters:
layera pointer to a DXF LAYER entity.

Definition at line 1567 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_struct::next.

DxfLayer* dxf_layer_set_next ( DxfLayer layer,
DxfLayer next 
)

Set the pointer to the next LAYER for a DXF LAYER entity.

Parameters:
layera pointer to a DXF LAYER entity.
nexta pointer to the next LAYER for the entity.

Definition at line 1603 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_struct::next.

Referenced by dxf_layer_init().

DxfLayer* dxf_layer_get_last ( DxfLayer layer)

Get the pointer to the last LAYER entity from a linked list of DXF LAYER entities.

Returns:
pointer to the last LAYER entity.
Warning:
No checks are performed on the returned pointer.
Parameters:
layera pointer to a DXF LAYER entity.

Definition at line 1646 of file layer.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_layer_struct::next.