SIS
Symmetric Index Structures
/Users/dbr/ma/src/lmu/cis/sis/adapter/CompressedAutomatonDumpingInterface.hpp
Go to the documentation of this file.
00001 #ifndef DUMPINGAUTOMATON_HPP
00002 #define DUMPINGAUTOMATON_HPP
00003 
00004 #include <iostream>
00005 
00006 namespace lmu { namespace cis { namespace sis {
00007 
00008 class CompressedAutomatonDumpingInterface {
00009 public:
00010     virtual void DumpStat( FILE * fp ) const = 0;
00011     // virtual std::string DumpStat() const = 0; // TODO
00012 
00013     // virtual void DumpGV() const = 0;
00014 
00015     virtual void GenerateLanguage( const S8* filename, UINT encoding = ENCODING_PLAIN ) const = 0;
00016 
00018     friend std::ostream& operator<<( std::ostream& out, const CompressedAutomatonDumpingInterface& Base) {
00019         Base.Print( out );
00020         return out;
00021     }
00022 
00023     friend std::istream& operator>>( std::istream& in, CompressedAutomatonDumpingInterface& Base) {
00024         Base.ReadAll( in );
00025         return in;
00026     }
00027     
00028     friend std::istream& operator>( std::ifstream& in, CompressedAutomatonDumpingInterface& Base) {
00029         Base.ReadOne( in );
00030         return in;
00031     }
00032 private:
00034     virtual void Print( std::ostream& ) const = 0;
00035     virtual void ReadAll( std::istream& ) = 0;
00036     virtual void ReadOne( std::istream& ) = 0;
00037 };
00038 
00039 }}} /* End of namespace lmu::cis::sis */
00040 
00041 #endif /* end of include guard: DUMPINGAUTOMATON_HPP */