1
//////////////////////////////////////////////////////////////////////////
3
// pgAdmin III - PostgreSQL Tools
4
// RCS-ID: $Id: edbPackageFunction.h 6930 2008-01-02 00:10:01Z dpage $
5
// Copyright (C) 2002 - 2008, The pgAdmin Development Team
6
// This software is released under the Artistic Licence
8
// edbPackageFunction.h - EnterpriseDB Package member function
10
//////////////////////////////////////////////////////////////////////////
12
#ifndef EDBPACKAGEFUNCTION_H
13
#define EDBPACKAGEFUNCTION_H
15
#include "edbPackage.h"
18
class edbPackageFunction;
20
class edbPackageFunctionFactory : public edbPackageObjFactory
23
edbPackageFunctionFactory(const wxChar *tn=0, const wxChar *ns=0, const wxChar *nls=0, char **img=0);
24
virtual dlgProperty *CreateDialog(frmMain *frame, pgObject *node, pgObject *parent) { return 0; };
25
virtual pgObject *CreateObjects(pgCollection *obj, ctlTree *browser, const wxString &restr=wxEmptyString);
27
edbPackageFunction *AppendFunctions(pgObject *obj, edbPackage *package, ctlTree *browser, const wxString &restriction);
29
extern edbPackageFunctionFactory packageFunctionFactory;
32
class edbPackageFunction : public edbPackageObject
35
edbPackageFunction(edbPackage *newPackage, const wxString& newName = wxT(""));
36
edbPackageFunction(edbPackage *newPackage, pgaFactory &factory, const wxString& newName = wxT(""));
38
void ShowTreeDetail(ctlTree *browser, frmMain *form=0, ctlListView *properties=0, ctlSQLBox *sqlPane=0);
40
wxString GetSql(ctlTree *browser);
42
pgObject *Refresh(ctlTree *browser, const wxTreeItemId item);
44
virtual bool GetIsProcedure() const { return false; }
46
wxString GetFullName();
47
wxString GetArgListWithNames();
48
wxString GetArgSigList();
49
wxArrayString &GetArgNamesArray() { return argNamesArray; }
50
void iAddArgName(const wxString &s) { argNamesArray.Add(s); }
51
wxArrayString &GetArgTypesArray() { return argTypesArray; }
52
void iAddArgType(const wxString &s) { argTypesArray.Add(s); }
53
wxArrayString &GetArgModesArray() { return argModesArray; }
54
void iAddArgMode(const wxString &s) { argModesArray.Add(s); }
55
wxString GetReturnType() const { return returnType; }
56
void iSetReturnType(const wxString& s) { returnType = s; }
57
wxString GetSource() const { return source; }
58
void iSetSource(const wxString& s) { source = s; }
59
wxString GetVisibility() const { return visibility; }
60
void iSetVisibility(const wxString& s) { visibility = s; }
61
long GetArgCount() const { return argCount; }
62
void iSetArgCount(long ac) { argCount = ac; }
64
bool CanCreate() { return false; }
68
wxArrayString argNamesArray, argTypesArray, argModesArray;
69
wxString returnType, source, visibility;
72
class edbPackageProcedureFactory : public edbPackageFunctionFactory
75
edbPackageProcedureFactory();
76
virtual pgObject *CreateObjects(pgCollection *obj, ctlTree *browser, const wxString &restr=wxEmptyString);
78
extern edbPackageProcedureFactory packageProcedureFactory;
81
class edbPackageProcedure : public edbPackageFunction
84
edbPackageProcedure(edbPackage *newPackage, const wxString& newName=wxT(""));
85
wxString GetFullName();
87
bool GetIsProcedure() const { return true; }
89
wxString GetSql(ctlTree *browser);
1
//////////////////////////////////////////////////////////////////////////
3
// pgAdmin III - PostgreSQL Tools
4
// RCS-ID: $Id: edbPackageFunction.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
// edbPackageFunction.h - EnterpriseDB Package member function
10
//////////////////////////////////////////////////////////////////////////
12
#ifndef EDBPACKAGEFUNCTION_H
13
#define EDBPACKAGEFUNCTION_H
15
#include "edbPackage.h"
18
class edbPackageFunction;
20
class edbPackageFunctionFactory : public edbPackageObjFactory
23
edbPackageFunctionFactory(const wxChar *tn=0, const wxChar *ns=0, const wxChar *nls=0, const char **img=0);
24
virtual dlgProperty *CreateDialog(frmMain *frame, pgObject *node, pgObject *parent) { return 0; };
25
virtual pgObject *CreateObjects(pgCollection *obj, ctlTree *browser, const wxString &restr=wxEmptyString);
27
edbPackageFunction *AppendFunctions(pgObject *obj, edbPackage *package, ctlTree *browser, const wxString &restriction);
29
extern edbPackageFunctionFactory packageFunctionFactory;
32
class edbPackageFunction : public edbPackageObject
35
edbPackageFunction(edbPackage *newPackage, const wxString& newName = wxT(""));
36
edbPackageFunction(edbPackage *newPackage, pgaFactory &factory, const wxString& newName = wxT(""));
38
void ShowTreeDetail(ctlTree *browser, frmMain *form=0, ctlListView *properties=0, ctlSQLBox *sqlPane=0);
40
wxString GetSql(ctlTree *browser);
42
pgObject *Refresh(ctlTree *browser, const wxTreeItemId item);
44
virtual bool GetIsProcedure() const { return false; }
46
wxString GetFullName();
47
wxString GetArgListWithNames();
48
wxString GetArgSigList();
50
wxArrayString &GetArgNamesArray() { return argNamesArray; }
51
void iAddArgName(const wxString &s) { argNamesArray.Add(s); }
52
wxArrayString &GetArgTypesArray() { return argTypesArray; }
53
void iAddArgType(const wxString &s) { argTypesArray.Add(s); }
54
wxArrayString &GetArgModesArray() { return argModesArray; }
55
void iAddArgMode(const wxString &s) { argModesArray.Add(s); }
56
wxArrayString &GetArgDefsArray() { return argDefsArray; }
57
void iAddArgDef(const wxString &s) { argDefsArray.Add(s); }
59
wxString GetReturnType() const { return returnType; }
60
void iSetReturnType(const wxString& s) { returnType = s; }
61
wxString GetSource() const { return source; }
62
void iSetSource(const wxString& s) { source = s; }
63
wxString GetVisibility() const { return visibility; }
64
void iSetVisibility(const wxString& s) { visibility = s; }
65
long GetArgCount() const { return argCount; }
66
void iSetArgCount(long ac) { argCount = ac; }
68
bool CanCreate() { return false; }
72
wxArrayString argNamesArray, argTypesArray, argModesArray, argDefsArray;
73
wxString returnType, source, visibility;
76
class edbPackageProcedureFactory : public edbPackageFunctionFactory
79
edbPackageProcedureFactory();
80
virtual pgObject *CreateObjects(pgCollection *obj, ctlTree *browser, const wxString &restr=wxEmptyString);
82
extern edbPackageProcedureFactory packageProcedureFactory;
85
class edbPackageProcedure : public edbPackageFunction
88
edbPackageProcedure(edbPackage *newPackage, const wxString& newName=wxT(""));
89
wxString GetFullName();
91
bool GetIsProcedure() const { return true; }
93
wxString GetSql(ctlTree *browser);