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

binary_entity_data.h File Reference

Header file for a DXF binary entity data object. More...

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

Go to the source code of this file.

Data Structures

struct  dxf_binary_entity_data_struct
 DXF definition of an AutoCAD binary entity data object. More...

Typedefs

typedef struct
dxf_binary_entity_data_struct 
DxfBinaryEntityData
 DXF definition of an AutoCAD binary entity data object.

Functions

DxfBinaryEntityDatadxf_binary_entity_data_new ()
 Allocate memory for a binary entity data object.
DxfBinaryEntityDatadxf_binary_entity_data_init (DxfBinaryEntityData *data)
 Allocate memory and initialize data fields in a binary entity data entity.
int dxf_binary_entity_data_write (DxfFile *fp, DxfBinaryEntityData *data)
 Write DXF output to fp for a binary entity data object.
int dxf_binary_entity_data_free (DxfBinaryEntityData *data)
 Free the allocated memory for a binary entity data object and all it's data fields.
void dxf_binary_entity_data_free_chain (DxfBinaryEntityData *data)
 Free the allocated memory for a chain of binary entity data bobjects and all their data fields.
char * dxf_binary_entity_data_get_data_line (DxfBinaryEntityData *data)
 Get the data_line from a binary entity data object.
DxfBinaryEntityDatadxf_binary_entity_data_set_data_line (DxfBinaryEntityData *data, char *data_line)
 Set the data_line for a binary entity data object.
int dxf_binary_entity_data_get_length (DxfBinaryEntityData *data)
 Get the length from a binary entity data object.
DxfBinaryEntityDatadxf_binary_entity_data_set_length (DxfBinaryEntityData *data, int length)
 Set the length for a binary entity data object.
DxfBinaryEntityDatadxf_binary_entity_data_get_next (DxfBinaryEntityData *data)
 Get the pointer to the next binary entity data object from a binary entity data object.
DxfBinaryEntityDatadxf_binary_entity_data_set_next (DxfBinaryEntityData *data, DxfBinaryEntityData *next)
 Set the pointer to the next binary entity data for a binary entity data entity.
DxfBinaryEntityDatadxf_binary_entity_data_get_last (DxfBinaryEntityData *data)
 Get the pointer to the last binary entity data object from a linked list of binary entity data objects.

Detailed Description

Header file for a DXF binary entity data object.

Author:
Copyright (C) 2016 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 binary_entity_data.h.


Typedef Documentation

DXF definition of an AutoCAD binary entity data object.


Function Documentation

DxfBinaryEntityData* dxf_binary_entity_data_new ( )

Allocate memory for a binary entity data object.

Fill the memory contents with zeros.

Definition at line 44 of file binary_entity_data.c.

References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_acad_proxy_entity_init(), and dxf_binary_entity_data_init().

DxfBinaryEntityData* dxf_binary_entity_data_init ( DxfBinaryEntityData data)

Allocate memory and initialize data fields in a binary entity data entity.

Returns:
NULL when no memory was allocated, a pointer to the allocated memory when succesful.
Parameters:
dataa pointer to the binary entity data object.

Definition at line 82 of file binary_entity_data.c.

References _, dxf_binary_entity_data_new(), dxf_binary_entity_data_set_data_line(), dxf_binary_entity_data_set_next(), DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_acad_proxy_entity_init().

Here is the call graph for this function:

int dxf_binary_entity_data_write ( DxfFile fp,
DxfBinaryEntityData data 
)

Write DXF output to fp for a binary entity data object.

Returns:
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred.
Parameters:
fpfile pointer to output file (or device).
dataa pointer to the binary entity data object.

Definition at line 122 of file binary_entity_data.c.

References _, dxf_binary_entity_data_struct::data_line, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_file_struct::fp.

int dxf_binary_entity_data_free ( DxfBinaryEntityData data)

Free the allocated memory for a binary entity data object and all it's data fields.

Returns:
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred.
Parameters:
dataPointer to the memory occupied by the binary entity data entity.

Definition at line 158 of file binary_entity_data.c.

References _, dxf_binary_entity_data_struct::data_line, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_binary_entity_data_struct::next.

Referenced by dxf_binary_entity_data_free_chain().

void dxf_binary_entity_data_free_chain ( DxfBinaryEntityData data)

Free the allocated memory for a chain of binary entity data bobjects and all their data fields.

Parameters:
datapointer to the chain of DXF HATCH binary entity data objects.

Definition at line 198 of file binary_entity_data.c.

References _, dxf_binary_entity_data_free(), DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_binary_entity_data_struct::next.

Here is the call graph for this function:

char* dxf_binary_entity_data_get_data_line ( DxfBinaryEntityData data)

Get the data_line from a binary entity data object.

Returns:
data_line when sucessful, NULL when an error occurred.
Parameters:
dataa pointer to a binary entity data object.

Definition at line 233 of file binary_entity_data.c.

References _, dxf_binary_entity_data_struct::data_line, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

DxfBinaryEntityData* dxf_binary_entity_data_set_data_line ( DxfBinaryEntityData data,
char *  data_line 
)

Set the data_line for a binary entity data object.

Parameters:
dataa pointer to a binary entity data object.
data_linea string containing the data_line for the entity.

Definition at line 268 of file binary_entity_data.c.

References _, dxf_binary_entity_data_struct::data_line, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_binary_entity_data_init().

int dxf_binary_entity_data_get_length ( DxfBinaryEntityData data)

Get the length from a binary entity data object.

Returns:
length.
Parameters:
dataa pointer to a binary entity data object.

Definition at line 308 of file binary_entity_data.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_binary_entity_data_struct::length.

DxfBinaryEntityData* dxf_binary_entity_data_set_length ( DxfBinaryEntityData data,
int  length 
)

Set the length for a binary entity data object.

Returns:
a pointer to data when sucessful, NULL when an error occurred.
Parameters:
dataa pointer to a binary entity data object.
lengthLength to be set for the entity.

Definition at line 346 of file binary_entity_data.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_binary_entity_data_struct::length.

DxfBinaryEntityData* dxf_binary_entity_data_get_next ( DxfBinaryEntityData data)

Get the pointer to the next binary entity data object from a binary entity data object.

Returns:
pointer to the next binary entity data object.
Warning:
No checks are performed on the returned pointer.
Parameters:
dataa pointer to a binary entity data object.

Definition at line 389 of file binary_entity_data.c.

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

DxfBinaryEntityData* dxf_binary_entity_data_set_next ( DxfBinaryEntityData data,
DxfBinaryEntityData next 
)

Set the pointer to the next binary entity data for a binary entity data entity.

Parameters:
dataa pointer to a binary entity data object.
nexta pointer to the next binary entity data for the entity.

Definition at line 425 of file binary_entity_data.c.

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

Referenced by dxf_binary_entity_data_init().

DxfBinaryEntityData* dxf_binary_entity_data_get_last ( DxfBinaryEntityData data)

Get the pointer to the last binary entity data object from a linked list of binary entity data objects.

Returns:
pointer to the last binary entity data object.
Warning:
No checks are performed on the returned pointer.
Parameters:
dataa pointer to a binary entity data object.

Definition at line 469 of file binary_entity_data.c.

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