Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

XSBAgent.h

00001 // See the file LICENSE in the some directory as this file for legal
00002 // notices about this software.
00003 #ifndef DEV_W3_ORG__2001_BLINDFOLD_SRC_XSBAGENT_H
00004 #define DEV_W3_ORG__2001_BLINDFOLD_SRC_XSBAGENT_H
00005 // $Id: XSBAgent_8h-source.html,v 1.5 2001/10/10 20:40:58 sandro Exp $
00006 #include "config.h"
00007 #include "Agent.h"
00008 #include "InMemoryPool.h"
00009 #include "ByteSink.h"
00010 #include "ByteFIFO.h"
00011 #include "XSBQuery.h"
00012 #include <list>
00013 
00017 class XSBAgent : public Agent, public ByteSink {
00018       
00019 public:
00020 
00021     // STANDARD MEMBER FUNCTIONS
00022     XSBAgent();
00023     XSBAgent(const XSBAgent& other);
00024     const XSBAgent& operator=(const XSBAgent& other);
00025     bool operator==(const XSBAgent& other) const;
00026     bool operator<(const XSBAgent& other) const;
00027     size_t hash() const;
00028     friend std::ostream& operator<<(std::ostream& s, const XSBAgent& me);
00029     std::ostream& print_to(std::ostream& stream) const; 
00030     ~XSBAgent();       
00031 
00032     // (RE)IMPLEMENTATION OF INHERITED MEMBERS
00033     virtual void write(const void* byteBuffer, size_t numBytes);
00034     virtual QueryablePool* newQueryablePool(VariableScope* scope = 0);
00035     
00036     // CLASS-SPECIFIC PUBLIC INTERFACE
00037     virtual void shutdown();
00038 
00039 private:
00040 
00041     friend class XSBQuery;
00042     friend class XSBPool;
00043     std::ostream* getFile(char** fileNameBuffer);
00044     std::string getNewPredicate();
00045     std::ostream* out;
00046     // from XSB ...?   goes to where?
00047 
00048     int predicateCounter;
00049 
00050     ByteFIFO buffer;
00051 
00052     XSBQuery* currentQuery;
00053     std::list<XSBPool*> pools;
00054 
00055     void sync();
00056     bool waitingForAck;
00057 
00058 };     
00059 
00060 STANDARD_EXTERNAL(XSBAgent)
00061 
00062 #endif  /* DEV_W3_ORG__2001_BLINDFOLD_SRC_XSBAGENT_H */   // -*-C++-*-

Home to blindfold. This page generated via doxygen 1.2.11.1 Wed Oct 10 16:40:33 2001.