/*=========================================================================
*
* ModLib.h	- library functions for geometric objects
*
* Version			1.0
* Revision date
*
*=======================================================================*/
#ifndef _MODLIB_H_
#define _MODLIB_H_



//--- Includes --------------------------------------------------------

#include "typedef.h"

#include "geoobj.h"


//----------------------------------------------------------------------

#ifdef _WINDOWS
/********************************************************/
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus 
/********************************************************/
#endif // _WINDOWS


//--- Globals ---------------------------------------------------------

extern MLT_tdstGeometricObject **g_hGeometricInFile;
extern long						 g_lGeometricIndex;


//--- Functions ---------------------------------------------------------

// load&save functions
extern void	MLT_vLoadModFileInLib	 (void);
extern void MLT_vSaveLibInModFile	 (BOOL bPhy, BOOL bTbl, BOOL bZoo, BOOL bVse);
// get functions
extern long MLT_lGetNumberObjectInLib (void);
// search functions
extern MLT_tdstGeometricObject *MLT_lGetObjectFromLib	(long lIndex);
extern MLT_tdstGeometricObject *MLT_pFindInLib			(char *sGeometric);
extern MLT_tdstGeometricObject *MLT_pFindAlmostInLib	(char *sGeometric);
extern MLT_tdstGeometricObject *MLT_pFindInGivenLib		(char *sGeometric, MLT_tdstGeometricObject **p_xGeometricInFile, long xNbGeometric);
// request functions
extern void MLT_vRequestObjInLib	(char *sObjName, MLT_tdstGeometricObject ***h_stObj, long *p_lNbObj);
extern void MLT_vRequestAlmostInLib	(xString sObjName, MLT_tdstGeometricObject ***h_stObj, long *p_lNbObj);
// erase functions
extern void MLT_vEraseLib			(void);
extern void MLT_vEraseObjInLib		(MLT_tdstGeometricObject *p_stObj);
extern void MLT_vEraseMergeObjInLib	(MLT_tdstGeometricObject *p_stObj);
extern void MLT_xEraseGeometric		(MLT_tdstGeometricObject *p_stGeometric);
extern long MLT_lEraseElementType	(void *p_vElement, long lElementType);
// operation functions
extern void MLT_vMergeObjects		 (MLT_tdstGeometricObject *p_stObj, MLT_tdstGeometricObject *p_stObjDup);
extern void MLT_vMakeReverseObjInLib (MLT_tdstGeometricObject *p_stObj, MLT_tdstGeometricObject **h_stObjRev, char *sSector);


#ifdef _WINDOWS
/********************************************************/
#ifdef __cplusplus
}
#endif // __cplusplus */
/********************************************************/
#endif // _WINDOWS

#endif // _LOAD_H_ 
