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

field_types.h

Go to the documentation of this file.
00001 #ifndef MYSQLPP_FIELD_TYPES_H
00002 #define MYSQLPP_FIELD_TYPES_H
00003 
00006 
00007 #include "type_info.h"
00008 
00009 #include <vector>
00010 
00011 namespace mysqlpp {
00012 
00013 class ResUse;
00014 
00016 class FieldTypes : public std::vector<mysql_type_info> {
00017 private:
00018   void init (const ResUse *res);
00019 public:
00020   FieldTypes () {}
00021   FieldTypes (const ResUse *res) {init(res);}
00022   FieldTypes (int i) : std::vector<mysql_type_info>(i) {}
00023 
00025   FieldTypes& operator =(const ResUse *res) {init(res); return *this;}
00026 
00033   FieldTypes& operator =(int i)
00034   {
00035         insert(begin(), i, mysql_type_info());
00036         return *this;
00037   }
00038   
00040   mysql_type_info& operator [](int i)
00041   {
00042         return std::vector<mysql_type_info>::operator[](i);
00043   }
00044   const mysql_type_info& operator [](int i) const 
00045   {
00046         return std::vector<mysql_type_info>::operator[](i);
00047   }
00048 };
00049 
00050 } // end namespace mysqlpp
00051 
00052 #endif
00053 

Generated on Thu May 5 05:30:43 2005 for MySQL++ by doxygen1.2.18