-class IgnoreFormats {
- static bool ignoreFamily;
- static bool ignoreSeries;
- static bool ignoreShape;
- static bool ignoreUnderline;
- static bool ignoreMarkUp;
- static bool ignoreStrikeOut;
- static bool ignoreSectioning;
- static bool ignoreFrontMatter;
- static bool ignoreColor;
- static bool ignoreLanguage;
- public:
- bool getFamily() { return ignoreFamily; };
- bool getSeries() { return ignoreSeries; };
- bool getShape() { return ignoreShape; };
- bool getUnderline() { return ignoreUnderline; };
- bool getMarkUp() { return ignoreMarkUp; };
- bool getStrikeOut() { return ignoreStrikeOut; };
- bool getSectioning() { return ignoreSectioning; };
- bool getFrontMatter() { return ignoreFrontMatter; };
- bool getColor() { return ignoreColor; };
- bool getLanguage() { return ignoreLanguage; };
-
- void setIgnoreFormat(string type, bool value);
-};
-
-bool IgnoreFormats::ignoreFamily = false;
-bool IgnoreFormats::ignoreSeries = false;
-bool IgnoreFormats::ignoreShape = false;
-bool IgnoreFormats::ignoreUnderline = false;
-bool IgnoreFormats::ignoreMarkUp = false;
-bool IgnoreFormats::ignoreStrikeOut = false;
-bool IgnoreFormats::ignoreSectioning = false;
-bool IgnoreFormats::ignoreFrontMatter= true;
-bool IgnoreFormats::ignoreColor = false;
-bool IgnoreFormats::ignoreLanguage = false;
-
-void IgnoreFormats::setIgnoreFormat(string type, bool value)
-{
- if (type == "color") {
- ignoreColor = value;
- }
- else if (type == "language") {
- ignoreLanguage = value;
- }
- else if (type == "sectioning") {
- ignoreSectioning = value;
- ignoreFrontMatter = value;
- }
- else if (type == "font") {
- ignoreSeries = value;
- ignoreShape = value;
- ignoreFamily = value;
- }
- else if (type == "series") {
- ignoreSeries = value;
- }
- else if (type == "shape") {
- ignoreShape = value;
- }
- else if (type == "family") {
- ignoreFamily = value;
- }
- else if (type == "markup") {
- ignoreMarkUp = value;
- }
- else if (type == "underline") {
- ignoreUnderline = value;
- }
- else if (type == "strike") {
- ignoreStrikeOut = value;
- }
-}
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Wpragmas"
-#pragma GCC diagnostic ignored "-Wunused"
-#pragma GCC diagnostic ignored "-Wunused-function"
-
-#ifdef __GNUC__
-#define SUPPRESS_NOT_USED_WARN __attribute__ ((unused))
-#else
-#define SUPPRESS_NOT_USED_WARN
-#endif
-
-void SUPPRESS_NOT_USED_WARN setIgnoreFormat(string type, bool value)
-{
- IgnoreFormats().setIgnoreFormat(type, value);
-}
-#pragma GCC diagnostic pop
-