xsil/MetaIO.hh

00001 /* -*- mode: c++; c-basic-offset: 4; -*- */
00002 #ifndef METIOWRAP_HH
00003 #define METIOWRAP_HH
00004 
00005 struct MetaioParseEnvironment;
00006 
00007 #include <string>
00008 
00009 namespace xsil {
00010 
00018   class MetaIO {
00019   public:
00022     MetaIO(void);
00023 
00026     MetaIO(const char* file, const char* table=0);
00027 
00030     ~MetaIO(void);
00031 
00035     int close(void);
00036 
00042     const char* getColumnName(int icol) const;
00043 
00048     double getFloat(const char* cname, double def=0.0) const;
00049 
00054     long getInt(const char* cname, long def=0) const;
00055 
00060     int getNColumn(void) const;
00061 
00065     int getRow(void);
00066 
00071     std::string getString(const char* cname, const char* def="") const;
00072 
00075     const char* getTableName(void) const;
00076 
00079     const char* getTypeName(int icol) const;
00080 
00084     bool is_open(void) const;
00085 
00092     int open(const char* file, const char* table=0);
00093 
00094   private:
00095     MetaioParseEnvironment* mParseEnv;
00096   };
00097 
00098   inline bool
00099   MetaIO::is_open(void) const {
00100       return mParseEnv != 0;
00101   }
00102 
00103 } // namespace xsil
00104 
00105 #endif // METTAIOWRAP_HH

Generated on Sun Mar 8 19:20:54 2009 for dmt by  doxygen 1.5.4