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

proprietary_data.h File Reference

Header file for a DXF proprietary data entity. More...

#include "global.h"
Include dependency graph for proprietary_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_proprietary_data_struct
 DXF definition of an AutoCAD Proprietary data entity. More...

Typedefs

typedef struct
dxf_proprietary_data_struct 
DxfProprietaryData
 DXF definition of an AutoCAD Proprietary data entity.

Functions

DxfProprietaryDatadxf_proprietary_data_new ()
 Allocate memory for a DXF DxfProprietaryData object.
DxfProprietaryDatadxf_proprietary_data_init (DxfProprietaryData *data)
 Allocate memory and initialize data fields in a DXF DxfProprietaryData object.
int dxf_proprietary_data_free (DxfProprietaryData *data)
 Free the allocated memory for a DXF DxfProprietaryData object and all it's data fields.
void dxf_proprietary_data_free_chain (DxfProprietaryData *datas)
 Free the allocated memory for a chain of DXF DxfProprietaryData objects and all their data fields.
int dxf_proprietary_data_get_order (DxfProprietaryData *data)
 Get the incremental counter order from a DXF DxfProprietaryData object.
DxfProprietaryDatadxf_proprietary_data_set_order (DxfProprietaryData *data, int order)
 Set the incremental counter order for a DXF DxfProprietaryData object.
char * dxf_proprietary_data_get_line (DxfProprietaryData *data)
 Get the line from a DXF DxfProprietaryData object.
DxfProprietaryDatadxf_proprietary_data_set_line (DxfProprietaryData *data, char *line)
 Set the line for a DXF DxfProprietaryData object.
int dxf_proprietary_data_get_length (DxfProprietaryData *data)
 Get the length of the line from a DXF DxfProprietaryData object.
int dxf_proprietary_data_test_length (DxfProprietaryData *data)
 Test the length of the string in the line member from a DXF DxfProprietaryData object.
DxfProprietaryDatadxf_proprietary_data_set_length (DxfProprietaryData *data, int length)
 Set the length of the line for a DXF DxfProprietaryData object.
DxfProprietaryDatadxf_proprietary_data_get_next (DxfProprietaryData *data)
 Get the pointer to the next DxfProprietaryData object from a DXF DxfProprietaryData object.
DxfProprietaryDatadxf_proprietary_data_set_next (DxfProprietaryData *data, DxfProprietaryData *next)
 Set the pointer to the next DxfProprietaryData object for a DXF DxfProprietaryData object.
DxfProprietaryDatadxf_proprietary_data_get_last (DxfProprietaryData *data)
 Get the pointer to the last DxfProprietaryData object from a linked list of DXF DxfProprietaryData objects.

Detailed Description

Header file for a DXF proprietary data entity.

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


Typedef Documentation

DXF definition of an AutoCAD Proprietary data entity.


Function Documentation

DxfProprietaryData* dxf_proprietary_data_new ( )

Allocate memory for a DXF DxfProprietaryData object.

Fill the memory contents with zeros.

Definition at line 44 of file proprietary_data.c.

References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_proprietary_data_init().

DxfProprietaryData* dxf_proprietary_data_init ( DxfProprietaryData data)

Allocate memory and initialize data fields in a DXF DxfProprietaryData object.

Returns:
NULL when no memory was allocated, a pointer to the allocated memory when succesful.
Parameters:
datapointer to a DXF DxfProprietaryData object.

Definition at line 82 of file proprietary_data.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_proprietary_data_new(), dxf_proprietary_data_struct::line, and dxf_proprietary_data_struct::next.

Referenced by dxf_3dsolid_init(), dxf_3dsolid_read(), dxf_body_init(), and dxf_body_read().

Here is the call graph for this function:

int dxf_proprietary_data_free ( DxfProprietaryData data)

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

Returns:
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred.
Parameters:
dataa pointer to the memory occupied by the DXF DxfProprietaryData object.

Definition at line 123 of file proprietary_data.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_proprietary_data_struct::line, and dxf_proprietary_data_struct::next.

Referenced by dxf_proprietary_data_free_chain().

void dxf_proprietary_data_free_chain ( DxfProprietaryData datas)

Free the allocated memory for a chain of DXF DxfProprietaryData objects and all their data fields.

Parameters:
datasa pointer to the chain of DXF DxfProprietaryData objects.

