1 ////////////////////////////////////////////////////////////////////////// 2 // 3 // pgScript - PostgreSQL Tools 4 // 5 // Copyright (C) 2002 - 2016, The pgAdmin Development Team 6 // This software is released under the PostgreSQL Licence 7 // 8 ////////////////////////////////////////////////////////////////////////// 9 10 11 #ifndef PGSTIMEGEN_H_ 12 #define PGSTIMEGEN_H_ 13 14 #include "pgscript/pgScript.h" 15 #include <wx/datetime.h> 16 #include "pgscript/generators/pgsIntegerGen.h" 17 18 class pgsTimeGen : public pgsObjectGen 19 { 20 private: 21 22 typedef pgsCopiedPtr<pgsIntegerGen> pgsRandomizer; // Needs a clone() method 23 24 wxDateTime m_min; 25 wxDateTime m_max; 26 wxLongLong m_range; 27 28 bool m_sequence; 29 30 pgsRandomizer m_randomizer; 31 32 public: 33 34 pgsTimeGen(wxDateTime min, wxDateTime max, const bool &sequence, 35 const long &seed = wxDateTime::GetTimeNow()); 36 37 bool is_sequence() const; 38 39 virtual wxString random(); 40 41 virtual ~pgsTimeGen(); 42 43 virtual pgsTimeGen *clone(); 44 45 /* pgsTimeGen & operator =(const pgsTimeGen & that); */ 46 47 /* pgsTimeGen(const pgsTimeGen & that); */ 48 49 }; 50 51 #endif /*PGSTIMEGEN_H_*/ 52