refactoring
[rrq/rrqmisc.git] / vector / QueryCallbacks.h
index b74550ab5277efd400bc9715dad84156d7ac98d3..5d36e0b6ee4e590ddb876ee7e904f783732d5f42 100644 (file)
@@ -1,7 +1,9 @@
 #ifndef QueryCallbacks_H
 #define QueryCallbacks_H
 
-typedef struct HashVector HashVector;
+#include <BindingTable.h>
+
+typedef struct Query Query; // forward
 
 enum NextState {
     /**
@@ -27,7 +29,7 @@ enum NextState {
  * A struct Query_callbacks record defines the callbacks for a
  * specific Query type.
  */
-struct QueryCallbacks {
+typedef struct QueryCallbacks {
     /**
      * \brief Callback function to reclaim the Query memory for a
      * given Query.
@@ -39,6 +41,7 @@ struct QueryCallbacks {
      * thereafter reclaim their local state memory.
      */
     void (*reclaim)(Query *this);
+
     /**
      * \brief Callback function to update the Binding table with a
      * succession of alternative bindings.
@@ -64,11 +67,12 @@ struct QueryCallbacks {
      * it cannot setup any (more) Binding.
      */
     int (*next)(Query *this,BindingTable *bt,enum NextState state);
+
     /**
      * \brief This callback function adds its binding names to the
      * hashvector.
      */
     void (*variables)(Query *this,HashVector *hv);
-};
+} QueryCallbacks;
 
 #endif