~ubuntu-branches/debian/sid/pgadmin3/sid

« back to all changes in this revision

Viewing changes to pgadmin/include/pgscript/objects/pgsGenerator.h

  • Committer: Bazaar Package Importer
  • Author(s): Gerfried Fuchs
  • Date: 2009-07-30 12:27:16 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20090730122716-fddbh42on721bbs2
Tags: 1.10.0-1
* New upstream release.
* Adjusted watch file to match release candidates.
* Updated to Standards-Version 3.8.2:
  - Moved to Section: database.
  - Add DEB_BUILD_OPTIONS support for parallel building.
  - Move from findstring to filter suggestion for DEB_BUILD_OPTIONS parsing.
* pgagent got split into its own separate source package by upstream.
* Exclude Docs.vcproj from installation.
* Move doc-base.enus from pgadmin3 to pgadmin3-data package, the files are
  in there too.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//////////////////////////////////////////////////////////////////////////
 
2
//
 
3
// pgScript - PostgreSQL Tools
 
4
// RCS-ID:      $Id: pgsGenerator.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
 
7
//
 
8
//////////////////////////////////////////////////////////////////////////
 
9
 
 
10
 
 
11
#ifndef PGSGENERATOR_H_
 
12
#define PGSGENERATOR_H_
 
13
 
 
14
#include "pgscript/pgScript.h"
 
15
#include "pgscript/generators/pgsObjectGen.h"
 
16
#include "pgscript/objects/pgsVariable.h"
 
17
#include "pgscript/utilities/pgsSharedPtr.h"
 
18
 
 
19
class pgsNumber;
 
20
class pgsRecord;
 
21
class pgsString;
 
22
 
 
23
class pgsGenerator : public pgsVariable
 
24
{
 
25
        
 
26
public:
 
27
        
 
28
        virtual pgsOperand pgs_plus(const pgsVariable & rhs) const;
 
29
        
 
30
        virtual pgsOperand pgs_minus(const pgsVariable & rhs) const;
 
31
        
 
32
        virtual pgsOperand pgs_times(const pgsVariable & rhs) const;
 
33
        
 
34
        virtual pgsOperand pgs_over(const pgsVariable & rhs) const;
 
35
        
 
36
        virtual pgsOperand pgs_modulo(const pgsVariable & rhs) const;
 
37
        
 
38
        virtual pgsOperand pgs_equal(const pgsVariable & rhs) const;
 
39
        
 
40
        virtual pgsOperand pgs_different(const pgsVariable & rhs) const;
 
41
        
 
42
        virtual pgsOperand pgs_greater(const pgsVariable & rhs) const;
 
43
        
 
44
        virtual pgsOperand pgs_lower(const pgsVariable & rhs) const;
 
45
        
 
46
        virtual pgsOperand pgs_lower_equal(const pgsVariable & rhs) const;
 
47
        
 
48
        virtual pgsOperand pgs_greater_equal(const pgsVariable & rhs) const;
 
49
        
 
50
        virtual pgsOperand pgs_not() const;
 
51
        
 
52
        virtual bool pgs_is_true() const;
 
53
        
 
54
        virtual pgsOperand pgs_almost_equal(const pgsVariable & rhs) const;
 
55
 
 
56
protected:
 
57
        
 
58
        typedef pgsSharedPtr<pgsObjectGen> pgsRandomizer;
 
59
 
 
60
        mutable pgsRandomizer m_randomizer;
 
61
 
 
62
public:
 
63
 
 
64
        pgsGenerator(const pgsTypes & generator_type, pgsObjectGen * randomizer);
 
65
 
 
66
        virtual ~pgsGenerator();
 
67
 
 
68
        virtual pgsVariable * clone() const;
 
69
 
 
70
        /* pgsGenerator(const pgsGenerator & that); */
 
71
 
 
72
        /* pgsGenerator & operator =(const pgsGenerator & that); */
 
73
 
 
74
public:
 
75
 
 
76
        virtual wxString value() const;
 
77
 
 
78
        virtual pgsOperand eval(pgsVarMap & vars) const;
 
79
        
 
80
protected:
 
81
        
 
82
        pgsOperand operand() const;
 
83
        
 
84
public:
 
85
        
 
86
        virtual pgsNumber number() const;
 
87
        
 
88
        virtual pgsRecord record() const;
 
89
        
 
90
        virtual pgsString string() const;
 
91
 
 
92
};
 
93
 
 
94
#endif /*PGSGENERATOR_H_*/