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

block.h

Go to the documentation of this file.
00001 
00044 #ifndef LIBDXF_SRC_BLOCK_H
00045 #define LIBDXF_SRC_BLOCK_H
00046 
00047 
00048 #include "global.h"
00049 #include "util.h"
00050 #include "endblk.h"
00051 #include "point.h"
00052 
00053 
00054 #ifdef __cplusplus
00055 extern "C" {
00056 #endif
00057 
00058 
00079 typedef struct
00080 dxf_block_struct
00081 {
00082         char *xref_name;
00085         char *block_name;
00088         char *block_name_additional;
00091         char *description;
00094         int id_code;
00099         char *layer;
00103         DxfPoint *p0;
00106         int block_type;
00121         double extr_x0;
00125         double extr_y0;
00129         double extr_z0;
00133         char *dictionary_owner_soft;
00137         struct DxfEndblk *endblk;
00139         struct DxfBlock *next;
00143 } DxfBlock;
00144 
00145 
00146 DxfBlock *dxf_block_new ();
00147 DxfBlock *dxf_block_init (DxfBlock *block);
00148 DxfBlock *dxf_block_read (DxfFile *fp, DxfBlock *block);
00149 int dxf_block_write (DxfFile *fp, DxfBlock *block);
00150 int dxf_block_write_endblk (DxfFile *fp);
00151 int dxf_block_write_table (DxfFile *fp, DxfBlock *blocks_list);
00152 int dxf_block_free (DxfBlock *block);
00153 void dxf_block_free_chain (DxfBlock *blocks);
00154 char *dxf_block_get_xref_name (DxfBlock *block);
00155 DxfBlock *dxf_block_set_xref_name (DxfBlock *block, char *xref_name);
00156 char *dxf_block_get_block_name (DxfBlock *block);
00157 DxfBlock *dxf_block_set_block_name (DxfBlock *block, char *block_name);
00158 char *dxf_block_get_block_name_additional (DxfBlock *block);
00159 DxfBlock *dxf_block_set_block_name_additional (DxfBlock *block, char *block_name_additional);
00160 char *dxf_block_get_description (DxfBlock *block);
00161 DxfBlock *dxf_block_set_description (DxfBlock *block, char *description);
00162 int dxf_block_get_id_code (DxfBlock *block);
00163 DxfBlock *dxf_block_set_id_code (DxfBlock *block, int id_code);
00164 char *dxf_block_get_layer (DxfBlock *block);
00165 DxfBlock *dxf_block_set_layer (DxfBlock *block, char *layer);
00166 DxfPoint *dxf_block_get_p0 (DxfBlock *block);
00167 DxfBlock *dxf_block_set_p0 (DxfBlock *block, DxfPoint *p0);
00168 double dxf_block_get_x0 (DxfBlock *block);
00169 DxfBlock *dxf_block_set_x0 (DxfBlock *block, double x0);
00170 double dxf_block_get_y0 (DxfBlock *block);
00171 DxfBlock *dxf_block_set_y0 (DxfBlock *block, double y0);
00172 double dxf_block_get_z0 (DxfBlock *block);
00173 DxfBlock *dxf_block_set_z0 (DxfBlock *block, double z0);
00174 int dxf_block_get_block_type (DxfBlock *block);
00175 DxfBlock *dxf_block_set_block_type (DxfBlock *block, int block_type);
00176 int dxf_block_is_anonymous (DxfBlock *block);
00177 int dxf_block_has_attributes (DxfBlock *block);
00178 int dxf_block_is_xreferenced (DxfBlock *block);
00179 int dxf_block_is_xdependent (DxfBlock *block);
00180 int dxf_block_is_xresolved (DxfBlock *block);
00181 int dxf_block_is_referenced (DxfBlock *block);
00182 double dxf_block_get_extr_x0 (DxfBlock *block);
00183 DxfBlock *dxf_block_set_extr_x0 (DxfBlock *block, double extr_x0);
00184 double dxf_block_get_extr_y0 (DxfBlock *block);
00185 DxfBlock *dxf_block_set_extr_y0 (DxfBlock *block, double extr_y0);
00186 double dxf_block_get_extr_z0 (DxfBlock *block);
00187 DxfBlock *dxf_block_set_extr_z0 (DxfBlock *block, double extr_z0);
00188 DxfPoint *dxf_block_get_extrusion_vector_as_point (DxfBlock *block);
00189 DxfBlock *dxf_block_set_extrusion_vector (DxfBlock *block, double extr_x0, double extr_y0, double extr_z0);
00190 char *dxf_block_get_dictionary_owner_soft (DxfBlock *block);
00191 DxfBlock *dxf_block_set_dictionary_owner_soft (DxfBlock *block, char *dictionary_owner_soft);
00192 struct DxfEndblk *dxf_block_get_endblk (DxfBlock *block);
00193 DxfBlock *dxf_block_set_endblk (DxfBlock *block, struct DxfEndblk *endblk);
00194 DxfBlock *dxf_block_get_next (DxfBlock *block);
00195 DxfBlock *dxf_block_set_next (DxfBlock *block, DxfBlock *next);
00196 DxfBlock *dxf_block_get_last (DxfBlock *block);
00197 
00198 
00199 #ifdef __cplusplus
00200 }
00201 #endif
00202 
00203 
00204 #endif /* LIBDXF_SRC_BLOCK_H */
00205 
00206 
00207 /* EOF */