00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifdef __cplusplus
00022 extern "C" {
00023 #endif
00024
00025
00026 #ifndef __FLGR_DATA_TOOLS_PSTACK_H
00027 #define __FLGR_DATA_TOOLS_PSTACK_H
00028
00029 #include <flgrCoreDll.h>
00030 #include <flgrCoreTypes.h>
00031 #include <flgrCoreErrors.h>
00032 #include <flgrCoreVector.h>
00033
00041 typedef struct FLGR_McStackLink FLGR_McStackLink;
00042
00043 struct FLGR_McStackLink {
00044 FLGR_McStackLink *lower;
00045 int row;
00046 int col;
00047 };
00048
00049
00050
00051 typedef struct FLGR_McStack FLGR_McStack;
00052
00053
00054
00055
00059 struct FLGR_McStack {
00060 FLGR_Vector *priorityLabel;
00061 FLGR_Type type;
00062 int size;
00063 FLGR_McStackLink *top;
00064 FLGR_McStack *next;
00065 FLGR_McStack *previous;
00066 FLGR_VectorCompare compareStackFunction;
00067 };
00068
00069
00073 typedef struct {
00074 int nbPriority;
00075 FLGR_McStack *first;
00076 FLGR_McStack *last;
00077 FLGR_Type type;
00078 FLGR_VectorCompare compareStackFunction;
00079 }FLGR_PStack;
00080
00081
00082 EXPORT_LIB FLGR_PStack *flgr_pstack_create(FLGR_Type type, FLGR_VectorCompare fcompare);
00083 EXPORT_LIB void flgr_pstack_destroy(FLGR_PStack *pstack);
00084
00085 EXPORT_LIB FLGR_McStack *flgr_pstack_get_stack(FLGR_PStack *pstack, FLGR_Vector *priorityLabel);
00086 EXPORT_LIB FLGR_McStack *flgr_pstack_get_first_no_empty_stack(FLGR_PStack *pstack);
00087 EXPORT_LIB FLGR_McStack *flgr_pstack_get_last_no_empty_stack(FLGR_PStack *pstack);
00088
00089 EXPORT_LIB int flgr_pstack_check_stack_priority(FLGR_McStack *stack, FLGR_Vector *priorityLabel);
00090
00091 EXPORT_LIB FLGR_Ret flgr_pstack_push(FLGR_PStack *pstack, FLGR_Vector *priorityLabel, int row, int col);
00092 EXPORT_LIB FLGR_Ret flgr_pstack_pop_stack(FLGR_McStack *stk, int *row, int *col);
00093 EXPORT_LIB FLGR_Ret flgr_pstack_push_stack(FLGR_McStack *stk, int row, int col);
00094
00095 EXPORT_LIB FLGR_McStack *flgr_pstack_create_stack(FLGR_PStack *pstack,FLGR_Vector *priorityLabel);
00096
00097 EXPORT_LIB FLGR_Vector *flgr_pstack_get_label_stack(FLGR_McStack *stack);
00098 EXPORT_LIB int flgr_pstack_is_last_stack(FLGR_McStack *stack);
00099
00100 EXPORT_LIB FLGR_Ret flgr_pstack_set_stack_priority(FLGR_McStack *stack, FLGR_Vector *priorityLabel);
00101
00102 EXPORT_LIB void flgr_pstack_set_stack_priority_fgBIT(FLGR_McStack *stack, FLGR_Vector *priorityLabel);
00103 EXPORT_LIB void flgr_pstack_set_stack_priority_fgUINT8(FLGR_McStack *stack, FLGR_Vector *priorityLabel);
00104 EXPORT_LIB void flgr_pstack_set_stack_priority_fgUINT16(FLGR_McStack *stack, FLGR_Vector *priorityLabel);
00105 EXPORT_LIB void flgr_pstack_set_stack_priority_fgUINT32(FLGR_McStack *stack, FLGR_Vector *priorityLabel);
00106 EXPORT_LIB void flgr_pstack_set_stack_priority_fgINT8(FLGR_McStack *stack, FLGR_Vector *priorityLabel);
00107 EXPORT_LIB void flgr_pstack_set_stack_priority_fgINT16(FLGR_McStack *stack, FLGR_Vector *priorityLabel);
00108 EXPORT_LIB void flgr_pstack_set_stack_priority_fgINT32(FLGR_McStack *stack, FLGR_Vector *priorityLabel);
00109 EXPORT_LIB void flgr_pstack_set_stack_priority_fgFLOAT32(FLGR_McStack *stack, FLGR_Vector *priorityLabel);
00110 EXPORT_LIB void flgr_pstack_set_stack_priority_fgFLOAT64(FLGR_McStack *stack, FLGR_Vector *priorityLabel);
00111
00112 EXPORT_LIB FLGR_Ret flgr_pstack_push_fgBIT(FLGR_PStack *pstack, FLGR_Vector *priorityLabel, int row, int col);
00113 EXPORT_LIB FLGR_Ret flgr_pstack_push_fgUINT8(FLGR_PStack *pstack, FLGR_Vector *priorityLabel, int row, int col);
00114 EXPORT_LIB FLGR_Ret flgr_pstack_push_fgUINT16(FLGR_PStack *pstack, FLGR_Vector *priorityLabel, int row, int col);
00115 EXPORT_LIB FLGR_Ret flgr_pstack_push_fgUINT32(FLGR_PStack *pstack, FLGR_Vector *priorityLabel, int row, int col);
00116 EXPORT_LIB FLGR_Ret flgr_pstack_push_fgINT8(FLGR_PStack *pstack, FLGR_Vector *priorityLabel, int row, int col);
00117 EXPORT_LIB FLGR_Ret flgr_pstack_push_fgINT16(FLGR_PStack *pstack, FLGR_Vector *priorityLabel, int row, int col);
00118 EXPORT_LIB FLGR_Ret flgr_pstack_push_fgINT32(FLGR_PStack *pstack, FLGR_Vector *priorityLabel, int row, int col);
00119 EXPORT_LIB FLGR_Ret flgr_pstack_push_fgFLOAT32(FLGR_PStack *pstack, FLGR_Vector *priorityLabel, int row, int col);
00120 EXPORT_LIB FLGR_Ret flgr_pstack_push_fgFLOAT64(FLGR_PStack *pstack, FLGR_Vector *priorityLabel, int row, int col);
00121
00122 EXPORT_LIB FLGR_McStack *flgr_pstack_create_stack_fgBIT(FLGR_PStack *pstack,FLGR_Vector *priorityLabel);
00123 EXPORT_LIB FLGR_McStack *flgr_pstack_create_stack_fgUINT8(FLGR_PStack *pstack,FLGR_Vector *priorityLabel);
00124 EXPORT_LIB FLGR_McStack *flgr_pstack_create_stack_fgUINT16(FLGR_PStack *pstack,FLGR_Vector *priorityLabel);
00125 EXPORT_LIB FLGR_McStack *flgr_pstack_create_stack_fgUINT32(FLGR_PStack *pstack,FLGR_Vector *priorityLabel);
00126 EXPORT_LIB FLGR_McStack *flgr_pstack_create_stack_fgINT8(FLGR_PStack *pstack,FLGR_Vector *priorityLabel);
00127 EXPORT_LIB FLGR_McStack *flgr_pstack_create_stack_fgINT16(FLGR_PStack *pstack,FLGR_Vector *priorityLabel);
00128 EXPORT_LIB FLGR_McStack *flgr_pstack_create_stack_fgINT32(FLGR_PStack *pstack,FLGR_Vector *priorityLabel);
00129 EXPORT_LIB FLGR_McStack *flgr_pstack_create_stack_fgFLOAT32(FLGR_PStack *pstack,FLGR_Vector *priorityLabel);
00130 EXPORT_LIB FLGR_McStack *flgr_pstack_create_stack_fgFLOAT64(FLGR_PStack *pstack,FLGR_Vector *priorityLabel);
00131
00132 EXPORT_LIB FLGR_McStack *flgr_pstack_get_stack_fgBIT(FLGR_PStack *pstack, FLGR_Vector *priorityLabel);
00133 EXPORT_LIB FLGR_McStack *flgr_pstack_get_stack_fgUINT8(FLGR_PStack *pstack, FLGR_Vector *priorityLabel);
00134 EXPORT_LIB FLGR_McStack *flgr_pstack_get_stack_fgUINT16(FLGR_PStack *pstack, FLGR_Vector *priorityLabel);
00135 EXPORT_LIB FLGR_McStack *flgr_pstack_get_stack_fgUINT32(FLGR_PStack *pstack, FLGR_Vector *priorityLabel);
00136 EXPORT_LIB FLGR_McStack *flgr_pstack_get_stack_fgINT8(FLGR_PStack *pstack, FLGR_Vector *priorityLabel);
00137 EXPORT_LIB FLGR_McStack *flgr_pstack_get_stack_fgINT16(FLGR_PStack *pstack, FLGR_Vector *priorityLabel);
00138 EXPORT_LIB FLGR_McStack *flgr_pstack_get_stack_fgINT32(FLGR_PStack *pstack, FLGR_Vector *priorityLabel);
00139 EXPORT_LIB FLGR_McStack *flgr_pstack_get_stack_fgFLOAT32(FLGR_PStack *pstack, FLGR_Vector *priorityLabel);
00140 EXPORT_LIB FLGR_McStack *flgr_pstack_get_stack_fgFLOAT64(FLGR_PStack *pstack, FLGR_Vector *priorityLabel);
00141
00143
00144 #endif
00145
00146 #ifdef __cplusplus
00147 }
00148 #endif