From 02d28d981c0bdd8d621ec1333bf60ad1c592e43e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Sat, 18 Oct 2008 12:25:03 +0000 Subject: [PATCH] mathparser_flags.h: follow our naming convention part 2/2 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26937 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/MathParser.h | 2 +- src/mathed/MathParser_flags.h | 51 +++++++++++++++++++++++++++++++++++ src/mathed/MathSupport.h | 2 +- 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 src/mathed/MathParser_flags.h diff --git a/src/mathed/MathParser.h b/src/mathed/MathParser.h index aa798e7cca..7aea064077 100644 --- a/src/mathed/MathParser.h +++ b/src/mathed/MathParser.h @@ -13,7 +13,7 @@ #ifndef MATH_PARSER_H #define MATH_PARSER_H -#include "mathparser_flags.h" +#include "MathParser_flags.h" #include "support/types.h" #include "support/docstring.h" diff --git a/src/mathed/MathParser_flags.h b/src/mathed/MathParser_flags.h new file mode 100644 index 0000000000..41d5cd7982 --- /dev/null +++ b/src/mathed/MathParser_flags.h @@ -0,0 +1,51 @@ +// -*- C++ -*- +/** + * \file mathparser_flags.h + * This file is part of LyX, the document processor. + * Licence details can be found in the file COPYING. + * + * \author Enrico Forestieri + * + * Full author contact details are available in file CREDITS. + */ + +#ifndef MATHPARSER_FLAGS_H +#define MATHPARSER_FLAGS_H + +namespace lyx { + +namespace Parse { + +enum flags { + /// Parse normally. + NORMAL = 0x00, + /// Start parsing in text mode. + TEXTMODE = 0x01, + /// Parse verbatim. + VERBATIM = 0x02, + /// Quiet operation (no warnigs or errors). + QUIET = 0x04 +}; + + +inline flags operator|(flags const f, flags const g) +{ + return static_cast(int(f) | int(g)); +} + + +inline flags & operator|=(flags & f, flags g) +{ + return f = static_cast(int(f) | int(g)); +} + + +inline flags operator&(flags const f, flags const g) +{ + return static_cast(int(f) & int(g)); +} + +} // namespace Parse + +} // namespace lyx +#endif diff --git a/src/mathed/MathSupport.h b/src/mathed/MathSupport.h index 8bda8ac80a..85f0292762 100644 --- a/src/mathed/MathSupport.h +++ b/src/mathed/MathSupport.h @@ -13,7 +13,7 @@ #ifndef MATH_SUPPORT_H #define MATH_SUPPORT_H -#include "mathparser_flags.h" +#include "MathParser_flags.h" #include "support/strfwd.h" #include -- 2.39.5