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

FlatN3FilePool.cpp

00001 #define TRACE_NAME "FlatN3FilePool"
00002 #if 0
00003 #include "FlatN3FilePool.h"
00004 extern "C" {
00005 #include <string.h>
00006 #include <stdio.h>
00007 #include <malloc.h>
00008 }
00009 
00011 //
00012 //  Standard Member Functions
00013 //
00015 
00016 NTriplesFilePool::NTriplesFilePool(char *p_filename)    
00017 {
00018     filename = strdup(p_filename);
00019     f = fopen(filename, "a+");
00020 }
00021 
00022 #if 0  /* omit definitions until they are implemented */
00023 
00024 NTriplesFilePool::NTriplesFilePool(const NTriplesFilePool& other)
00025 {
00026     NOT_IMPLEMENTED
00027 }
00028 
00029 const NTriplesFilePool& NTriplesFilePool::operator=(const NTriplesFilePool& other)
00030 {
00031     NOT_IMPLEMENTED
00032 }
00033 
00034 bool NTriplesFilePool::operator==(const NTriplesFilePool& other) const
00035 {
00036     NOT_IMPLEMENTED
00037 }
00038 
00039 bool NTriplesFilePool::operator<(const NTriplesFilePool& other) const
00040 {
00041     NOT_IMPLEMENTED
00042 }
00043 
00044 size_t NTriplesFilePool::hash() const
00045 {
00046     NOT_IMPLEMENTED
00047 }
00048 
00049 std::ostream& NTriplesFilePool::print_to(std::ostream& stream) const
00050 {
00051     NOT_IMPLEMENTED
00052 }
00053 
00054 #endif /* omit definitions until they are implemented */
00055     
00056 NTriplesFilePool::~NTriplesFilePool()
00057 {
00058     if (f) fclose(f);
00059     free(filename);
00060 }
00061 
00063 //
00064 //  Additional Public Member Functions
00065 //
00067 
00068 
00069 void NTriplesFilePool::add(Symbol subject, Symbol predicate, Symbol object) 
00070 {
00071     NOT_IMPLEMENTED;
00072 #if 0
00073     fprintf(f, "<%s> <%s> <%s>.\n",
00074         static_cast<NTriplesFilePool::Object *>(subject.getObject(this))->name.c_str(),
00075         static_cast<NTriplesFilePool::Object *>(predicate.getObject(this))->name.c_str(),
00076         static_cast<NTriplesFilePool::Object *>(object.getObject(this))->name.c_str());
00077 #endif
00078 
00079 }
00080 
00081 /*
00082 Symbol* NTriplesFilePool::fetch(Symbol *pattern, iter iterator)
00083 {
00084     return 0;
00085 }
00086 */
00087 
00088 void NTriplesFilePool::replace(Symbol old, Symbol replacement) 
00089 {
00090 }
00091 
00092 void NTriplesFilePool::remove(Symbol, Symbol, Symbol)
00093 {
00094 }
00095 
00096 
00097 
00099 //
00100 //  Additional Private Member Functions
00101 //
00103 
00104 #if 0
00105 #include "UnitTest.h"
00106 static bool test1(std::ostream& out) {
00107     NTriplesFilePool s(".testfile");
00108     char *a = "foo";
00109     addNNN(&s, a, a, a);
00110     addNNN(&s, "foo", "bar", "baz");
00111 // should be caught as illegal Symbols for this store....
00112 //    s.add(Symbol(), Symbol(), Symbol());
00113 // need exception handling to test this properly!
00114 // (not "assert")
00115     s.add(Symbol(&s, "la"),
00116       Symbol(&s, "lo"),
00117       Symbol(&s, "luuu"));
00118     return true;
00119 }
00120 static UnitTest t1(test1, __FILE__, 1, "");
00121 
00122 #endif
00123 
00124 #endif
00125 #undef TRACE_NAME

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