Definition at line 163 of file proprietary_data.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_proprietary_data_free(), and dxf_proprietary_data_struct::next.

Referenced by dxf_3dsolid_free(), and dxf_body_free().

Here is the call graph for this function:

int dxf_proprietary_data_get_order ( DxfProprietaryData data)

Get the incremental counter order from a DXF DxfProprietaryData object.

Returns:
incremental counter order.
Parameters:
dataa pointer to a DXF DxfProprietaryData entity.

Definition at line 198 of file proprietary_data.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_proprietary_data_struct::order.

DxfProprietaryData* dxf_proprietary_data_set_order ( DxfProprietaryData data,
int  order 
)

Set the incremental counter order for a DXF DxfProprietaryData object.

Parameters:
dataa pointer to a DXF DxfProprietaryData object.
orderincremental counter order.

Definition at line 234 of file proprietary_data.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_proprietary_data_struct::order.

char* dxf_proprietary_data_get_line ( DxfProprietaryData data)

Get the line from a DXF DxfProprietaryData object.

Returns:
line when sucessful, or NULL when an error occurred.
Parameters:
dataa pointer to a DXF DxfProprietaryData object.

Definition at line 274 of file proprietary_data.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_proprietary_data_struct::line.

Referenced by dxf_3dsolid_write(), and dxf_body_write().

DxfProprietaryData* dxf_proprietary_data_set_line ( DxfProprietaryData data,
char *  line 
)

Set the line for a DXF DxfProprietaryData object.

Returns:
a pointer to data when successful, or NULL when an error occurred.
Parameters:
dataa pointer to a DXF DxfProprietaryData object.
linea string containing the line for the object.

Definition at line 312 of file proprietary_data.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, and dxf_proprietary_data_struct::line.

int dxf_proprietary_data_get_length ( DxfProprietaryData data)

Get the length of the line from a DXF DxfProprietaryData object.

Returns:
length.
Parameters:
dataa pointer to a DXF DxfProprietaryData entity.

Definition at line 353 of file proprietary_data.c.

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

int dxf_proprietary_data_test_length ( DxfProprietaryData data)

Test the length of the string in the line member from a DXF DxfProprietaryData object.

Returns:
EXIT_SUCCESS when the found length in the line member matched the value in the length member, and EXIT_FAILURE when an error occurred.
Note:
This function does not alter the contents of the DXF DxfProprietaryData object.
Parameters:
dataa pointer to a DXF DxfProprietaryData object.

Definition at line 402 of file proprietary_data.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, DXF_MAX_STRING_LENGTH, dxf_proprietary_data_struct::length, and dxf_proprietary_data_struct::line.

DxfProprietaryData* dxf_proprietary_data_set_length ( DxfProprietaryData data,
int  length 
)

Set the length of the line for a DXF DxfProprietaryData object.

Parameters:
dataa pointer to a DXF DxfProprietaryData object.
lengthlength.

Definition at line 468 of file proprietary_data.c.

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

DxfProprietaryData* dxf_proprietary_data_get_next ( DxfProprietaryData data)

Get the pointer to the next DxfProprietaryData object from a DXF DxfProprietaryData object.

Returns:
pointer to the next DxfProprietaryData object.
Warning:
No checks are performed on the returned pointer.
Parameters:
dataa pointer to a DXF DxfProprietaryData object.

Definition at line 511 of file proprietary_data.c.

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

Referenced by dxf_3dsolid_write(), and dxf_body_write().

DxfProprietaryData* dxf_proprietary_data_set_next ( DxfProprietaryData data,
DxfProprietaryData next 
)

Set the pointer to the next DxfProprietaryData object for a DXF DxfProprietaryData object.

Returns:
a pointer to data when successful, or NULL when an error occurred.
Parameters:
dataa pointer to a DXF DxfProprietaryData object.
nexta pointer to the next DxfProprietaryData object for the object.

Definition at line 550 of file proprietary_data.c.

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

DxfProprietaryData* dxf_proprietary_data_get_last ( DxfProprietaryData data)

Get the pointer to the last DxfProprietaryData object from a linked list of DXF DxfProprietaryData objects.

Returns:
pointer to the last DxfProprietaryData object.
Warning:
No checks are performed on the returned pointer.
Parameters:
dataa pointer to a DXF DxfProprietaryData object.

Definition at line 594 of file proprietary_data.c.

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