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 PGSDATEGEN_H_
12 #define PGSDATEGEN_H_
13 
14 #include "pgscript/pgScript.h"
15 #include <wx/datetime.h>
16 #include "pgscript/generators/pgsIntegerGen.h"
17 
18 class pgsDateGen : 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 	int m_range;
27 
28 	bool m_sequence;
29 
30 	pgsRandomizer m_randomizer;
31 
32 public:
33 
34 	pgsDateGen(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 ~pgsDateGen();
42 
43 	virtual pgsDateGen *clone();
44 
45 	/* pgsDateGen & operator =(const pgsDateGen & that); */
46 
47 	/* pgsDateGen(const pgsDateGen & that); */
48 
49 };
50 
51 #endif /*PGSDATEGEN_H_*/
52