1
//////////////////////////////////////////////////////////////////////////
3
// pgScript - PostgreSQL Tools
4
// RCS-ID: $Id: pgsRegexGen.h 7758 2009-03-26 20:49:59Z dpage $
5
// Copyright (C) 2002 - 2009, The pgAdmin Development Team
6
// This software is released under the BSD Licence
8
//////////////////////////////////////////////////////////////////////////
11
#ifndef PGSREGEXGEN_H_
12
#define PGSREGEXGEN_H_
14
#include "pgscript/pgScript.h"
15
#include "pgscript/generators/pgsObjectGen.h"
16
#include "pgscript/generators/pgsStringGen.h"
18
WX_DECLARE_OBJARRAY(pgsStringGen, pgsVectorStringGen);
20
class pgsRegexGen : public pgsObjectGen
30
pgsVectorChar m_characters;
37
pgsRegex(const pgsVectorChar & characters, const long & first,
46
/* pgsRegex & operator =(const pgsRegex & that); */
48
/* pgsRegex(const pgsRegex & that); */
50
void set_characters(const pgsVectorChar & characters);
52
void add_character(const wxChar & c);
54
void set_first(const long & first);
56
void set_second(const long & second);
58
const pgsVectorChar & get_characters() const;
60
const long & get_first() const;
62
const long & get_second() const;
72
pgsVectorStringGen m_string_gens;
76
pgsRegexGen(const wxString & regex, const long & seed = wxDateTime::GetTimeNow());
78
virtual wxString random();
80
virtual ~pgsRegexGen();
82
virtual pgsRegexGen * clone();
84
/* pgsRegexGen & operator =(const pgsRegexGen & that); */
86
/* pgsRegexGen(const pgsRegexGen & that); */
88
const bool & is_valid() const;
90
const pgsVectorStringGen & string_gens() const;
92
size_t string_gens_size() const;
96
static wxString espace_xml_char(const wxChar & c);
98
static wxString char_range(const wxChar & b, const wxChar & c);
102
#endif /*PGSREGEXGEN_H_*/