]> git.lyx.org Git - lyx.git/blob - src/mathed/MathParser_flags.h
Replace boost::scoped_ptr with unique_ptr
[lyx.git] / src / mathed / MathParser_flags.h
1 // -*- C++ -*-
2 /**
3  * \file mathparser_flags.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author Enrico Forestieri
8  *
9  * Full author contact details are available in file CREDITS.
10  */
11
12 #ifndef MATHPARSER_FLAGS_H
13 #define MATHPARSER_FLAGS_H
14
15 namespace lyx {
16
17 namespace Parse {
18
19 enum flags {
20         /// Parse normally.
21         NORMAL = 0x00,
22         /// Start parsing in text mode.
23         TEXTMODE = 0x01,
24         /// Parse verbatim.
25         VERBATIM = 0x02,
26         /// Quiet operation (no warnigs or errors).
27         QUIET = 0x04,
28         /// Wrap unicode symbols in \text{}.
29         USETEXT = 0x08,
30         /// Track macro creation while loading a document
31         TRACKMACRO = 0x10
32 };
33
34
35 inline flags operator|(flags const f, flags const g)
36 {
37         return static_cast<flags>(int(f) | int(g));
38 }
39
40
41 inline flags & operator|=(flags & f, flags g)
42 {
43         return f = static_cast<flags>(int(f) | int(g));
44 }
45
46
47 inline flags operator&(flags const f, flags const g)
48 {
49         return static_cast<flags>(int(f) & int(g));
50 }
51
52 } // namespace Parse
53
54 } // namespace lyx
55 #endif