Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

ixlib_textfile.hh

Go to the documentation of this file.
00001 // ----------------------------------------------------------------------------
00002 //  Description      : Reading and writing text files
00003 // ----------------------------------------------------------------------------
00004 //  (c) Copyright 1999 by iXiONmedia, all rights reserved.
00005 // ----------------------------------------------------------------------------
00006 
00007 
00008 
00009 
00010 #ifndef IXLIB_TEXTFILE
00011 #define IXLIB_TEXTFILE
00012 
00013 
00014 
00015 
00016 #include <vector>
00017 #include <string>
00018 #include <iostream>
00019 
00020 
00021 
00022 
00023 namespace ixion {
00024   class text_file : public std::vector<std::string> {
00025     public:
00026     void read(std::istream &stream);
00027     void write(std::ostream &stream) const;
00028     };
00029   
00030   
00031   
00032   
00033   inline std::istream &operator>>(std::istream &istr,text_file &conf) {
00034     conf.read(istr);
00035     return istr;
00036     }
00037   
00038   
00039   
00040   
00041   inline std::ostream &operator<<(std::ostream &ostr,text_file const &conf) {
00042     conf.write(ostr);
00043     return ostr;
00044     }
00045   }
00046   
00047   
00048   
00049 
00050 #endif

Generated on Wed Oct 31 17:12:24 2001 for ixlib by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001