From 62959f5385b30e97f4acce32e080e67724e23afb Mon Sep 17 00:00:00 2001
From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz>
Date: Tue, 9 Jun 2015 22:17:26 +0200
Subject: [PATCH] types aggregation header

---
 acast2/src/cast/AutomatonCastVisitor.cpp      |  1 +
 acast2/src/cast/TreeToStringCastVisitor.cpp   |  2 +
 .../test-src/string/compare/compareTest.cpp   |  1 +
 alib2data/src/XmlApi.cpp                      | 60 +++----------------
 alib2data/src/alphabet/SymbolClasses.h        | 24 ++++++++
 .../src/alphabet/SymbolFromXMLParser.cpp      | 13 +---
 alib2data/src/exception/ExceptionClasses.h    | 13 ++++
 .../src/exception/ExceptionFromXMLParser.cpp  |  2 +-
 .../src/exception/ExceptionToXMLComposer.cpp  |  2 +-
 alib2data/src/label/LabelClasses.h            | 18 ++++++
 alib2data/src/label/LabelFromXMLParser.cpp    |  7 +--
 alib2data/src/label/LabelToXMLComposer.cpp    |  7 +--
 alib2data/src/object/ObjectClasses.h          | 13 ++++
 alib2data/src/object/ObjectFromXMLParser.cpp  |  2 +-
 alib2data/src/object/ObjectToXMLComposer.cpp  |  2 +-
 alib2data/src/primitive/PrimitiveClasses.h    | 17 ++++++
 .../src/primitive/PrimitiveFromXMLParser.cpp  |  6 +-
 .../src/primitive/PrimitiveToXMLComposer.cpp  |  5 +-
 alib2data/src/string/CyclicString.h           |  2 +
 alib2data/src/string/LinearString.h           |  2 +
 alib2data/src/string/StringClasses.h          | 15 +++++
 alib2data/src/string/StringFromXMLParser.cpp  |  4 +-
 alib2data/src/string/StringToXMLComposer.cpp  |  4 +-
 .../test-src/automaton/AutomatonTest.cpp      |  2 +
 24 files changed, 128 insertions(+), 96 deletions(-)
 create mode 100644 alib2data/src/alphabet/SymbolClasses.h
 create mode 100644 alib2data/src/exception/ExceptionClasses.h
 create mode 100644 alib2data/src/label/LabelClasses.h
 create mode 100644 alib2data/src/object/ObjectClasses.h
 create mode 100644 alib2data/src/primitive/PrimitiveClasses.h
 create mode 100644 alib2data/src/string/StringClasses.h

diff --git a/acast2/src/cast/AutomatonCastVisitor.cpp b/acast2/src/cast/AutomatonCastVisitor.cpp
index f86ba00e60..37b3bdc700 100644
--- a/acast2/src/cast/AutomatonCastVisitor.cpp
+++ b/acast2/src/cast/AutomatonCastVisitor.cpp
@@ -6,6 +6,7 @@
  */
 
 #include "AutomatonCastVisitor.h"
+#include "automaton/AutomatonClasses.h"
 
 #include "../CastVisitorBase.hpp"
 
diff --git a/acast2/src/cast/TreeToStringCastVisitor.cpp b/acast2/src/cast/TreeToStringCastVisitor.cpp
index 1fdb6033b4..e3a1c1c2bd 100644
--- a/acast2/src/cast/TreeToStringCastVisitor.cpp
+++ b/acast2/src/cast/TreeToStringCastVisitor.cpp
@@ -6,6 +6,8 @@
  */
 
 #include "TreeToStringCastVisitor.h"
+#include "string/StringClasses.h"
+
 #include "../CastVisitorBase.hpp"
 
 typedef cast_base_helper< tree::VisitableTreeBase::const_visitor_type, tree::TreeBase, alib::TreeTypes, string::String, alib::StringTypes > TreeToStringCastVisitorType;
diff --git a/alib2algo/test-src/string/compare/compareTest.cpp b/alib2algo/test-src/string/compare/compareTest.cpp
index 7d1e4af543..ce30104f1f 100644
--- a/alib2algo/test-src/string/compare/compareTest.cpp
+++ b/alib2algo/test-src/string/compare/compareTest.cpp
@@ -6,6 +6,7 @@
 #include "string/simplify/NormalizeRotation.h"
 #include "string/LinearString.h"
 #include "string/CyclicString.h"
