/* ** Title: Shapes ** SCCSid: %W% %E% %U% ** CCid: %W% %E% %U% ** Author: Informix Software Inc. ** Created: 06/26/1998 13:27 ** Description: This is the generated 'C' file for the Shapes DataBlade. ** Comments: Generated for project Shapes.3.6 */ /* ** The following is placed here to insure ** that name "mangling" does not occur. */ #ifdef __cplusplus extern "C" { #endif /* Standard library includes. */ #include #include #define _REENTRANT #include #undef _REENTRANT #include /* Used by Informix GLS routines. */ #include /* Include when accessing the Informix API. */ #include /* This is the project include file. */ #include "Shapes.h" #include "ShapeTypes.h" mi_lvarchar * MyShapeInput ( mi_lvarchar * Gen_param1, /* Pointer to the input text. */ MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs. */ ); mi_lvarchar * MyShapeOutput ( mi_lvarchar * Gen_param1, /* The UDT value. */ MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs. */ ); mi_integer MyShapeCompare ( mi_bitvarying * Gen_param1, /* The first UDT value to compare. */ mi_bitvarying * Gen_param2, /* The second UDT value to compare. */ MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs. */ ); mi_boolean MyShapeEqual ( mi_bitvarying * Gen_param1, /* The first UDT value to compare. */ mi_bitvarying * Gen_param2, /* The second UDT value to compare. */ MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs. */ ); mi_boolean MyShapeNotEqual ( mi_bitvarying * Gen_param1, /* The first UDT value to compare. */ mi_bitvarying * Gen_param2, /* The second UDT value to compare. */ MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs. */ ); UDREXPORT mi_integer MyShapeOverlap ( MyShape * Argument1, MyShape * Argument2, MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs.*/ ); UDREXPORT mi_integer MyShapeContains ( MyShape * Argument1, MyShape * Argument2, MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs.*/ ); UDREXPORT mi_integer MyShapeWithin ( MyShape * Argument1, MyShape * Argument2, MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs.*/ ); UDREXPORT mi_integer MyShapeUnion ( MyShape * Argument1, MyShape * Argument2, MyShape * Argument3, MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs.*/ ); UDREXPORT mi_integer MyShapeSize ( MyShape * Argument1, mi_double_precision * Argument2, MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs.*/ ); UDREXPORT mi_integer MyShapeInter ( MyShape * Argument1, MyShape * Argument2, MyShape * Argument3, MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs.*/ ); /* {{FUNCTION(08ab3055-18e9-11d1-80b0-0800095a455b) (MergeSection) */ /**************************************************************** ** ** Function name: ** ** MyCircleCompare ** ** Description: ** ** Perform the comparison operations required to compare two ** UDT values. ** ** This function returns zero if the two UDT values are equal and ** a non-zero value otherwise. ** ** Special Comments: ** ** Compares two variable-length opaque types ** ** Parameters: ** ** mi_bitvarying * Gen_param1; The first UDT value to compare. ** mi_bitvarying * Gen_param2; The second UDT value to compare. ** MI_FPARAM * Gen_fparam; Standard info - see DBDK docs. ** ** Return value: ** ** mi_integer The comparison result. ** ** History: ** ** 06/26/1998 - Generated by BladeSmith Version 3.60.626 . ** ** Identification: ** ** Warning: Do not remove or modify this comment: ** MyCircleCompare FunctionId: 08ab3055-18e9-11d1-80b0-0800095a455b ** ***************************************************************** */ mi_integer MyCircleCompare ( mi_bitvarying * Gen_param1, /* The first UDT value to compare. */ mi_bitvarying * Gen_param2, /* The second UDT value to compare. */ MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs. */ ) { return MyShapeCompare( Gen_param1, Gen_param2, Gen_fparam ); } /* }}FUNCTION (#UUVA) */ /* {{FUNCTION(9a830893-133b-11d1-80af-0800095a455b) (MergeSection) */ /**************************************************************** ** ** Function name: ** ** MyCircleEqual ** ** Description: ** ** Determine if one UDT value is equal to another. ** ** Special Comments: ** ** Compares two variable-length opaque types for equality ** ** Parameters: ** ** mi_bitvarying * Gen_param1; The first UDT value to compare. ** mi_bitvarying * Gen_param2; The second UDT value to compare. ** MI_FPARAM * Gen_fparam; Standard info - see DBDK docs. ** ** Return value: ** ** mi_boolean The comparison result. ** ** History: ** ** 06/26/1998 - Generated by BladeSmith Version 3.60.626 . ** ** Identification: ** ** Warning: Do not remove or modify this comment: ** MyCircleEqual FunctionId: 9a830893-133b-11d1-80af-0800095a455b ** ***************************************************************** */ mi_boolean MyCircleEqual ( mi_bitvarying * Gen_param1, /* The first UDT value to compare. */ mi_bitvarying * Gen_param2, /* The second UDT value to compare. */ MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs. */ ) { /* Call Compare to perform the comparison. */ return (mi_boolean)(0 == MyShapeCompare( Gen_param1, Gen_param2, Gen_fparam )); } /* }}FUNCTION (#MLO3) */ /* {{FUNCTION(08ab3056-18e9-11d1-80b0-0800095a455b) (MergeSection) */ /**************************************************************** ** ** Function name: ** ** MyCircleNotEqual ** ** Description: ** ** Determine if one UDT value is not equal to another. ** ** Special Comments: ** ** Compares two variable-length opaque types for non-equality ** ** Parameters: ** ** mi_bitvarying * Gen_param1; The first UDT value to compare. ** mi_bitvarying * Gen_param2; The second UDT value to compare. ** MI_FPARAM * Gen_fparam; Standard info - see DBDK docs. ** ** Return value: ** ** mi_boolean The comparison result. ** ** History: ** ** 06/26/1998 - Generated by BladeSmith Version 3.60.626 . ** ** Identification: ** ** Warning: Do not remove or modify this comment: ** MyCircleNotEqual FunctionId: 08ab3056-18e9-11d1-80b0-0800095a455b ** ***************************************************************** */ mi_boolean MyCircleNotEqual ( mi_bitvarying * Gen_param1, /* The first UDT value to compare. */ mi_bitvarying * Gen_param2, /* The second UDT value to compare. */ MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs. */ ) { /* Call Compare to perform the comparison. */ return (mi_boolean)(0 != MyShapeCompare( Gen_param1, Gen_param2, Gen_fparam )); } /* }}FUNCTION (#8C0T) */ /* {{FUNCTION(9a830899-133b-11d1-80af-0800095a455b) (MergeSection) */ /**************************************************************** ** ** Function name: ** ** MyCircleOverlap ** ** Description: ** ** Special Comments: ** ** Entrypoint for the SQL routine Overlap (MyCircle,MyCircle) returns boolean. ** ** Parameters: ** ** Return value: ** ** mi_integer ** ** History: ** ** 06/26/1998 - Generated by BladeSmith Version 3.60.626 . ** ** Identification: ** ** NOTE: ** ** BladeSmith will add and remove parameters from the function ** prototype, and will generate tracing calls. ONLY EDIT code ** in blocks marked Your_
. Any other modifications ** will require manual merging. ** ***************************************************************** */ UDREXPORT mi_integer MyCircleOverlap ( MyCircle * Argument1, MyCircle * Argument2, MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs.*/ ) { MI_CONNECTION * Gen_Con; /* The connection handle. */ mi_integer Gen_RetVal; /* The return value. */ /* ------ {{Your_Declarations (PreserveSection) BEGIN ------ */ /* ------ }}Your_Declarations (#0000) END ------ */ /* Use the NULL connection. */ Gen_Con = NULL; /* ------ {{Your_Code (PreserveSection) BEGIN ------ */ Gen_RetVal = MyShapeOverlap( (MyShape *) Argument1, (MyShape *) Argument2 , Gen_fparam ); /* ------ }}Your_Code (#CAD2) END ------ */ /* Return the function's return value. */ return Gen_RetVal; } /* }}FUNCTION (#FS8N) */ /* {{FUNCTION(9a830894-133b-11d1-80af-0800095a455b) (MergeSection) */ /**************************************************************** ** ** Function name: ** ** MyCircleContains ** ** Description: ** ** Special Comments: ** ** Entrypoint for the SQL routine Contains (MyCircle,MyCircle) returns boolean. ** ** Parameters: ** ** Return value: ** ** mi_integer ** ** History: ** ** 06/26/1998 - Generated by BladeSmith Version 3.60.626 . ** ** Identification: ** ** NOTE: ** ** BladeSmith will add and remove parameters from the function ** prototype, and will generate tracing calls. ONLY EDIT code ** in blocks marked Your_
. Any other modifications ** will require manual merging. ** ***************************************************************** */ UDREXPORT mi_integer MyCircleContains ( MyCircle * Argument1, MyCircle * Argument2, MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs.*/ ) { MI_CONNECTION * Gen_Con; /* The connection handle. */ mi_integer Gen_RetVal; /* The return value. */ /* ------ {{Your_Declarations (PreserveSection) BEGIN ------ */ /* ------ }}Your_Declarations (#0000) END ------ */ /* Use the NULL connection. */ Gen_Con = NULL; /* ------ {{Your_Code (PreserveSection) BEGIN ------ */ Gen_RetVal = MyShapeContains( (MyShape *) Argument1, (MyShape *)Argument2 , Gen_fparam ); /* ------ }}Your_Code (#BD8C) END ------ */ /* Return the function's return value. */ return Gen_RetVal; } /* }}FUNCTION (#IP1B) */ /* {{FUNCTION(9a830895-133b-11d1-80af-0800095a455b) (MergeSection) */ /**************************************************************** ** ** Function name: ** ** MyCircleWithin ** ** Description: ** ** Special Comments: ** ** Entrypoint for the SQL routine Within (MyCircle,MyCircle) returns boolean. ** ** Parameters: ** ** Return value: ** ** mi_integer ** ** History: ** ** 06/26/1998 - Generated by BladeSmith Version 3.60.626 . ** ** Identification: ** ** NOTE: ** ** BladeSmith will add and remove parameters from the function ** prototype, and will generate tracing calls. ONLY EDIT code ** in blocks marked Your_
. Any other modifications ** will require manual merging. ** ***************************************************************** */ UDREXPORT mi_integer MyCircleWithin ( MyCircle * Argument1, MyCircle * Argument2, MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs.*/ ) { MI_CONNECTION * Gen_Con; /* The connection handle. */ mi_integer Gen_RetVal; /* The return value. */ /* ------ {{Your_Declarations (PreserveSection) BEGIN ------ */ /* ------ }}Your_Declarations (#0000) END ------ */ /* Use the NULL connection. */ Gen_Con = NULL; /* ------ {{Your_Code (PreserveSection) BEGIN ------ */ Gen_RetVal = MyShapeWithin( (MyShape *) Argument1, (MyShape *) Argument2 , Gen_fparam ); /* ------ }}Your_Code (#0L2V) END ------ */ /* Return the function's return value. */ return Gen_RetVal; } /* }}FUNCTION (#3337) */ /* {{FUNCTION(9a830896-133b-11d1-80af-0800095a455b) (MergeSection) */ /**************************************************************** ** ** Function name: ** ** MyCircleUnion ** ** Description: ** ** Special Comments: ** ** Entrypoint for the SQL routine Union (MyCircle,MyCircle,MyCircle) returns integer. ** ** Parameters: ** ** Return value: ** ** mi_integer ** ** History: ** ** 06/26/1998 - Generated by BladeSmith Version 3.60.626 . ** ** Identification: ** ** NOTE: ** ** BladeSmith will add and remove parameters from the function ** prototype, and will generate tracing calls. ONLY EDIT code ** in blocks marked Your_
. Any other modifications ** will require manual merging. ** ***************************************************************** */ UDREXPORT mi_integer MyCircleUnion ( MyCircle * Argument1, MyCircle * Argument2, MyCircle * Argument3, MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs.*/ ) { MI_CONNECTION * Gen_Con; /* The connection handle. */ mi_integer Gen_RetVal; /* The return value. */ /* ------ {{Your_Declarations (PreserveSection) BEGIN ------ */ /* ------ }}Your_Declarations (#0000) END ------ */ /* Use the NULL connection. */ Gen_Con = NULL; /* ------ {{Your_Code (PreserveSection) BEGIN ------ */ Gen_RetVal = MyShapeUnion( (MyShape *) Argument1,(MyShape *) Argument2, (MyShape *)Argument3, Gen_fparam ); /* ------ }}Your_Code (#NJLJ) END ------ */ /* Return the function's return value. */ return Gen_RetVal; } /* }}FUNCTION (#729G) */ /* {{FUNCTION(9a830897-133b-11d1-80af-0800095a455b) (MergeSection) */ /**************************************************************** ** ** Function name: ** ** MyCircleSize ** ** Description: ** ** Special Comments: ** ** Entrypoint for the SQL routine Size (MyCircle,double precision) returns integer. ** ** Parameters: ** ** Return value: ** ** mi_integer ** ** History: ** ** 06/26/1998 - Generated by BladeSmith Version 3.60.626 . ** ** Identification: ** ** NOTE: ** ** BladeSmith will add and remove parameters from the function ** prototype, and will generate tracing calls. ONLY EDIT code ** in blocks marked Your_
. Any other modifications ** will require manual merging. ** ***************************************************************** */ UDREXPORT mi_integer MyCircleSize ( MyCircle * Argument1, mi_double_precision * Argument2, MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs.*/ ) { MI_CONNECTION * Gen_Con; /* The connection handle. */ mi_integer Gen_RetVal; /* The return value. */ /* ------ {{Your_Declarations (PreserveSection) BEGIN ------ */ /* ------ }}Your_Declarations (#0000) END ------ */ /* Use the NULL connection. */ Gen_Con = NULL; /* ------ {{Your_Code (PreserveSection) BEGIN ------ */ Gen_RetVal = MyShapeSize( (MyShape *) Argument1, (mi_double_precision *) Argument2 , Gen_fparam ); /* ------ }}Your_Code (#ED32) END ------ */ /* Return the function's return value. */ return Gen_RetVal; } /* }}FUNCTION (#ME7L) */ /* {{FUNCTION(9a830898-133b-11d1-80af-0800095a455b) (MergeSection) */ /**************************************************************** ** ** Function name: ** ** MyCircleInter ** ** Description: ** ** Special Comments: ** ** Entrypoint for the SQL routine Inter (MyCircle,MyCircle,MyCircle) returns integer. ** ** Parameters: ** ** Return value: ** ** mi_integer ** ** History: ** ** 06/26/1998 - Generated by BladeSmith Version 3.60.626 . ** ** Identification: ** ** NOTE: ** ** BladeSmith will add and remove parameters from the function ** prototype, and will generate tracing calls. ONLY EDIT code ** in blocks marked Your_
. Any other modifications ** will require manual merging. ** ***************************************************************** */ UDREXPORT mi_integer MyCircleInter ( MyCircle * Argument1, MyCircle * Argument2, MyCircle * Argument3, MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs.*/ ) { MI_CONNECTION * Gen_Con; /* The connection handle. */ mi_integer Gen_RetVal; /* The return value. */ /* ------ {{Your_Declarations (PreserveSection) BEGIN ------ */ /* ------ }}Your_Declarations (#0000) END ------ */ /* Use the NULL connection. */ Gen_Con = NULL; /* ------ {{Your_Code (PreserveSection) BEGIN ------ */ Gen_RetVal = MyShapeInter( (MyShape *) Argument1, (MyShape *) Argument2, (MyShape *)Argument3, Gen_fparam ); /* ------ }}Your_Code (#PJLJ) END ------ */ /* Return the function's return value. */ return Gen_RetVal; } /* }}FUNCTION (#72CG) */ /* {{FUNCTION(9a830891-133b-11d1-80af-0800095a455b) (MergeSection) */ /**************************************************************** ** ** Function name: ** ** MyCircleInput ** ** Description: ** ** This function converts from the external representation of the ** UDT type MyCircle to its internal representation. The external ** representation is a blank-separated list of values and the ** internal representation is a 'C' structure of type MyCircle as ** defined in the header file. ** ** ** Data can be inserted into a table using an SQL insert statement: ** ** insert into tablename values ( 'value-list' ); ** ** value-list is a space-delimited list of values. ** ** Special Comments: ** ** Support routine for opaque type MyCircle returns mi_lvarchar. ** ** Parameters: ** ** mi_lvarchar * Gen_param1; Pointer to the input text. ** MI_FPARAM * Gen_fparam; Standard info - see DBDK docs. ** ** Return value: ** ** mi_lvarchar * The constructed UDT value. ** ** History: ** ** 06/26/1998 - Generated by BladeSmith Version 3.60.626 . ** ** Identification: ** ** Warning: Do not remove or modify this comment: ** MyCircleInput FunctionId: 9a830891-133b-11d1-80af-0800095a455b ** ***************************************************************** */ mi_lvarchar * MyCircleInput ( mi_lvarchar * Gen_param1, /* Pointer to the input text. */ MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs. */ ) { MI_CONNECTION * Gen_Con; /* The current connection. */ mi_lvarchar * Gen_RetVal; /* The return value. */ /* Get the current connection handle. */ Gen_Con = mi_open( NULL, NULL, NULL ); /* Verify that the connection has been established. */ if( Gen_Con == 0 ) { /* ** Opening the current connection has failed ** so issue the following message and quit. ** ** "Connection has failed in MyCircleInput." */ DBDK_TRACE_ERROR( "MyCircleInput", ERRORMESG1, 10 ); /* not reached */ } /* ** Write to the trace file indicating ** that MyCircleInput has been called. */ DBDK_TRACE_ENTER( "MyCircleInput" ); Gen_RetVal = MyShapeInput( Gen_param1, Gen_fparam ); /* ** Write to the trace file indicating ** that MyCircleInput has successfully exited. */ DBDK_TRACE_EXIT( "MyCircleInput" ); /* Close the connection. */ mi_close( Gen_Con ); /* Return the UDT value. */ return Gen_RetVal; } /* }}FUNCTION (#3QSS) */ /* {{FUNCTION(9a830892-133b-11d1-80af-0800095a455b) (MergeSection) */ /**************************************************************** ** ** Function name: ** ** MyCircleOutput ** ** Description: ** ** This function converts from the internal representation of the ** UDT type MyCircle to its external representation. The external ** representation is a blank-separated list of values and the ** internal representation is a 'C' structure of type MyCircle as ** defined in the header file. ** ** Data can be retrieved from a table using an SQL select statement: ** ** select * from tablename; ** ** Special Comments: ** ** Support routine for opaque type MyCircle returns mi_lvarchar. ** ** Parameters: ** ** mi_lvarchar * Gen_param1; Pointer to the input text. ** MI_FPARAM * Gen_fparam; Standard info - see DBDK docs. ** ** Return value: ** ** mi_lvarchar * The constructed UDT value. ** ** History: ** ** 06/26/1998 - Generated by BladeSmith Version 3.60.626 . ** ** Identification: ** ** Warning: Do not remove or modify this comment: ** MyCircleOutput FunctionId: 9a830892-133b-11d1-80af-0800095a455b ** ***************************************************************** */ mi_lvarchar * MyCircleOutput ( mi_lvarchar * Gen_param1, /* The UDT value. */ MI_FPARAM * Gen_fparam /* Standard info - see DBDK docs. */ ) { MI_CONNECTION * Gen_Con; /* The current connection. */ mi_lvarchar * Gen_RetVal; /* The return result. */ /* Get the current connection handle. */ Gen_Con = mi_open( NULL, NULL, NULL ); /* Verify that the connection has been established. */ if( Gen_Con == 0 ) { /* ** Opening the current connection has failed ** so issue the following message and quit. ** ** "Connection has failed in MyCircleOutput." */ DBDK_TRACE_ERROR( "MyCircleOutput", ERRORMESG1, 10 ); /* not reached */ } /* ** Write to the trace file indicating ** that MyCircleOutput has been called. */ DBDK_TRACE_ENTER( "MyCircleOutput" ); Gen_RetVal = MyShapeOutput( Gen_param1, Gen_fparam ); /* ** Write to the trace file indicating ** that MyCircleOutput has successfully exited. */ DBDK_TRACE_EXIT( "MyCircleOutput" ); /* Close the connection. */ mi_close( Gen_Con ); return Gen_RetVal; } /* }}FUNCTION (#OU6D) */ #ifdef __cplusplus } #endif