Debian Codegraph @

CodeLite/PHPDocVar.h

raw
1 #ifndef PHPDOCVAR_H
2 #define PHPDOCVAR_H
3
4 #include "codelite_exports.h"
5 #include <wx/string.h>
6 #include "PHPSourceFile.h"
7 #include "smart_ptr.h"
8 #include <list>
9 #include <map>
10 #include "wx/wxsqlite3.h"
11
12 class WXDLLIMPEXP_CL PHPDocVar
13 {
14 bool m_isOk;
15 wxString m_name;
16 wxString m_type;
17 wxLongLong m_dbId;
18 wxLongLong m_parentDbId;
19 wxFileName m_filename;
20 int m_lineNumber;
21
22 private:
23 void Parse(PHPSourceFile& sourceFile, const wxString& doc);
24
25 public:
26 typedef SmartPtr<PHPDocVar> Ptr_t;
27 typedef std::list<PHPDocVar::Ptr_t> List_t;
28 typedef std::map<wxString, PHPDocVar::Ptr_t> Map_t;
29
30 public:
31 PHPDocVar(PHPSourceFile& sourceFile, const wxString& doc);
32 PHPDocVar();
33 virtual ~PHPDocVar();
34
35 bool IsOk() const { return m_isOk; }
36
37 void SetName(const wxString& name) { this->m_name = name; }
38 void SetType(const wxString& type) { this->m_type = type; }
39
40 const wxString& GetName() const { return m_name; }
41 const wxString& GetType() const { return m_type; }
42
43 void SetDbId(const wxLongLong& dbId) { this->m_dbId = dbId; }
44 const wxLongLong& GetDbId() const { return m_dbId; }
45
46 void SetParentDbId(const wxLongLong& parentDbId) { this->m_parentDbId = parentDbId; }
47 const wxLongLong& GetParentDbId() const { return m_parentDbId; }
48
49 void SetFilename(const wxFileName& filename) { this->m_filename = filename; }
50 void SetIsOk(bool isOk) { this->m_isOk = isOk; }
51 void SetLineNumber(int lineNumber) { this->m_lineNumber = lineNumber; }
52 const wxFileName& GetFilename() const { return m_filename; }
53 int GetLineNumber() const { return m_lineNumber; }
54
55 // Database API
56 void Store(wxSQLite3Database& db, wxLongLong parentDdId);
57 void FromResultSet(wxSQLite3ResultSet& res);
58 };
59
60 #endif // PHPDOCVAR_H