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 // gqbObject.h - Main basic object used by GQB 9 // 10 ////////////////////////////////////////////////////////////////////////// 11 12 #ifndef GQBOBJECT_H 13 #define GQBOBJECT_H 14 15 enum type_gqbObject 16 { 17 GQB_DATABASE, 18 GQB_SCHEMA, 19 GQB_TABLE, 20 GQB_VIEW, 21 GQB_COLUMN, 22 GQB_QUERYOBJ, 23 GQB_QUERY, 24 GQB_JOIN, 25 GQB_RESTRICTION 26 }; 27 28 // Create Array Objects used as base for gqbCollections 29 class gqbObject : public wxTreeItemData 30 { 31 public: 32 gqbObject(wxString name, wxTreeItemData *owner, pgConn *connection, OID oid = 0); 33 virtual ~gqbObject(); getName()34 const wxString &getName() 35 { 36 return Name; 37 } getOwner()38 wxTreeItemData *getOwner() 39 { 40 return Owner; 41 } getType()42 const type_gqbObject getType() 43 { 44 return Type; 45 } setType(const type_gqbObject type)46 void setType(const type_gqbObject type) 47 { 48 Type = type; 49 } getConnection()50 pgConn *getConnection() 51 { 52 return conn; 53 } getOid()54 OID getOid() 55 { 56 return Oid; 57 } 58 59 protected: 60 pgConn *conn; 61 62 private: 63 wxString Name; 64 wxTreeItemData *Owner; 65 type_gqbObject Type; 66 OID Oid; 67 }; 68 #endif 69