libDXF 0.0.1
A library with DXF related functions written in C.
Functions

tables.c File Reference

Functions for a DXF tables section (TABLES). More...

#include "tables.h"
#include "section.h"
Include dependency graph for tables.c:

Go to the source code of this file.

Functions

DxfTablesdxf_tables_new ()
 Allocate memory for a DXF TABLES section.
DxfTablesdxf_tables_init (DxfTables *tables)
 Allocate memory and initialize data fields in a DXF TABLES section.
int dxf_tables_write (DxfFile *fp, DxfTables *tables)
 Write DXF output to a file for a table section.
int dxf_tables_free (DxfTables *tables)
 Free the allocated memory for a DXF TABLE and all it's data fields.

Detailed Description

Functions for a DXF tables section (TABLES).

Author:
Copyright (C) 2014, 2015, 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 tables.c.


Function Documentation

DxfTables* dxf_tables_new ( )

Allocate memory for a DXF TABLES section.

Fill the memory contents with zeros.

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

Definition at line 48 of file tables.c.

References _, DXF_DEBUG_BEGIN, and DXF_DEBUG_END.

Referenced by dxf_tables_init().

DxfTables* dxf_tables_init ( DxfTables tables)

Allocate memory and initialize data fields in a DXF TABLES section.

Returns:
NULL when no memory was allocated, a pointer to the allocated memory when succesful.
Parameters:
tablesDXF tables section.

Definition at line 86 of file tables.c.

References _, dxf_tables::appids, dxf_tables::block_records, dxf_tables::dimstyles, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_tables_new(), dxf_tables::layers, dxf_tables::ltypes, dxf_tables::max_table_entries, dxf_tables::styles, dxf_tables::ucss, dxf_tables::views, and dxf_tables::vports.

Here is the call graph for this function:

int dxf_tables_write ( DxfFile fp,
DxfTables tables 
)

Write DXF output to a file for a table section.

Returns:
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred.

Todo:
Add code here

Parameters:
fpDXF file pointer to an output file (or device).
tablesDXF table section.

Definition at line 134 of file tables.c.

References _, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_endsec_write(), and dxf_section_write().

Here is the call graph for this function:

int dxf_tables_free ( DxfTables tables)

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

Returns:
EXIT_SUCCESS when done, or EXIT_FAILURE when an error occurred.
Parameters:
tablesDXF table section.

Definition at line 175 of file tables.c.

References _, dxf_tables::appids, dxf_tables::block_records, dxf_tables::dimstyles, DXF_DEBUG_BEGIN, DXF_DEBUG_END, dxf_tables::layers, dxf_tables::ltypes, dxf_tables::styles, dxf_tables::ucss, dxf_tables::views, and dxf_tables::vports.