1 //////////////////////////////////////////////////////////////////////////
2 //
3 // pgAdmin III - PostgreSQL Tools
4 //
5 // Copyright (C) 2002 - 2016, The pgAdmin Development Team
6 // This software is released under the PostgreSQL Licence
7 //
8 // edbPackageVariable.h - EnterpriseDB Package variable
9 //
10 //////////////////////////////////////////////////////////////////////////
11 
12 #ifndef EDBPACKAGEVARIABLE_H
13 #define EDBPACKAGEVARIABLE_H
14 
15 #include "edbPackage.h"
16 class pgCollection;
17 class edbPackageVariable;
18 
19 class edbPackageVariableFactory : public edbPackageObjFactory
20 {
21 public:
22 	edbPackageVariableFactory();
CreateDialog(frmMain * frame,pgObject * node,pgObject * parent)23 	virtual dlgProperty *CreateDialog(frmMain *frame, pgObject *node, pgObject *parent)
24 	{
25 		return 0;
26 	};
27 	virtual pgObject *CreateObjects(pgCollection *obj, ctlTree *browser, const wxString &restr = wxEmptyString);
28 	pgCollection *CreateCollection(pgObject *obj);
29 };
30 extern edbPackageVariableFactory packageVariableFactory;
31 
32 
33 class edbPackageVariable : public edbPackageObject
34 {
35 public:
36 	edbPackageVariable(edbPackage *newPackage, const wxString &newName = wxT(""));
37 
38 	wxString GetTranslatedMessage(int kindOfMessage) const;
39 	void ShowTreeDetail(ctlTree *browser, frmMain *form = 0, ctlListView *properties = 0, ctlSQLBox *sqlPane = 0);
40 
41 	wxString GetSql(ctlTree *browser);
42 
43 	pgObject *Refresh(ctlTree *browser, const wxTreeItemId item);
44 
GetDataType()45 	wxString GetDataType() const
46 	{
47 		return dataType;
48 	}
iSetDataType(const wxString & s)49 	void iSetDataType(const wxString &s)
50 	{
51 		dataType = s;
52 	}
GetVisibility()53 	wxString GetVisibility() const
54 	{
55 		return visibility;
56 	}
iSetVisibility(const wxString & s)57 	void iSetVisibility(const wxString &s)
58 	{
59 		visibility = s;
60 	}
61 
CanCreate()62 	bool CanCreate()
63 	{
64 		return false;
65 	}
66 
67 private:
68 	wxString dataType, visibility;
69 };
70 
71 class edbPackageVariableCollection : public edbPackageObjCollection
72 {
73 public:
74 	edbPackageVariableCollection(pgaFactory *factory, edbPackage *pkg);
75 	wxString GetTranslatedMessage(int kindOfMessage) const;
76 };
77 
78 #endif
79