Debian Codegraph @

CodeLite/variable.h

raw
1 //////////////////////////////////////////////////////////////////////////////
2 //////////////////////////////////////////////////////////////////////////////
3 //
4 // Copyright : (C) 2015 Eran Ifrah
5 // File name : variable.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 VARIABLE_H
27 #define VARIABLE_H
28
29 #include "codelite_exports.h"
30 #include "list"
31 #include "string"
32 #include <stdio.h>
33
34 class WXDLLIMPEXP_CL Variable
35 {
36 public:
37 std::string m_name;
38 bool m_isTemplate;
39 std::string m_templateDecl;
40 bool m_isPtr;
41 std::string m_type; // as in 'int a;' -> type=int
42 std::string m_typeScope; // as in 'std::string a;' -> typeScope = std, type=string
43 std::string m_pattern;
44 std::string m_completeType;
45 std::string m_starAmp;
46 int m_lineno;
47 bool m_isConst;
48 std::string m_rightSideConst;
49 std::string m_defaultValue; // used mainly for function arguments with default values foo(int = 0);
50 std::string m_arrayBrackets;
51 bool m_isEllipsis;
52 bool m_isBasicType;
53 bool m_isVolatile;
54 bool m_isAuto;
55 bool m_enumInTypeDecl; // e.g. enum MyENum e
56
57 public:
58 Variable();
59 virtual ~Variable();
60
61 // copy ctor
62 Variable(const Variable& src);
63
64 // operator =
65 Variable& operator=(const Variable& src);
66
67 // clear the class content
68 void Reset();
69
70 // print the variable to stdout
71 void Print();
72 };
73
74 typedef std::list<Variable> VariableList;
75 #endif // VARIABLE_H