datetime.h
来自「有关MYSQL的开源码」· C头文件 代码 · 共 50 行
H
50 行
#ifndef MYSQLCPPAPI_DATETIME_H#define MYSQLCPPAPI_DATETIME_H#include "mysqlcppapi/datetime/Time.h"#include "mysqlcppapi/datetime/Date.h"#include <string>#include <sstream>#include <iostream>namespace mysqlcppapi{/// A combination of Date and Time for holding mysql DateTime'sclass DateTime : public date_base, public time_base, public DTbase<DateTime>{public: DateTime(); DateTime(const std::string &str); DateTime(const ColData &str); virtual ~DateTime(); short int compare(const DateTime& other) const; std::ostream& out_stream(std::ostream&) const; std::string::size_type convert(const std::string&);};inline std::ostream& operator << (std::ostream& s, const DateTime& d){ return d.out_stream(s);}inline DateTime::DateTime(const ColData& str){ convert(str.c_str());}inline DateTime::DateTime(const std::string& str){ convert(str.c_str());}} //namespace#endif //MYSQLCPPAPI_DATETIME_H
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?