Debian Codegraph @

CodeLite/PHPEntityFunction.h

raw
1 //////////////////////////////////////////////////////////////////////////////
2 //////////////////////////////////////////////////////////////////////////////
3 //
4 // Copyright : (C) 2015 Eran Ifrah
5 // File name : PHPEntityFunction.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 PHPENTITYFUNCTION_H
27 #define PHPENTITYFUNCTION_H
28
29 #include "codelite_exports.h"
30 #include "PHPEntityBase.h" // Base class: PHPEntityBase
31 #include <vector>
32
33 class WXDLLIMPEXP_CL PHPEntityFunction : public PHPEntityBase
34 {
35 public:
36 virtual wxString FormatPhpDoc(const CommentConfigData& data) const;
37 virtual wxString GetDisplayName() const;
38 virtual bool Is(eEntityType type) const;
39 virtual wxString Type() const;
40 virtual void FromResultSet(wxSQLite3ResultSet& res);
41 virtual void PrintStdout(int indent) const;
42
43 void FromJSON(const JSONItem& json);
44 JSONItem ToJSON() const;
45
46 protected:
47 // The local variabels defined in this function of type
48 // PHPEntityVariable
49 PHPEntityBase::List_t m_locals;
50
51 // the return value as read from the database
52 wxString m_strReturnValue;
53
54 // the signature
55 wxString m_strSignature;
56
57 public:
58 PHPEntityFunction();
59 virtual ~PHPEntityFunction();
60 const wxString& GetReturnValue() const { return m_strReturnValue; }
61 void SetReturnValue(const wxString& strReturnValue) { this->m_strReturnValue = strReturnValue; }
62
63 wxString GetScope() const;
64 /**
65 * @brief format function signature
66 */
67 wxString GetSignature() const;
68
69 /**
70 * @brief return the full path for this function
71 * Example: \path\toClass::functionName($a, $b)
72 */
73 wxString GetFullPath() const;
74
75 /**
76 * @brief write this object into the database
77 * @param db
78 */
79 virtual void Store(PHPLookupTable* lookup);
80
81 virtual wxString ToTooltip() const;
82 };
83
84 #endif // PHPENTITYFUNCTION_H