| 1 |
////////////////////////////////////////////////////////////////////////////// |
| 2 |
////////////////////////////////////////////////////////////////////////////// |
| 3 |
// |
| 4 |
// copyright : (C) 2014 Eran Ifrah |
| 5 |
// file name : dbitem.h |
| 6 |
// |
| 7 |
// ------------------------------------------------------------------------- |
| 8 |
// A |
| 9 |
// _____ _ _ _ _ |
| 10 |
// / __ \ | | | | (_) | |
| 11 |
// | / \/ ___ __| | ___| | _| |_ ___ |
| 12 |
// | | / _ \ / _ |/ _ \ | | | __/ _ ) |
| 13 |
// | \__/\ (_) | (_| | __/ |___| | || __/ |
| 14 |
// \____/\___/ \__,_|\___\_____/_|\__\___| |
| 15 |
// |
| 16 |
// F i l e |
| 17 |
// |
| 18 |
// This program is free software; you can redistribute it and/or modify |
| 19 |
// it under the terms of the GNU General Public License as published by |
| 20 |
// the Free Software Foundation; either version 2 of the License, or |
| 21 |
// (at your option) any later version. |
| 22 |
// |
| 23 |
////////////////////////////////////////////////////////////////////////////// |
| 24 |
////////////////////////////////////////////////////////////////////////////// |
| 25 |
|
| 26 |
#ifndef DBITEM_H |
| 27 |
#define DBITEM_H |
| 28 |
#include "database.h" |
| 29 |
#include "table.h" |
| 30 |
#include <wx/treebase.h> // Base class: wxTreeItemData |
| 31 |
/*! \brief Class for saving pointer to database objects into tree control in DbViewerPanel */ |
| 32 |
class DbItem : public wxTreeItemData { |
| 33 |
protected: |
| 34 |
Database* m_pDatabase; |
| 35 |
Table* m_pTable; |
| 36 |
xsSerializable* m_pData; |
| 37 |
public: |
| 38 |
DbItem(Database* pDatabase, Table* pTable); |
| 39 |
DbItem(xsSerializable* data); |
| 40 |
virtual ~DbItem(); |
| 41 |
|
| 42 |
Database* GetDatabase(){ return this->m_pDatabase; } |
| 43 |
Table* GetTable(){ return this->m_pTable; } |
| 44 |
xsSerializable* GetData() { return this->m_pData; } |
| 45 |
}; |
| 46 |
|
| 47 |
#endif // DBITEM_H |