gCAD3D 2.40
ut_ox_base.c File Reference

complex-object manipulationes (transform, convert ..) (OGX_) More...

#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include "../ut/ut_cast.h"
#include "../ut/ut_geo.h"
#include "../ut/ut_gtypes.h"
#include "../ut/ut_obj.h"
#include "../ut/ut_memTab.h"
#include "../ut/ut_txt.h"
#include "../ut/ut_ox_base.h"

Data Structures

struct  Relocdat
 relocationDataRecord More...
 

Macros

#define INCLUDE_FULL
 

Functions

int OGX_deloc_adr (void **vpt, Relocdat *rd)
 
 typedef_MemTab (ObjRange)
 
int OGX_ox_ato1 (ObjGX *oxo, int *ausTyp, double *ausTab)
 
ObjGXOGX_oxm_copy_obj (Memspc *mSpo, void *obji, int typ, int iNr, int isolate)
 
ObjGXOGX_oxm_copy_ox (Memspc *mSpo, ObjGX *oTab, int iNr, int isolate)
 
int OGX_ox_copy__ (void *objo, long *oSiz, void *obji, int isolate)
 
int OGX_ox_copy_obj (void **objo, long *oSiz, void *obji, int typ, int iNr, int isolate)
 
int OGX_ck_reloc (int typ)
 
int OGX_deloc__ (ObjGX *oxi, long mSiz)
 
int OGX_reloc__ (ObjGX *oxi, long mSiz)
 
int OGX_reloc_ox (void *obj1, int typ, int iNr, Relocdat *rd)
 
int OGX_reloc_adr (void **vpt, Relocdat *rd)
 
long OGX_siz__ (ObjGX *oxi, int isolate)
 
int OGX_siz_obj (long *oSiz, void *obj1, int typ, int iNr, int isolate)
 
int OGX_DEB_dump__ (void *obj1)
 
int OGX_DEB_dump_obj (void *obj1, int typ, int iNr, int deloc)
 
int OGX_DEB_dump_stru (void *obj, int typ, char *txt)
 

Detailed Description

complex-object manipulationes (transform, convert ..) (OGX_)

=====================================================
List_functions_start:
OGX_SET_OBJ complexObject from binObj (typ,form,siz,dat)
OGX_SET_OBJ_aux complexObject from binObj with aux
OGX_SET_INDEX complexObject from DB-Obj (dbTyp,dbInd) (form=Typ_Index)
OGX_GET_INDEX get DB-typ and DB-index out of complexObject
OGX_SET_INT complexObject from typ=int data=int (form=Typ_Int4)
OGX_GET_INT get index out of complexObject (long from data-pointer)
OGX_SET_Float8 complexObject from (typ, float8)
OGX_SET_COLOR complexObject from ColRGB
OGX_NUL empty complexObject (_OGX_NUL)
OGX_ox_copy_ox complexObj-group from a group of objs.
OGX_ox_ato1 complexObj from 1 atomicObj (ausTyp/ausTab)
OGX_oxm_copy_ox copy iNr complexObjects into Memspc (serialize)
OGX_oxm_copy_obj copy (serialize) obj into a Memspc
OGX_ox_copy__ copy (serialize) a ObjGX-Tree into a single memChunk.
OGX_ck_reloc check if struct is relocatable without modifications
OGX_deloc__ serialize (make all pointers relative)
OGX_reloc__ deserialize (relocate all pointers)
OGX_reloc_ox relocate objTree.
OGX_reloc_adr relocate a pointer.
OGX_siz__ return size of complete ObjGX-Tree;
OGX_siz_obj return size of complete ObjGX-Tree;
OGX_DEB_dump_stru dump stru and its pointers, do not resolve.
-------------- TESTFUNCTIONS --------------
OGX_tst__ test
OGX_tst_load_ox get a test-ObjGX-tree
List_functions_end:
=====================================================

Macro Definition Documentation

#define INCLUDE_FULL

Function Documentation

int OGX_deloc_adr ( void **  vpt,
Relocdat rd 
)
typedef_MemTab ( ObjRange  )
int OGX_ox_ato1 ( ObjGX oxo,
int *  ausTyp,
double *  ausTab 
)
* OGX_ox_ato1 complexObj from 1 atomicObj (ausTyp/ausTab)
*
* Output:
* RetCod: pointer to the complexObj inside mSp1
*
* typical complexObj-Records:
* Typ_Val Typ_Val ((double*)*value) ((double)value)
* Typ_<typ> Typ_Index ((int)DB-ind)
*
*
ObjGX* OGX_oxm_copy_obj ( Memspc mSpo,
void *  obji,
int  typ,
int  iNr,
int  isolate 
)
ObjGX* OGX_oxm_copy_ox ( Memspc mSpo,
ObjGX oTab,
int  iNr,
int  isolate 
)
* copy iNr complexObjects into Memspc (serialize, no delocate)
* Input:
* oTab iNr complexObjects
* iNr size of oTab
* isolate 0=do not resolv (copy) DB-objects; 1=copy the data of DB-objects
* Output:
* mSpo
* RetCod: NULL Error (not enough mem in mSpo)
* else adress of primary struct ObjGX in mSpo
*
int OGX_ox_copy__ ( void *  objo,
long *  oSiz,
void *  obji,
int  isolate 
)
* copy (serialize) a ObjGX-Tree into a single memChunk.
* Does not resolve DB-Objects (see isolate).
* Does not delocate (see OGX_deloc__).
* Input:
* obji complexObj to be copied
* objo where to save obji
* oSiz free space at objo
* isolate 0=do not resolv (copy) DB-objects; 1=copy the data of DB-objects
* Output:
* objo copy of obji
* oSiz oSiz is reduced (new free size)
* RetCode:
* -1 out of memory-Error
* else size of data stored in objo
*
* see also UTO_copy_tab DB_store_obj UTRA_app_obj UTO_write_obj
*
int OGX_ox_copy_obj ( void **  objo,
long *  oSiz,
void *  obji,
int  typ,
int  iNr,
int  isolate 
)
* copy (serialize) a ObjGX-Tree into a single memChunk.
* Does not delocate (see OGX_deloc__).
* Input:
* obji struct(s) of type <typ> to be copied
* typ type of struct of obji
* objo copy of obji
* oSiz free space at objo
* isolate 0=do not resolv (copy) DB-objects; 1=copy the data of DB-objects
* Output:
* objo next free position
* oSiz oSiz is reduced (new free size)
* RetCode:
* -1 out of memory-Error
*
* see also UTO_copy_tab DB_store_obj UTRA_app_obj UTO_write_obj
*
int OGX_ck_reloc ( int  typ)
int OGX_deloc__ ( ObjGX oxi,
long  mSiz 
)
int OGX_reloc__ ( ObjGX oxi,
long  mSiz 
)
int OGX_reloc_ox ( void *  obj1,
int  typ,
int  iNr,
Relocdat rd 
)
* delocate objTree.
* make all pointers relativ to rd->oPos (the startPos of this objTree).
*
int OGX_reloc_adr ( void **  vpt,
Relocdat rd 
)
long OGX_siz__ ( ObjGX oxi,
int  isolate 
)
int OGX_siz_obj ( long *  oSiz,
void *  obj1,
int  typ,
int  iNr,
int  isolate 
)
int OGX_DEB_dump__ ( void *  obj1)
int OGX_DEB_dump_obj ( void *  obj1,
int  typ,
int  iNr,
int  deloc 
)
int OGX_DEB_dump_stru ( void *  obj,
int  typ,
char *  txt 
)