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 // pgConstraints.h - Constraint collection 9 // 10 ////////////////////////////////////////////////////////////////////////// 11 12 13 #ifndef __CONSTRAINTS_H 14 #define __CONSTRAINTS_H 15 16 #include "pgTable.h" 17 #include "pgDomain.h" 18 19 20 class pgConstraintCollection : public pgSchemaObjCollection 21 { 22 public: 23 pgConstraintCollection(pgaFactory *factory, pgSchema *schema); 24 GetHelpPage(bool forCreate)25 wxString GetHelpPage(bool forCreate) const 26 { 27 return wxT("pg/sql-altertable"); 28 } CanCreate()29 bool CanCreate() 30 { 31 return true; 32 } 33 wxMenu *GetNewMenu(); 34 35 void ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *properties, ctlSQLBox *sqlPane); 36 wxString GetTranslatedMessage(int kindOfMessage) const; 37 38 pgTable *table; 39 pgDomain *domain; 40 }; 41 42 43 class pgConstraintFactory : public pgSchemaObjFactory 44 { 45 public: 46 pgConstraintFactory(); CreateDialog(class frmMain *,class pgObject *,class pgObject *)47 virtual dlgProperty *CreateDialog(class frmMain *, class pgObject *, class pgObject *) 48 { 49 return 0; 50 } 51 virtual pgCollection *CreateCollection(pgObject *obj); 52 }; 53 extern pgConstraintFactory constraintFactory; 54 extern pgaCollectionFactory constraintCollectionFactory; 55 56 #endif 57