Debian Codegraph @

DatabaseExplorer/view.h

raw
1 //////////////////////////////////////////////////////////////////////////////
2 //////////////////////////////////////////////////////////////////////////////
3 //
4 // copyright : (C) 2014 Eran Ifrah
5 // file name : view.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 VIEW_H
27 #define VIEW_H
28
29 #include <wx/wx.h>
30 #include <wx/dblayer/include/DatabaseResultSet.h>
31 #include <wx/wxxmlserializer/XmlSerializer.h>
32 #include "IDbAdapter.h"
33 // ------------------------------------------------
34 // Trida View
35 // -------------------------------------------------
36 /*! \brief Class representing database view. */
37 class View : public xsSerializable {
38
39 public:
40 XS_DECLARE_CLONABLE_CLASS(View);
41 /*! \brief Default constructors */
42 View();
43 View(const View& obj);
44 View(IDbAdapter* dbAdapter,const wxString& name, const wxString& parentName, const wxString& select);
45 /*! \brief Default destructors */
46 virtual ~View();
47
48 /*! \brief Set view name */
49 void SetName(const wxString & name) {
50 this->m_name = name;
51 }
52 /*! \brief Set parent name (Database) */
53 void SetParentName(const wxString & parentName) {
54 this->m_parentName = parentName;
55 }
56 /*! \brief Set SELECT string */
57 void SetSelect(const wxString & select) {
58 this->m_select = select;
59 }
60 /*! \brief Get view name */
61 const wxString & GetName() const {
62 return m_name;
63 }
64 /*! \brief Get paretn name (database) */
65 const wxString & GetParentName() const {
66 return m_parentName;
67 }
68 /*! \brief Get SELECT string */
69 const wxString & GetSelect() const {
70 return m_select;
71 }
72 /*! \brief Get IDbAdapter */
73 IDbAdapter * GetDbAdapter() {
74 return m_pDbAdapter;
75 }
76
77 protected:
78 wxString m_name;
79 wxString m_parentName;
80 wxString m_select;
81 void initSerializable();
82 IDbAdapter* m_pDbAdapter;
83 };
84
85 #endif // VIEW_H