+#include "string/Epsilon.h"
 
 #define CPPUNIT_IMPLY(x, y) CPPUNIT_ASSERT(!(x) || (y))
 
diff --git a/alib2data/src/XmlApi.cpp b/alib2data/src/XmlApi.cpp
index effa2b099a..c83f8bd9bc 100644
--- a/alib2data/src/XmlApi.cpp
+++ b/alib2data/src/XmlApi.cpp
@@ -7,59 +7,13 @@
 
 #include "XmlApi.hpp"
 
-#include "alphabet/LabeledSymbol.h"
-#include "alphabet/BlankSymbol.h"
-#include "alphabet/BottomOfTheStackSymbol.h"
-#include "alphabet/BarSymbol.h"
-#include "alphabet/VariablesBarSymbol.h"
-#include "alphabet/StartSymbol.h"
-#include "alphabet/EndSymbol.h"
-#include "alphabet/RankedSymbol.h"
-#include "alphabet/SymbolPairSymbol.h"
-#include "alphabet/SymbolSetSymbol.h"
-#include "alphabet/SubtreeWildcardSymbol.h"
-#include "alphabet/UniqueSymbol.h"
-
-#include "label/PrimitiveLabel.h"
-#include "label/HexavigesimalLabel.h"
-#include "label/ObjectLabel.h"
-#include "label/LabelSetLabel.h"
-#include "label/LabelPairLabel.h"
-#include "label/UniqueLabel.h"
-
-#include "primitive/Primitive.h"
-#include "primitive/Bool.h"
-#include "primitive/Integer.h"
-#include "primitive/String.h"
-#include "primitive/Character.h"
-
-#include "object/Void.h"
-
-#include "exception/AlibException.h"
-
-#include "string/CyclicString.h"
-#include "string/LinearString.h"
-#include "string/Epsilon.h"
-
-#include "automaton/FSM/EpsilonNFA.h"
-#include "automaton/FSM/NFA.h"
-#include "automaton/FSM/MultiInitialStateNFA.h"
-#include "automaton/FSM/DFA.h"
-#include "automaton/FSM/CompactNFA.h"
-#include "automaton/FSM/ExtendedNFA.h"
-#include "automaton/PDA/DPDA.h"
-#include "automaton/PDA/SinglePopDPDA.h"
-#include "automaton/PDA/InputDrivenDPDA.h"
-#include "automaton/PDA/InputDrivenNPDA.h"
-#include "automaton/PDA/VisiblyPushdownDPDA.h"
-#include "automaton/PDA/VisiblyPushdownNPDA.h"
-#include "automaton/PDA/RealTimeHeightDeterministicDPDA.h"
-#include "automaton/PDA/RealTimeHeightDeterministicNPDA.h"
-#include "automaton/PDA/NPDA.h"
-#include "automaton/PDA/SinglePopNPDA.h"
-#include "automaton/TM/OneTapeDTM.h"
-#include "automaton/TA/DFTA.h"
-#include "automaton/TA/NFTA.h"
+#include "alphabet/SymbolClasses.h"
+#include "label/LabelClasses.h"
+#include "primitive/PrimitiveClasses.h"
+#include "object/ObjectClasses.h"
+#include "exception/ExceptionClasses.h"
+#include "string/StringClasses.h"
+#include "automaton/AutomatonClasses.h"
 
 namespace alib {
 
diff --git a/alib2data/src/alphabet/SymbolClasses.h b/alib2data/src/alphabet/SymbolClasses.h
new file mode 100644
index 0000000000..8d33b65075
--- /dev/null
+++ b/alib2data/src/alphabet/SymbolClasses.h
@@ -0,0 +1,24 @@
+/*
+ * SymbolClasses.h
+ *
+ *  Created on: Jun 19, 2014
+ *      Author: Jan Travnicek
+ */
+
+#ifndef SYMBOL_CLASSES_H_
+#define SYMBOL_CLASSES_H_
+
+#include "BlankSymbol.h"
+#include "BottomOfTheStackSymbol.h"
+#include "EndSymbol.h"
+#include "StartSymbol.h"
+#include "LabeledSymbol.h"
+#include "RankedSymbol.h"
+#include "BarSymbol.h"
+#include "VariablesBarSymbol.h"
+#include "SubtreeWildcardSymbol.h"
+#include "SymbolPairSymbol.h"
+#include "SymbolSetSymbol.h"
+#include "UniqueSymbol.h"
+
+#endif /* SYMBOL_CLASSES_H_ */
diff --git a/alib2data/src/alphabet/SymbolFromXMLParser.cpp b/alib2data/src/alphabet/SymbolFromXMLParser.cpp
index 29941d4b00..bcbe9464f4 100644
--- a/alib2data/src/alphabet/SymbolFromXMLParser.cpp
+++ b/alib2data/src/alphabet/SymbolFromXMLParser.cpp
@@ -12,18 +12,7 @@
 #include "../XmlApi.hpp"
 
 #include "Symbol.h"
-#include "BlankSymbol.h"
-#include "BottomOfTheStackSymbol.h"
-#include "EndSymbol.h"
-#include "StartSymbol.h"
-#include "LabeledSymbol.h"
-#include "RankedSymbol.h"
-#include "BarSymbol.h"
-#include "VariablesBarSymbol.h"
-#include "SubtreeWildcardSymbol.h"
-#include "SymbolPairSymbol.h"
-#include "SymbolSetSymbol.h"
-#include "UniqueSymbol.h"
+#include "SymbolClasses.h"
 
 namespace alphabet {
 
diff --git a/alib2data/src/exception/ExceptionClasses.h b/alib2data/src/exception/ExceptionClasses.h
new file mode 100644
index 0000000000..67592b494b
--- /dev/null
+++ b/alib2data/src/exception/ExceptionClasses.h
@@ -0,0 +1,13 @@
+/*
+ * ExceptionClasses.h
+ *
+ *  Created on: Jun 19, 2014
+ *      Author: Jan Travnicek
+ */
+
+#ifndef EXCEPTION_CLASSES_H_
+#define EXCEPTION_CLASSES_H_
+
+#include "AlibException.h"
+
+#endif /* EXCEPTION_CLASSES_H_ */
diff --git a/alib2data/src/exception/ExceptionFromXMLParser.cpp b/alib2data/src/exception/ExceptionFromXMLParser.cpp
index 153f405ad8..aacec3c945 100644
--- a/alib2data/src/exception/ExceptionFromXMLParser.cpp
+++ b/alib2data/src/exception/ExceptionFromXMLParser.cpp
@@ -10,7 +10,7 @@
 #include "../XmlApi.hpp"
 #include <string>
 
-#include "AlibException.h"
+#include "ExceptionClasses.h"
 
 namespace exception {
 
diff --git a/alib2data/src/exception/ExceptionToXMLComposer.cpp b/alib2data/src/exception/ExceptionToXMLComposer.cpp
index 14a1f47ad0..c0eb43aa2c 100644
--- a/alib2data/src/exception/ExceptionToXMLComposer.cpp
+++ b/alib2data/src/exception/ExceptionToXMLComposer.cpp
@@ -9,7 +9,7 @@
 
 #include "../XmlApi.hpp"
 
-#include "AlibException.h"
+#include "ExceptionClasses.h"
 
 namespace exception {
 
diff --git a/alib2data/src/label/LabelClasses.h b/alib2data/src/label/LabelClasses.h
new file mode 100644
index 0000000000..12c1254ca4
--- /dev/null
+++ b/alib2data/src/label/LabelClasses.h
@@ -0,0 +1,18 @@
+/*
+ * LabelClasses.h
+ *
+ *  Created on: Jun 19, 2014
+ *      Author: Jan Travnicek
+ */
+
+#ifndef LABEL_CLASSES_H_
+#define LABEL_CLASSES_H_
+
+#include "PrimitiveLabel.h"
+#include "HexavigesimalLabel.h"
+#include "ObjectLabel.h"
+#include "LabelSetLabel.h"
+#include "LabelPairLabel.h"
+#include "UniqueLabel.h"
+
+#endif /* LABEL_CLASSES_H_ */
diff --git a/alib2data/src/label/LabelFromXMLParser.cpp b/alib2data/src/label/LabelFromXMLParser.cpp
index e597118844..7792af2a79 100644
--- a/alib2data/src/label/LabelFromXMLParser.cpp
+++ b/alib2data/src/label/LabelFromXMLParser.cpp
@@ -10,12 +10,7 @@
 #include "../XmlApi.hpp"
 
 #include "Label.h"
-#include "PrimitiveLabel.h"
-#include "HexavigesimalLabel.h"
-#include "ObjectLabel.h"
-#include "LabelSetLabel.h"
-#include "LabelPairLabel.h"
-#include "UniqueLabel.h"
+#include "LabelClasses.h"
 
 namespace label {
 
diff --git a/alib2data/src/label/LabelToXMLComposer.cpp b/alib2data/src/label/LabelToXMLComposer.cpp
index 66e4f00c74..c316f6033c 100644
--- a/alib2data/src/label/LabelToXMLComposer.cpp
+++ b/alib2data/src/label/LabelToXMLComposer.cpp
@@ -9,12 +9,7 @@
 
 #include "../XmlApi.hpp"
 
-#include "PrimitiveLabel.h"
-#include "HexavigesimalLabel.h"
-#include "ObjectLabel.h"
-#include "LabelSetLabel.h"
-#include "LabelPairLabel.h"
-#include "UniqueLabel.h"
+#include "LabelClasses.h"
 
 namespace label {
 
diff --git a/alib2data/src/object/ObjectClasses.h b/alib2data/src/object/ObjectClasses.h
new file mode 100644
index 0000000000..a1e45f0caa
--- /dev/null
+++ b/alib2data/src/object/ObjectClasses.h
@@ -0,0 +1,13 @@
+/*
+ * ObjectClasses.h
+ *
+ *  Created on: Jun 19, 2014
+ *      Author: Jan Travnicek
+ */
+
+#ifndef OBJECT_CLASSES_H_
+#define OBJECT_CLASSES_H_
+
+#include "Void.h"
+
+#endif /* OBJECT_CLASSES_H_ */
diff --git a/alib2data/src/object/ObjectFromXMLParser.cpp b/alib2data/src/object/ObjectFromXMLParser.cpp
index 487f5916a0..38b2cef558 100644
--- a/alib2data/src/object/ObjectFromXMLParser.cpp
+++ b/alib2data/src/object/ObjectFromXMLParser.cpp
@@ -10,7 +10,7 @@
 #include "../XmlApi.hpp"
 
 #include "Object.h"
-#include "Void.h"
+#include "ObjectClasses.h"
 
 namespace alib {
 
diff --git a/alib2data/src/object/ObjectToXMLComposer.cpp b/alib2data/src/object/ObjectToXMLComposer.cpp
index da4f589c69..688e792e19 100644
--- a/alib2data/src/object/ObjectToXMLComposer.cpp
+++ b/alib2data/src/object/ObjectToXMLComposer.cpp
@@ -10,7 +10,7 @@
 #include "../XmlApi.hpp"
 
 #include "Object.h"
-#include "Void.h"
+#include "ObjectClasses.h"
 
 namespace alib {
 
diff --git a/alib2data/src/primitive/PrimitiveClasses.h b/alib2data/src/primitive/PrimitiveClasses.h
new file mode 100644
index 0000000000..bb5b30940b
--- /dev/null
+++ b/alib2data/src/primitive/PrimitiveClasses.h
@@ -0,0 +1,17 @@
+/*
+ * PrimitiveClasses.h
+ *
+ *  Created on: Jun 19, 2014
+ *      Author: Jan Travnicek
+ */
+
+#ifndef PRIMITIVE_CLASSES_H_
+#define PRIMITIVE_CLASSES_H_
+
+#include "String.h"
+#include "Integer.h"
+#include "Character.h"
+#include "Unsigned.h"
+#include "Bool.h"
+
+#endif /* PRIMITIVE_CLASSES_H_ */
diff --git a/alib2data/src/primitive/PrimitiveFromXMLParser.cpp b/alib2data/src/primitive/PrimitiveFromXMLParser.cpp
index 68dff68c69..1cb253ad1d 100644
--- a/alib2data/src/primitive/PrimitiveFromXMLParser.cpp
+++ b/alib2data/src/primitive/PrimitiveFromXMLParser.cpp
@@ -10,11 +10,7 @@
 #include "../XmlApi.hpp"
 
 #include "Primitive.h"
-#include "String.h"
-#include "Integer.h"
-#include "Character.h"
-#include "Unsigned.h"
-#include "Bool.h"
+#include "PrimitiveClasses.h"
 
 namespace primitive {
 
diff --git a/alib2data/src/primitive/PrimitiveToXMLComposer.cpp b/alib2data/src/primitive/PrimitiveToXMLComposer.cpp
index 44532e60c3..4be1fdfe72 100644
--- a/alib2data/src/primitive/PrimitiveToXMLComposer.cpp
+++ b/alib2data/src/primitive/PrimitiveToXMLComposer.cpp
@@ -10,10 +10,7 @@
 #include "../XmlApi.hpp"
 
 #include "Primitive.h"
-#include "Bool.h"
-#include "Integer.h"
-#include "String.h"
-#include "Character.h"
+#include "PrimitiveClasses.h"
 
 namespace primitive {
 
diff --git a/alib2data/src/string/CyclicString.h b/alib2data/src/string/CyclicString.h
index fbf9ff77a3..7aa953bd10 100644
--- a/alib2data/src/string/CyclicString.h
+++ b/alib2data/src/string/CyclicString.h
@@ -15,6 +15,8 @@
 #include "../alphabet/Symbol.h"
 #include "common/StringAlphabet.h"
 
+#include "Epsilon.h"
+
 namespace string {
 
 /**
diff --git a/alib2data/src/string/LinearString.h b/alib2data/src/string/LinearString.h
index 2b3c839d61..538e4e7ad5 100644
--- a/alib2data/src/string/LinearString.h
+++ b/alib2data/src/string/LinearString.h
@@ -17,6 +17,8 @@
 #include "common/StringAlphabet.h"
 #include "../tree/ranked/PrefixRankedTree.h"
 
+#include "Epsilon.h"
+
 namespace string {
 
 /**
diff --git a/alib2data/src/string/StringClasses.h b/alib2data/src/string/StringClasses.h
new file mode 100644
index 0000000000..364fd52ac5
--- /dev/null
+++ b/alib2data/src/string/StringClasses.h
@@ -0,0 +1,15 @@
+/*
+ * StringClasses.h
+ *
+ *  Created on: Jun 19, 2014
+ *      Author: Jan Travnicek
+ */
+
+#ifndef STRING_CLASSES_H_
+#define STRING_CLASSES_H_
+
+#include "CyclicString.h"
+#include "LinearString.h"
+#include "Epsilon.h"
+
+#endif /* STRING_CLASSES_H_ */
diff --git a/alib2data/src/string/StringFromXMLParser.cpp b/alib2data/src/string/StringFromXMLParser.cpp
index 2a718149c1..ac509cd18f 100644
--- a/alib2data/src/string/StringFromXMLParser.cpp
+++ b/alib2data/src/string/StringFromXMLParser.cpp
@@ -10,9 +10,7 @@
 #include "../XmlApi.hpp"
 
 #include "String.h"
-#include "Epsilon.h"
-#include "LinearString.h"
-#include "CyclicString.h"
+#include "StringClasses.h"
 
 namespace string {
 
diff --git a/alib2data/src/string/StringToXMLComposer.cpp b/alib2data/src/string/StringToXMLComposer.cpp
index e692540bcc..23dd1f74e4 100644
--- a/alib2data/src/string/StringToXMLComposer.cpp
+++ b/alib2data/src/string/StringToXMLComposer.cpp
@@ -8,9 +8,7 @@
 #include "StringToXMLComposer.h"
 #include "../XmlApi.hpp"
 
-#include "CyclicString.h"
-#include "LinearString.h"
-#include "Epsilon.h"
+#include "StringClasses.h"
 
 namespace string {
 
diff --git a/alib2data/test-src/automaton/AutomatonTest.cpp b/alib2data/test-src/automaton/AutomatonTest.cpp
index 4b8383a0ab..261811e320 100644
--- a/alib2data/test-src/automaton/AutomatonTest.cpp
+++ b/alib2data/test-src/automaton/AutomatonTest.cpp
@@ -7,6 +7,8 @@
 #include "automaton/FSM/ExtendedNFA.h"
 #include "automaton/PDA/SinglePopDPDA.h"
 #include "automaton/PDA/DPDA.h"
+#include "automaton/PDA/NPDA.h"
+#include "automaton/PDA/RealTimeHeightDeterministicNPDA.h"
 #include "automaton/TA/NFTA.h"
 
 #include "automaton/AutomatonException.h"
-- 
GitLab