field_types1.hh

来自「MySql C++ library」· HH 代码 · 共 41 行

HH
41
字号
#ifndef __field_types1_hh__
#define __field_types1_hh__

#include <vector>
using namespace std ;

#include "defs.h"
#include "define_short.h"
#include "type_info1.hh"

//: A vector of the field types.
class FieldTypes : public vector<mysql_type_info>
{
private:
  void init (const ResUse *res);
public:
  FieldTypes () {}
  FieldTypes (const ResUse *res) {init(res);}
  FieldTypes (int i) : vector<mysql_type_info>(i) {}

  FieldTypes& operator = (const ResUse *res) {init(res); return *this;}
  //: Creates a new list based on the info in res
  FieldTypes& operator = (int i) {insert(begin(), i,
					 mysql_type_info()); return *this;}
  //: Creates a new list with i fields.

  mysql_type_info&  operator [] (int i) {return vector<mysql_type_info>
				  ::operator [] (i);}
  //: Returns the field type for the field with an offset of i.
  const mysql_type_info&  operator [] (int i) const
    {return vector<mysql_type_info>::operator[] (i);}
  //: Returns the field type for the field with an offset of i.
};

#endif





⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?