From 08e654dcda7fa6d764558ea184fe1a47bc4001c8 Mon Sep 17 00:00:00 2001 From: Benjamin Paassen Date: Fri, 21 Nov 2014 11:10:31 +0100 Subject: Finished last commits moving action by also moving the tests and correcting all references and namespaces in the code. --- src/core/BufferedCharReader.cpp | 3 --- src/core/BufferedCharReader.hpp | 8 +++----- src/core/CSSParser.cpp | 2 -- src/core/CSSParser.hpp | 16 +++++++--------- src/core/CodeTokenizer.cpp | 2 -- src/core/CodeTokenizer.hpp | 6 ++---- src/core/Node.cpp | 3 --- src/core/Node.hpp | 8 +++----- src/core/RangeSet.hpp | 9 ++++----- src/core/Tokenizer.cpp | 2 -- src/core/Tokenizer.hpp | 6 ++---- src/core/Typesystem.hpp | 11 ++++------- src/core/script/ScriptEngine.hpp | 2 +- 13 files changed, 26 insertions(+), 52 deletions(-) (limited to 'src') diff --git a/src/core/BufferedCharReader.cpp b/src/core/BufferedCharReader.cpp index c13628f..15aa6c0 100644 --- a/src/core/BufferedCharReader.cpp +++ b/src/core/BufferedCharReader.cpp @@ -19,7 +19,6 @@ #include "BufferedCharReader.hpp" namespace ousia { -namespace utils { // Constants used within the linebreak statemachine. static const uint8_t LB_STATE_NONE = 0x00; @@ -212,5 +211,3 @@ bool BufferedCharReader::atEnd() } } -} - diff --git a/src/core/BufferedCharReader.hpp b/src/core/BufferedCharReader.hpp index b13cde6..0d72347 100644 --- a/src/core/BufferedCharReader.hpp +++ b/src/core/BufferedCharReader.hpp @@ -16,15 +16,14 @@ along with this program. If not, see . */ -#ifndef _OUSIA_UTILS_BUFFERED_CHAR_READER_H_ -#define _OUSIA_UTILS_BUFFERED_CHAR_READER_H_ +#ifndef _OUSIA_BUFFERED_CHAR_READER_H_ +#define _OUSIA_BUFFERED_CHAR_READER_H_ #include #include #include namespace ousia { -namespace utils { /** * The BufferedCharReader class is used for storing incomming data that @@ -233,8 +232,7 @@ public: }; -} } -#endif /* _OUSIA_UTILS_BUFFERED_CHAR_READER_H_ */ +#endif /* _OUSIA_BUFFERED_CHAR_READER_H_ */ diff --git a/src/core/CSSParser.cpp b/src/core/CSSParser.cpp index 1763cc2..00d9c72 100644 --- a/src/core/CSSParser.cpp +++ b/src/core/CSSParser.cpp @@ -23,7 +23,6 @@ #include "CSSParser.hpp" namespace ousia { -namespace utils { // CSS code tokens static const int CURLY_OPEN = 1; @@ -78,4 +77,3 @@ StyleNode CSSParser::parse(BufferedCharReader &input) // TODO: implement } } -} diff --git a/src/core/CSSParser.hpp b/src/core/CSSParser.hpp index c8b772d..8c15e8e 100644 --- a/src/core/CSSParser.hpp +++ b/src/core/CSSParser.hpp @@ -16,21 +16,19 @@ along with this program. If not, see . */ -#ifndef _OUSIA_UTILS_CSS_PARSER_HPP_ -#define _OUSIA_UTILS_CSS_PARSER_HPP_ +#ifndef _OUSIA_CSS_PARSER_HPP_ +#define _OUSIA_CSS_PARSER_HPP_ #include #include #include #include -#include -#include - #include "BufferedCharReader.hpp" +#include "Managed.hpp" +#include "Node.hpp" namespace ousia { -namespace utils { /* * The Specificity or Precedence of a CSS RuleSet, which decides which @@ -107,7 +105,7 @@ public: enum class SelectionOperator { DESCENDANT, DIRECT_DESCENDANT }; -class StyleNode : public dom::Node { +class StyleNode : public Node { public: class StyleEdge : public Managed { private: @@ -141,7 +139,7 @@ public: PseudoSelector pseudoSelector, const std::vector> &edges, const std::vector> &ruleSets) - : dom::Node(mgr, std::move(name)), + : Node(mgr, std::move(name)), pseudoSelector(std::move(pseudoSelector)), edges(acquire(edges)), ruleSets(acquire(ruleSets)) @@ -163,5 +161,5 @@ public: StyleNode parse(BufferedCharReader &input); }; } -} + #endif diff --git a/src/core/CodeTokenizer.cpp b/src/core/CodeTokenizer.cpp index e5b8610..ce4afe5 100644 --- a/src/core/CodeTokenizer.cpp +++ b/src/core/CodeTokenizer.cpp @@ -21,7 +21,6 @@ #include "CodeTokenizer.hpp" namespace ousia { -namespace utils { Token CodeTokenizer::constructToken(const Token &t) { @@ -163,4 +162,3 @@ bool CodeTokenizer::doPrepare(const Token &t, std::deque &peeked) assert(false); } } -} diff --git a/src/core/CodeTokenizer.hpp b/src/core/CodeTokenizer.hpp index 0fc0862..b392c11 100644 --- a/src/core/CodeTokenizer.hpp +++ b/src/core/CodeTokenizer.hpp @@ -16,8 +16,8 @@ along with this program. If not, see . */ -#ifndef _OUSIA_UTILS_CODE_TOKENIZER_HPP_ -#define _OUSIA_UTILS_CODE_TOKENIZER_HPP_ +#ifndef _OUSIA_CODE_TOKENIZER_HPP_ +#define _OUSIA_CODE_TOKENIZER_HPP_ #include #include @@ -26,7 +26,6 @@ #include "Tokenizer.hpp" namespace ousia { -namespace utils { /* * This enum contains all special Token the CodeTokenizer supports, namely: @@ -125,6 +124,5 @@ public: } }; } -} #endif diff --git a/src/core/Node.cpp b/src/core/Node.cpp index c9651fb..c18adb4 100644 --- a/src/core/Node.cpp +++ b/src/core/Node.cpp @@ -19,7 +19,6 @@ #include "Node.hpp" namespace ousia { -namespace dom { /* Class Node */ @@ -141,5 +140,3 @@ bool Node::triggerEvent(Event &event, bool fromChild) { } } -} - diff --git a/src/core/Node.hpp b/src/core/Node.hpp index 249d1f2..262a611 100644 --- a/src/core/Node.hpp +++ b/src/core/Node.hpp @@ -16,8 +16,8 @@ along with this program. If not, see . */ -#ifndef _OUSIA_DOM_NODE_HPP_ -#define _OUSIA_DOM_NODE_HPP_ +#ifndef _OUSIA_NODE_HPP_ +#define _OUSIA_NODE_HPP_ #include #include @@ -28,7 +28,6 @@ #include namespace ousia { -namespace dom { /* Forward declarations */ class Node; @@ -512,7 +511,6 @@ public: bool triggerEvent(Event &event, bool fromChild = false); }; } -} -#endif /* _OUSIA_DOM_NODE_HPP_ */ +#endif /* _OUSIA_NODE_HPP_ */ diff --git a/src/core/RangeSet.hpp b/src/core/RangeSet.hpp index 841d476..bb9102d 100644 --- a/src/core/RangeSet.hpp +++ b/src/core/RangeSet.hpp @@ -16,14 +16,13 @@ along with this program. If not, see . */ -#ifndef _OUSIA_MODEL_RANGE_SET_HPP_ -#define _OUSIA_MODEL_RANGE_SET_HPP_ +#ifndef _OUSIA_RANGE_SET_HPP_ +#define _OUSIA_RANGE_SET_HPP_ #include #include namespace ousia { -namespace model { /** * The Range structure represents an interval of numerical values of type T. */ @@ -320,7 +319,7 @@ public: }; } -} -#endif /* _OUSIA_MODEL_RANGE_SET_HPP_ */ + +#endif /* _OUSIA_RANGE_SET_HPP_ */ diff --git a/src/core/Tokenizer.cpp b/src/core/Tokenizer.cpp index a0ca3aa..f0cd944 100644 --- a/src/core/Tokenizer.cpp +++ b/src/core/Tokenizer.cpp @@ -21,7 +21,6 @@ #include "Tokenizer.hpp" namespace ousia { -namespace utils { static std::map buildChildren( const std::map &inputs) @@ -209,4 +208,3 @@ void Tokenizer::consumePeek() } } } -} diff --git a/src/core/Tokenizer.hpp b/src/core/Tokenizer.hpp index 2debc75..f962ead 100644 --- a/src/core/Tokenizer.hpp +++ b/src/core/Tokenizer.hpp @@ -16,8 +16,8 @@ along with this program. If not, see . */ -#ifndef _OUSIA_UTILS_TOKENIZER_HPP_ -#define _OUSIA_UTILS_TOKENIZER_HPP_ +#ifndef _OUSIA_TOKENIZER_HPP_ +#define _OUSIA_TOKENIZER_HPP_ #include #include @@ -26,7 +26,6 @@ #include "BufferedCharReader.hpp" namespace ousia { -namespace utils { /** * This exception is currently only thrown if errors are made during the @@ -226,6 +225,5 @@ public: void consumePeek(); }; } -} #endif diff --git a/src/core/Typesystem.hpp b/src/core/Typesystem.hpp index 201aed2..47e7517 100644 --- a/src/core/Typesystem.hpp +++ b/src/core/Typesystem.hpp @@ -16,18 +16,16 @@ along with this program. If not, see . */ -#ifndef _OUSIA_DOM_TYPESYSTEM_HPP_ -#define _OUSIA_DOM_TYPESYSTEM_HPP_ +#ifndef _OUSIA_TYPESYSTEM_HPP_ +#define _OUSIA_TYPESYSTEM_HPP_ #include #include -#include - +#include "Managed.hpp" #include "Node.hpp" namespace ousia { -namespace dom { class Type; @@ -81,7 +79,6 @@ public: } }; } -} -#endif /* _OUSIA_DOM_TYPESYSTEM_HPP_ */ +#endif /* _OUSIA_TYPESYSTEM_HPP_ */ diff --git a/src/core/script/ScriptEngine.hpp b/src/core/script/ScriptEngine.hpp index 6c048aa..3c61cb0 100644 --- a/src/core/script/ScriptEngine.hpp +++ b/src/core/script/ScriptEngine.hpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include "Variant.hpp" -- cgit v1.2.3