00001
00002
00003
00004 #ifndef DEV_W3_ORG__2001_BLINDFOLD_SRC_POOL_H
00005 #define DEV_W3_ORG__2001_BLINDFOLD_SRC_POOL_H
00006 #include "config.h"
00007
00008
00009 #include "iter.h"
00010 #include "TripleSink.h"
00011 #include "TripleSource.h"
00012
00031 class Pool : public TripleSource, public TripleSink {
00032
00033 public:
00034
00035
00036 Pool();
00037 Pool(const Pool& other);
00038 const Pool& operator=(const Pool& other);
00039 bool operator==(const Pool& other) const;
00040 bool operator<(const Pool& other) const;
00041 size_t hash() const;
00042 friend std::ostream& operator<<(std::ostream& s, const Pool& me);
00043 std::ostream& print_to(std::ostream& stream) const;
00044 virtual ~Pool();
00045
00046
00047
00059 static Pool* open(std::string address,
00060 Pool* configuration=0,
00061 std::string override=""
00062 );
00063
00067 static Pool* open(char* address,
00068 Pool* configuration=0,
00069 char* override=0
00070 );
00071
00072
00079 virtual void replace(Symbol old, Symbol replacement) = 0;
00080
00085 virtual void remove(Triple) = 0;
00086
00087 #ifdef DOXYGENX
00088 virtual Symbol getWildcard();
00089
00090 virtual Symbol* fetch(Symbol pattern[3], iter iterator,
00091 unsigned long max_results = 0);
00092
00093 virtual void streamOut(Symbol pattern[3], TripleSink* sink);
00094 #endif
00095
00096 virtual VariableScope* getScope() const;
00097
00098 private:
00099
00100
00101 };
00102
00103
00104 STANDARD_EXTERNAL(Pool)
00105
00106 #endif