Doxygen
Loading...
Searching...
No Matches
define.h
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Copyright (C) 1997-2020 by Dimitri van Heesch.
4 *
5 * Permission to use, copy, modify, and distribute this software and its
6 * documentation under the terms of the GNU General Public License is hereby
7 * granted. No representations are made about the suitability of this software
8 * for any purpose. It is provided "as is" without express or implied warranty.
9 * See the GNU General Public License for more details.
10 *
11 * Documents produced by Doxygen are derivative works derived from the
12 * input used in their production; they are not affected by this license.
13 *
14 */
15
16#ifndef DEFINE_H
17#define DEFINE_H
18
19#include <vector>
20#include <memory>
21#include <string>
22#include <unordered_map>
23
24#include "dstring.h"
25#include "containers.h"
26
27class FileDef;
28
29/** A class representing a macro definition. */
30class Define
31{
32 public:
37 FileDef *fileDef = nullptr;
38 int lineNr = 1;
39 size_t columnNr = 1;
40 int nargs = -1;
41 bool undef = false;
42 bool varArgs = false;
43 bool isPredefined = false;
44 bool nonRecursive = false;
45 bool expandAsDefined = false;
46};
47
48/** List of all macro definitions */
49using DefineList = std::vector<Define>;
50using DefinesPerFileList = std::unordered_map< std::string, DefineList >;
51
52#endif
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition dstring.h:89
A class representing a macro definition.
Definition define.h:31
int lineNr
Definition define.h:38
bool varArgs
Definition define.h:42
DString name
Definition define.h:33
FileDef * fileDef
Definition define.h:37
bool nonRecursive
Definition define.h:44
DString args
Definition define.h:36
bool isPredefined
Definition define.h:43
DString fileName
Definition define.h:35
size_t columnNr
Definition define.h:39
int nargs
Definition define.h:40
bool expandAsDefined
Definition define.h:45
DString definition
Definition define.h:34
bool undef
Definition define.h:41
A model of a file symbol.
Definition filedef.h:99
std::unordered_map< std::string, DefineList > DefinesPerFileList
Definition define.h:50
std::vector< Define > DefineList
List of all macro definitions.
Definition define.h:49