00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef _H_insquery
00026 #define _H_insquery
00027
00028 #if INSTANCE_SET_QUERIES
00029
00030 #ifndef _H_object
00031 #include "object.h"
00032 #endif
00033
00034 typedef struct query_class
00035 {
00036 DEFCLASS *cls;
00037 struct defmodule *theModule;
00038 struct query_class *chain,*nxt;
00039 } QUERY_CLASS;
00040
00041 typedef struct query_soln
00042 {
00043 INSTANCE_TYPE **soln;
00044 struct query_soln *nxt;
00045 } QUERY_SOLN;
00046
00047 typedef struct query_core
00048 {
00049 INSTANCE_TYPE **solns;
00050 EXPRESSION *query,*action;
00051 QUERY_SOLN *soln_set,*soln_bottom;
00052 unsigned soln_size,soln_cnt;
00053 DATA_OBJECT *result;
00054 } QUERY_CORE;
00055
00056 typedef struct query_stack
00057 {
00058 QUERY_CORE *core;
00059 struct query_stack *nxt;
00060 } QUERY_STACK;
00061
00062 #define INSTANCE_QUERY_DATA 31
00063
00064 struct instanceQueryData
00065 {
00066 SYMBOL_HN *QUERY_DELIMETER_SYMBOL;
00067 QUERY_CORE *QueryCore;
00068 QUERY_STACK *QueryCoreStack;
00069 int AbortQuery;
00070 };
00071
00072 #define InstanceQueryData(theEnv) ((struct instanceQueryData *) GetEnvironmentData(theEnv,INSTANCE_QUERY_DATA))
00073
00074
00075 #ifdef LOCALE
00076 #undef LOCALE
00077 #endif
00078
00079 #ifdef _INSQUERY_SOURCE_
00080 #define LOCALE
00081 #else
00082 #define LOCALE extern
00083 #endif
00084
00085 #define QUERY_DELIMETER_STRING "(QDS)"
00086
00087 LOCALE void SetupQuery(void *);
00088 LOCALE void *GetQueryInstance(void *);
00089 LOCALE void GetQueryInstanceSlot(void *,DATA_OBJECT *);
00090 LOCALE intBool AnyInstances(void *);
00091 LOCALE void QueryFindInstance(void *,DATA_OBJECT *);
00092 LOCALE void QueryFindAllInstances(void *,DATA_OBJECT *);
00093 LOCALE void QueryDoForInstance(void *,DATA_OBJECT *);
00094 LOCALE void QueryDoForAllInstances(void *,DATA_OBJECT *);
00095 LOCALE void DelayedQueryDoForAllInstances(void *,DATA_OBJECT *);
00096
00097 #endif
00098
00099 #endif
00100
00101
00102
00103
00104