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 // slSequence.h PostgreSQL Slony-I Node 9 // 10 ////////////////////////////////////////////////////////////////////////// 11 12 #ifndef SLSEQUENCE_H 13 #define SLSEQUENCE_H 14 15 #include "schema/pgDatabase.h" 16 #include "slony/slSet.h" 17 18 class slSlSequenceFactory : public slSetObjFactory 19 { 20 public: 21 slSlSequenceFactory(); 22 virtual dlgProperty *CreateDialog(frmMain *frame, pgObject *node, pgObject *parent); 23 virtual pgObject *CreateObjects(pgCollection *obj, ctlTree *browser, const wxString &restr = wxEmptyString); 24 virtual pgCollection *CreateCollection(pgObject *obj); 25 }; 26 extern slSlSequenceFactory slSequenceFactory; 27 28 29 class slSequence : public slSetObject 30 { 31 public: 32 slSequence(slSet *set, const wxString &newName = wxT("")); 33 34 void ShowTreeDetail(ctlTree *browser, frmMain *form = 0, ctlListView *properties = 0, ctlSQLBox *sqlPane = 0); 35 36 wxString GetTranslatedMessage(int kindOfMessage) const; 37 GetActive()38 bool GetActive() const 39 { 40 return active; 41 } iSetActive(bool b)42 void iSetActive(bool b) 43 { 44 active = b; 45 } 46 47 bool DropObject(wxFrame *frame, ctlTree *browser, bool cascaded); 48 wxString GetSql(ctlTree *browser); 49 pgObject *Refresh(ctlTree *browser, const wxTreeItemId item); 50 51 private: 52 bool active; 53 }; 54 55 class slSlSequenceCollection : public slSetObjCollection 56 { 57 public: slSlSequenceCollection(pgaFactory * factory,slSet * set)58 slSlSequenceCollection(pgaFactory *factory, slSet *set) : slSetObjCollection(factory, set) {} 59 wxString GetTranslatedMessage(int kindOfMessage) const; 60 }; 61 62 #endif 63 64