00001 00012 #if !defined(RamDisco_hpp) 00013 00014 #define RamDisco_hpp 00015 00016 00017 #include <vector> 00018 #include "comun.hpp" 00019 #include "Pos.hpp" 00020 #include "Doc.hpp" 00021 #include "NodoTrieS.hpp" 00022 #include "TrieSDisco.hpp" 00023 00024 00025 using namespace std; 00026 00031 unsigned long 00032 precalcula_escribe_con_hermanos(NodoTrieS *n); 00033 00038 unsigned long 00039 precalcula_escribe(NodoTrieS *n); 00040 00041 00048 void 00049 escribePlanoStream(NodoTrieS *n, std::ostream &os, long desp = 0); 00050 00051 00057 NodoTrieS * 00058 leePlanoStream(std::istream &is) throw(string); 00059 00067 void 00068 escribePlano(NodoTrieS &t, vector<Doc> &docs, char *na, char *nrel); 00069 00077 NodoTrieS * 00078 leePlano(char *na, char *nrel, vector<Doc> &docs); 00079 00080 00090 unsigned long 00091 eliminaUnDoc(char *na, char *nrel, unsigned long nd); 00092 00102 unsigned long 00103 renumeraUltimoDoc(char *na, char *nrel, unsigned long nd); 00104 00123 long 00124 mezclaDiscoRam(istream &is1, NodoTrieS *a2, int saltacad, iostream &os, 00125 bool conHermanos1, bool conHermanos2, 00126 vector<long> *renum1, vector<long> *renum2); 00127 00128 #endif