From 55cf80e40b3117ebc5ab9ff95f5bdf0cad05a368 Mon Sep 17 00:00:00 2001 From: Daniel Wolf Date: Sun, 10 Sep 2017 22:17:17 +0200 Subject: [PATCH] Refactoring: Made imports more specific --- CMakeLists.txt | 28 ++++++++++++---------- src/animation/ShapeRule.cpp | 2 +- src/animation/ShapeRule.h | 7 +++--- src/animation/animationRules.cpp | 4 ++-- src/animation/animationRules.h | 6 ++--- src/animation/mouthAnimation.cpp | 2 +- src/animation/mouthAnimation.h | 6 ++--- src/animation/pauseAnimation.h | 4 ++-- src/animation/shapeShorthands.h | 2 +- src/animation/staticSegments.cpp | 2 +- src/animation/staticSegments.h | 4 ++-- src/animation/targetShapeSet.h | 2 +- src/animation/timingOptimization.cpp | 2 +- src/animation/timingOptimization.h | 4 ++-- src/animation/tweening.h | 4 ++-- src/audio/AudioClip.h | 4 ++-- src/audio/WaveFileReader.cpp | 2 +- src/audio/processing.h | 2 +- src/audio/voiceActivityDetection.cpp | 8 +++---- src/audio/voiceActivityDetection.h | 4 ++-- src/core/Phone.h | 2 +- src/core/Shape.h | 2 +- src/exporters/Exporter.h | 4 ++-- src/exporters/JsonExporter.cpp | 2 +- src/exporters/TsvExporter.cpp | 2 +- src/exporters/exporterTools.cpp | 2 +- src/exporters/exporterTools.h | 4 ++-- src/lib/rhubarbLib.cpp | 10 ++++---- src/lib/rhubarbLib.h | 10 ++++---- src/logging/Level.h | 2 +- src/logging/formatters.cpp | 2 +- src/logging/logging.cpp | 2 +- src/logging/logging.h | 2 +- src/recognition/g2p.cpp | 4 ++-- src/recognition/g2p.h | 2 +- src/recognition/languageModels.cpp | 4 ++-- src/recognition/languageModels.h | 2 +- src/recognition/phoneRecognition.cpp | 26 ++++++++++---------- src/recognition/phoneRecognition.h | 8 +++---- src/recognition/tokenization.cpp | 4 ++-- src/{ => rhubarb}/ExportFormat.cpp | 0 src/{ => rhubarb}/ExportFormat.h | 2 +- src/{ => rhubarb}/main.cpp | 36 ++++++++++++++-------------- src/time/Timed.h | 2 +- src/time/Timeline.h | 2 +- src/time/timedLogging.h | 2 +- tests/BoundedTimelineTests.cpp | 2 +- tests/ContinuousTimelineTests.cpp | 2 +- tests/LazyTests.cpp | 2 +- tests/TimelineTests.cpp | 2 +- tests/g2pTests.cpp | 2 +- tests/pairsTests.cpp | 2 +- tests/stringToolsTests.cpp | 2 +- tests/tokenizationTests.cpp | 2 +- 54 files changed, 129 insertions(+), 126 deletions(-) rename src/{ => rhubarb}/ExportFormat.cpp (100%) rename src/{ => rhubarb}/ExportFormat.h (92%) rename src/{ => rhubarb}/main.cpp (92%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 960e281..69405b0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -239,6 +239,8 @@ set_target_properties(utf8proc PROPERTIES FOLDER lib) # Define Rhubarb libraries +include_directories("src") + # ... rhubarb-animation add_library(rhubarb-animation src/animation/animationRules.cpp @@ -261,7 +263,7 @@ add_library(rhubarb-animation src/animation/tweening.cpp src/animation/tweening.h ) -target_include_directories(rhubarb-animation PUBLIC "src/animation") +target_include_directories(rhubarb-animation PRIVATE "src/animation") target_link_libraries(rhubarb-animation rhubarb-core rhubarb-logging @@ -288,7 +290,7 @@ add_library(rhubarb-audio src/audio/waveFileWriting.cpp src/audio/waveFileWriting.h ) -target_include_directories(rhubarb-audio PUBLIC "src/audio") +target_include_directories(rhubarb-audio PRIVATE "src/audio") target_link_libraries(rhubarb-audio webRtc rhubarb-logging @@ -306,7 +308,7 @@ add_library(rhubarb-core src/core/Shape.cpp src/core/Shape.h ) -target_include_directories(rhubarb-core PUBLIC "src/core") +target_include_directories(rhubarb-core PRIVATE "src/core") target_link_libraries(rhubarb-core rhubarb-tools ) @@ -323,7 +325,7 @@ add_library(rhubarb-exporters src/exporters/XmlExporter.cpp src/exporters/XmlExporter.h ) -target_include_directories(rhubarb-exporters PUBLIC "src/exporters") +target_include_directories(rhubarb-exporters PRIVATE "src/exporters") target_link_libraries(rhubarb-exporters rhubarb-animation rhubarb-core @@ -335,7 +337,7 @@ add_library(rhubarb-lib src/lib/rhubarbLib.cpp src/lib/rhubarbLib.h ) -target_include_directories(rhubarb-lib PUBLIC "src/lib") +target_include_directories(rhubarb-lib PRIVATE "src/lib") target_link_libraries(rhubarb-lib rhubarb-animation rhubarb-audio @@ -360,7 +362,7 @@ add_library(rhubarb-logging src/logging/sinks.cpp src/logging/sinks.h ) -target_include_directories(rhubarb-logging PUBLIC "src/logging") +target_include_directories(rhubarb-logging PRIVATE "src/logging") target_link_libraries(rhubarb-logging rhubarb-tools ) @@ -376,7 +378,7 @@ add_library(rhubarb-recognition src/recognition/tokenization.cpp src/recognition/tokenization.h ) -target_include_directories(rhubarb-recognition PUBLIC "src/recognition") +target_include_directories(rhubarb-recognition PRIVATE "src/recognition") target_link_libraries(rhubarb-recognition flite pocketSphinx @@ -397,7 +399,7 @@ add_library(rhubarb-time src/time/TimeRange.cpp src/time/TimeRange.h ) -target_include_directories(rhubarb-time PUBLIC "src/time") +target_include_directories(rhubarb-time PRIVATE "src/time") target_link_libraries(rhubarb-time cppFormat rhubarb-logging @@ -430,7 +432,7 @@ add_library(rhubarb-tools src/tools/tools.h src/tools/tupleHash.h ) -target_include_directories(rhubarb-tools PUBLIC "src/tools") +target_include_directories(rhubarb-tools PRIVATE "src/tools") target_link_libraries(rhubarb-tools cppFormat whereami @@ -440,11 +442,11 @@ target_link_libraries(rhubarb-tools # Define Rhubarb executable add_executable(rhubarb - src/main.cpp - src/ExportFormat.cpp - src/ExportFormat.h + src/rhubarb/main.cpp + src/rhubarb/ExportFormat.cpp + src/rhubarb/ExportFormat.h ) -target_include_directories(rhubarb PUBLIC "src") +target_include_directories(rhubarb PUBLIC "src/rhubarb") target_link_libraries(rhubarb rhubarb-exporters rhubarb-lib diff --git a/src/animation/ShapeRule.cpp b/src/animation/ShapeRule.cpp index eec8cf3..e9b98c0 100644 --- a/src/animation/ShapeRule.cpp +++ b/src/animation/ShapeRule.cpp @@ -1,6 +1,6 @@ #include "ShapeRule.h" #include -#include "ContinuousTimeline.h" +#include "time/ContinuousTimeline.h" using boost::optional; using boost::adaptors::transformed; diff --git a/src/animation/ShapeRule.h b/src/animation/ShapeRule.h index dc42fd3..acb0a08 100644 --- a/src/animation/ShapeRule.h +++ b/src/animation/ShapeRule.h @@ -1,9 +1,10 @@ #pragma once -#include "Phone.h" +#include "core/Phone.h" #include "animationRules.h" -#include "BoundedTimeline.h" -#include "ContinuousTimeline.h" +#include "time/BoundedTimeline.h" +#include "time/ContinuousTimeline.h" +#include "time/TimeRange.h" struct ShapeRule { ShapeSet shapeSet; diff --git a/src/animation/animationRules.cpp b/src/animation/animationRules.cpp index d9b77b5..4bef2e5 100644 --- a/src/animation/animationRules.cpp +++ b/src/animation/animationRules.cpp @@ -1,8 +1,8 @@ #include "animationRules.h" #include #include "shapeShorthands.h" -#include "array.h" -#include "ContinuousTimeline.h" +#include "tools/array.h" +#include "time/ContinuousTimeline.h" using std::chrono::duration_cast; using boost::algorithm::clamp; diff --git a/src/animation/animationRules.h b/src/animation/animationRules.h index c11ebab..e3a3b36 100644 --- a/src/animation/animationRules.h +++ b/src/animation/animationRules.h @@ -1,9 +1,9 @@ #pragma once #include -#include "Shape.h" -#include "Timeline.h" -#include "Phone.h" +#include "core/Shape.h" +#include "time/Timeline.h" +#include "core/Phone.h" // Returns the basic shape (A-F) that most closely resembles the specified shape. Shape getBasicShape(Shape shape); diff --git a/src/animation/mouthAnimation.cpp b/src/animation/mouthAnimation.cpp index 5ff7855..30add4c 100644 --- a/src/animation/mouthAnimation.cpp +++ b/src/animation/mouthAnimation.cpp @@ -1,5 +1,5 @@ #include "mouthAnimation.h" -#include "timedLogging.h" +#include "time/timedLogging.h" #include "ShapeRule.h" #include "roughAnimation.h" #include "pauseAnimation.h" diff --git a/src/animation/mouthAnimation.h b/src/animation/mouthAnimation.h index 07b0fce..f001d4a 100644 --- a/src/animation/mouthAnimation.h +++ b/src/animation/mouthAnimation.h @@ -1,8 +1,8 @@ #pragma once -#include "Phone.h" -#include "Shape.h" -#include "ContinuousTimeline.h" +#include "core/Phone.h" +#include "core/Shape.h" +#include "time/ContinuousTimeline.h" #include "targetShapeSet.h" JoiningContinuousTimeline animate(const BoundedTimeline& phones, const ShapeSet& targetShapeSet); diff --git a/src/animation/pauseAnimation.h b/src/animation/pauseAnimation.h index eb28bae..9fd6066 100644 --- a/src/animation/pauseAnimation.h +++ b/src/animation/pauseAnimation.h @@ -1,7 +1,7 @@ #pragma once -#include "Shape.h" -#include "ContinuousTimeline.h" +#include "core/Shape.h" +#include "time/ContinuousTimeline.h" // Takes an existing animation and modifies the pauses (X shapes) to look better. JoiningContinuousTimeline animatePauses(const JoiningContinuousTimeline& animation); diff --git a/src/animation/shapeShorthands.h b/src/animation/shapeShorthands.h index 2758cf9..3ebd08c 100644 --- a/src/animation/shapeShorthands.h +++ b/src/animation/shapeShorthands.h @@ -1,6 +1,6 @@ #pragma once -#include "Shape.h" +#include "core/Shape.h" constexpr Shape A = Shape::A; constexpr Shape B = Shape::B; diff --git a/src/animation/staticSegments.cpp b/src/animation/staticSegments.cpp index 2225612..33ca391 100644 --- a/src/animation/staticSegments.cpp +++ b/src/animation/staticSegments.cpp @@ -1,7 +1,7 @@ #include "staticSegments.h" #include #include -#include "nextCombination.h" +#include "tools/nextCombination.h" using std::vector; using boost::optional; diff --git a/src/animation/staticSegments.h b/src/animation/staticSegments.h index cd7f471..5b8ff68 100644 --- a/src/animation/staticSegments.h +++ b/src/animation/staticSegments.h @@ -1,7 +1,7 @@ #pragma once -#include "Shape.h" -#include "ContinuousTimeline.h" +#include "core/Shape.h" +#include "time/ContinuousTimeline.h" #include "ShapeRule.h" #include diff --git a/src/animation/targetShapeSet.h b/src/animation/targetShapeSet.h index 67bc65d..0725114 100644 --- a/src/animation/targetShapeSet.h +++ b/src/animation/targetShapeSet.h @@ -1,6 +1,6 @@ #pragma once -#include "Shape.h" +#include "core/Shape.h" #include "ShapeRule.h" // Returns the closest shape to the specified one that occurs in the target shape set. diff --git a/src/animation/timingOptimization.cpp b/src/animation/timingOptimization.cpp index 3df6ed5..b9ccd55 100644 --- a/src/animation/timingOptimization.cpp +++ b/src/animation/timingOptimization.cpp @@ -1,5 +1,5 @@ #include "timingOptimization.h" -#include "timedLogging.h" +#include "time/timedLogging.h" #include #include #include diff --git a/src/animation/timingOptimization.h b/src/animation/timingOptimization.h index d781c22..e8bb691 100644 --- a/src/animation/timingOptimization.h +++ b/src/animation/timingOptimization.h @@ -1,7 +1,7 @@ #pragma once -#include "Shape.h" -#include "ContinuousTimeline.h" +#include "core/Shape.h" +#include "time/ContinuousTimeline.h" // Changes the timing of an existing animation to reduce jitter and to make sure all shapes register visually. // In some cases, shapes may be omitted. diff --git a/src/animation/tweening.h b/src/animation/tweening.h index cb4073b..0e597f7 100644 --- a/src/animation/tweening.h +++ b/src/animation/tweening.h @@ -1,7 +1,7 @@ #pragma once -#include "Shape.h" -#include "ContinuousTimeline.h" +#include "core/Shape.h" +#include "time/ContinuousTimeline.h" // Takes an existing animation and inserts inbetween shapes for smoother results. JoiningContinuousTimeline insertTweens(const JoiningContinuousTimeline& animation); diff --git a/src/audio/AudioClip.h b/src/audio/AudioClip.h index c242215..4a188b3 100644 --- a/src/audio/AudioClip.h +++ b/src/audio/AudioClip.h @@ -1,9 +1,9 @@ #pragma once #include -#include "TimeRange.h" +#include "time/TimeRange.h" #include -#include "Lazy.h" +#include "tools/Lazy.h" class AudioClip; class SampleIterator; diff --git a/src/audio/WaveFileReader.cpp b/src/audio/WaveFileReader.cpp index 7b2be10..bb63393 100644 --- a/src/audio/WaveFileReader.cpp +++ b/src/audio/WaveFileReader.cpp @@ -2,7 +2,7 @@ #include #include "WaveFileReader.h" #include "ioTools.h" -#include "platformTools.h" +#include "tools/platformTools.h" using std::runtime_error; using fmt::format; diff --git a/src/audio/processing.h b/src/audio/processing.h index cd303b9..8ece651 100644 --- a/src/audio/processing.h +++ b/src/audio/processing.h @@ -3,7 +3,7 @@ #include #include #include "AudioClip.h" -#include "ProgressBar.h" +#include "tools/ProgressBar.h" void process16bitAudioClip(const AudioClip& audioClip, std::function&)> processBuffer, size_t bufferCapacity, ProgressSink& progressSink); void process16bitAudioClip(const AudioClip& audioClip, std::function&)> processBuffer, ProgressSink& progressSink); diff --git a/src/audio/voiceActivityDetection.cpp b/src/audio/voiceActivityDetection.cpp index c4dc62a..f801960 100644 --- a/src/audio/voiceActivityDetection.cpp +++ b/src/audio/voiceActivityDetection.cpp @@ -1,15 +1,15 @@ #include "voiceActivityDetection.h" #include "DcOffset.h" #include "SampleRateConverter.h" -#include "logging.h" -#include "pairs.h" +#include "logging/logging.h" +#include "tools/pairs.h" #include #include #include "processing.h" #include -#include "parallel.h" +#include "tools/parallel.h" #include "AudioSegment.h" -#include "stringTools.h" +#include "tools/stringTools.h" using std::vector; using boost::adaptors::transformed; diff --git a/src/audio/voiceActivityDetection.h b/src/audio/voiceActivityDetection.h index e1aa395..7820680 100644 --- a/src/audio/voiceActivityDetection.h +++ b/src/audio/voiceActivityDetection.h @@ -1,6 +1,6 @@ #pragma once #include "AudioClip.h" -#include -#include +#include "time/BoundedTimeline.h" +#include "tools/ProgressBar.h" JoiningBoundedTimeline detectVoiceActivity(const AudioClip& audioClip, int maxThreadCount, ProgressSink& progressSink); diff --git a/src/core/Phone.h b/src/core/Phone.h index 5c57f9d..63ecee3 100644 --- a/src/core/Phone.h +++ b/src/core/Phone.h @@ -1,6 +1,6 @@ #pragma once -#include "EnumConverter.h" +#include "tools/EnumConverter.h" // Defines a subset of the Arpabet enum class Phone { diff --git a/src/core/Shape.h b/src/core/Shape.h index f192f47..0ee34c5 100644 --- a/src/core/Shape.h +++ b/src/core/Shape.h @@ -1,6 +1,6 @@ #pragma once -#include "EnumConverter.h" +#include "tools/EnumConverter.h" #include // The classic Hanna-Barbera mouth shapes A-F plus the common supplements G-H diff --git a/src/exporters/Exporter.h b/src/exporters/Exporter.h index e0ce699..1be1092 100644 --- a/src/exporters/Exporter.h +++ b/src/exporters/Exporter.h @@ -1,7 +1,7 @@ #pragma once -#include -#include "ContinuousTimeline.h" +#include "core/Shape.h" +#include "time/ContinuousTimeline.h" #include class ExporterInput { diff --git a/src/exporters/JsonExporter.cpp b/src/exporters/JsonExporter.cpp index c9fe6b2..ddd3149 100644 --- a/src/exporters/JsonExporter.cpp +++ b/src/exporters/JsonExporter.cpp @@ -1,6 +1,6 @@ #include "JsonExporter.h" #include "exporterTools.h" -#include "stringTools.h" +#include "tools/stringTools.h" using std::string; diff --git a/src/exporters/TsvExporter.cpp b/src/exporters/TsvExporter.cpp index 754d000..6cdaaae 100644 --- a/src/exporters/TsvExporter.cpp +++ b/src/exporters/TsvExporter.cpp @@ -1,5 +1,5 @@ #include "TsvExporter.h" -#include "targetShapeSet.h" +#include "animation/targetShapeSet.h" void TsvExporter::exportAnimation(const ExporterInput& input, std::ostream& outputStream) { // Output shapes with start times diff --git a/src/exporters/exporterTools.cpp b/src/exporters/exporterTools.cpp index 3b4eb79..51f09b4 100644 --- a/src/exporters/exporterTools.cpp +++ b/src/exporters/exporterTools.cpp @@ -1,5 +1,5 @@ #include "exporterTools.h" -#include "targetShapeSet.h" +#include "animation/targetShapeSet.h" // Makes sure there is at least one mouth shape std::vector> dummyShapeIfEmpty(const JoiningTimeline& animation, const ShapeSet& targetShapeSet) { diff --git a/src/exporters/exporterTools.h b/src/exporters/exporterTools.h index 70fccbb..c121f98 100644 --- a/src/exporters/exporterTools.h +++ b/src/exporters/exporterTools.h @@ -1,7 +1,7 @@ #pragma once -#include "Shape.h" -#include "Timeline.h" +#include "core/Shape.h" +#include "time/Timeline.h" // Makes sure there is at least one mouth shape std::vector> dummyShapeIfEmpty(const JoiningTimeline& animation, const ShapeSet& targetShapeSet); diff --git a/src/lib/rhubarbLib.cpp b/src/lib/rhubarbLib.cpp index 29c25bc..c85283f 100644 --- a/src/lib/rhubarbLib.cpp +++ b/src/lib/rhubarbLib.cpp @@ -1,9 +1,9 @@ #include "rhubarbLib.h" -#include "Phone.h" -#include "phoneRecognition.h" -#include "textFiles.h" -#include "mouthAnimation.h" -#include "WaveFileReader.h" +#include "core/Phone.h" +#include "recognition/phoneRecognition.h" +#include "tools/textFiles.h" +#include "animation/mouthAnimation.h" +#include "audio/WaveFileReader.h" using boost::optional; using std::string; diff --git a/src/lib/rhubarbLib.h b/src/lib/rhubarbLib.h index b4457c9..8663761 100644 --- a/src/lib/rhubarbLib.h +++ b/src/lib/rhubarbLib.h @@ -1,11 +1,11 @@ #pragma once -#include "Shape.h" -#include "ContinuousTimeline.h" -#include "AudioClip.h" -#include "ProgressBar.h" +#include "core/Shape.h" +#include "time/ContinuousTimeline.h" +#include "audio/AudioClip.h" +#include "tools/ProgressBar.h" #include -#include "targetShapeSet.h" +#include "animation/targetShapeSet.h" JoiningContinuousTimeline animateAudioClip( const AudioClip& audioClip, diff --git a/src/logging/Level.h b/src/logging/Level.h index a487284..ebec696 100644 --- a/src/logging/Level.h +++ b/src/logging/Level.h @@ -1,6 +1,6 @@ #pragma once -#include "EnumConverter.h" +#include "tools/EnumConverter.h" namespace logging { diff --git a/src/logging/formatters.cpp b/src/logging/formatters.cpp index 7447b35..3ccfbcc 100644 --- a/src/logging/formatters.cpp +++ b/src/logging/formatters.cpp @@ -1,7 +1,7 @@ #include "formatters.h" #include #include "Entry.h" -#include "tools.h" +#include "tools/tools.h" using std::string; diff --git a/src/logging/logging.cpp b/src/logging/logging.cpp index d73496c..067a3fe 100644 --- a/src/logging/logging.cpp +++ b/src/logging/logging.cpp @@ -1,5 +1,5 @@ #include "logging.h" -#include +#include "tools/tools.h" #include #include "Entry.h" diff --git a/src/logging/logging.h b/src/logging/logging.h index b06c969..1b65778 100644 --- a/src/logging/logging.h +++ b/src/logging/logging.h @@ -1,6 +1,6 @@ #pragma once -#include "EnumConverter.h" +#include "tools/EnumConverter.h" #include "Sink.h" #include "Level.h" diff --git a/src/recognition/g2p.cpp b/src/recognition/g2p.cpp index eace1ec..6299061 100644 --- a/src/recognition/g2p.cpp +++ b/src/recognition/g2p.cpp @@ -1,7 +1,7 @@ #include #include -#include "stringTools.h" -#include "logging.h" +#include "tools/stringTools.h" +#include "logging/logging.h" using std::vector; using std::wstring; diff --git a/src/recognition/g2p.h b/src/recognition/g2p.h index 250358c..d2f5d17 100644 --- a/src/recognition/g2p.h +++ b/src/recognition/g2p.h @@ -1,6 +1,6 @@ #pragma once #include -#include "Phone.h" +#include "core/Phone.h" std::vector wordToPhones(const std::string& word); diff --git a/src/recognition/languageModels.cpp b/src/recognition/languageModels.cpp index c7b4a2c..6ccb303 100644 --- a/src/recognition/languageModels.cpp +++ b/src/recognition/languageModels.cpp @@ -4,9 +4,9 @@ #include #include #include -#include "platformTools.h" +#include "tools/platformTools.h" #include -#include "appInfo.h" +#include "core/appInfo.h" #include #include diff --git a/src/recognition/languageModels.h b/src/recognition/languageModels.h index a260c42..18df80c 100644 --- a/src/recognition/languageModels.h +++ b/src/recognition/languageModels.h @@ -1,7 +1,7 @@ #pragma once #include -#include "tools.h" +#include "tools/tools.h" extern "C" { #include diff --git a/src/recognition/phoneRecognition.cpp b/src/recognition/phoneRecognition.cpp index f56201f..5139596 100644 --- a/src/recognition/phoneRecognition.cpp +++ b/src/recognition/phoneRecognition.cpp @@ -1,26 +1,26 @@ #include #include "phoneRecognition.h" -#include "SampleRateConverter.h" -#include "platformTools.h" -#include "tools.h" +#include "audio/SampleRateConverter.h" +#include "tools/platformTools.h" +#include "tools/tools.h" #include #include #include #include -#include -#include "DcOffset.h" -#include "Timeline.h" -#include "voiceActivityDetection.h" -#include "AudioSegment.h" +#include "logging/logging.h" +#include "audio/DcOffset.h" +#include "time/Timeline.h" +#include "audio/voiceActivityDetection.h" +#include "audio/AudioSegment.h" #include "languageModels.h" #include "tokenization.h" #include "g2p.h" -#include "ContinuousTimeline.h" -#include "processing.h" -#include "parallel.h" +#include "time/ContinuousTimeline.h" +#include "audio/processing.h" +#include "tools/parallel.h" #include -#include "ObjectPool.h" -#include "timedLogging.h" +#include "tools/ObjectPool.h" +#include "time/timedLogging.h" extern "C" { #include diff --git a/src/recognition/phoneRecognition.h b/src/recognition/phoneRecognition.h index 61e94ee..2e66305 100644 --- a/src/recognition/phoneRecognition.h +++ b/src/recognition/phoneRecognition.h @@ -1,9 +1,9 @@ #pragma once -#include "AudioClip.h" -#include "Phone.h" -#include "ProgressBar.h" -#include "BoundedTimeline.h" +#include "audio/AudioClip.h" +#include "core/Phone.h" +#include "tools/ProgressBar.h" +#include "time/BoundedTimeline.h" BoundedTimeline recognizePhones( const AudioClip& audioClip, diff --git a/src/recognition/tokenization.cpp b/src/recognition/tokenization.cpp index 2fb7741..edef618 100644 --- a/src/recognition/tokenization.cpp +++ b/src/recognition/tokenization.cpp @@ -1,6 +1,6 @@ #include "tokenization.h" -#include "tools.h" -#include "stringTools.h" +#include "tools/tools.h" +#include "tools/stringTools.h" #include extern "C" { diff --git a/src/ExportFormat.cpp b/src/rhubarb/ExportFormat.cpp similarity index 100% rename from src/ExportFormat.cpp rename to src/rhubarb/ExportFormat.cpp diff --git a/src/ExportFormat.h b/src/rhubarb/ExportFormat.h similarity index 92% rename from src/ExportFormat.h rename to src/rhubarb/ExportFormat.h index d3801f1..1ff9392 100644 --- a/src/ExportFormat.h +++ b/src/rhubarb/ExportFormat.h @@ -1,6 +1,6 @@ #pragma once -#include "EnumConverter.h" +#include "tools/EnumConverter.h" enum class ExportFormat { Tsv, diff --git a/src/main.cpp b/src/rhubarb/main.cpp similarity index 92% rename from src/main.cpp rename to src/rhubarb/main.cpp index c4c23a2..8d2e7e9 100644 --- a/src/main.cpp +++ b/src/rhubarb/main.cpp @@ -1,32 +1,32 @@ #include #include #include -#include "appInfo.h" -#include "NiceCmdLineOutput.h" -#include "ProgressBar.h" -#include "logging.h" -#include "sinks.h" -#include "formatters.h" +#include "core/appInfo.h" +#include "tools/NiceCmdLineOutput.h" +#include "tools/ProgressBar.h" +#include "logging/logging.h" +#include "logging/sinks.h" +#include "logging/formatters.h" #include -#include "Exporter.h" -#include "ContinuousTimeline.h" +#include "exporters/Exporter.h" +#include "time/ContinuousTimeline.h" #include -#include "stringTools.h" +#include "tools/stringTools.h" #include #include -#include "parallel.h" -#include "exceptions.h" -#include "textFiles.h" -#include "rhubarbLib.h" +#include "tools/parallel.h" +#include "tools/exceptions.h" +#include "tools/textFiles.h" +#include "lib/rhubarbLib.h" #include "ExportFormat.h" -#include "TsvExporter.h" -#include "XmlExporter.h" -#include "JsonExporter.h" +#include "exporters/TsvExporter.h" +#include "exporters/XmlExporter.h" +#include "exporters/JsonExporter.h" #include #include -#include "targetShapeSet.h" +#include "animation/targetShapeSet.h" #include -#include "platformTools.h" +#include "tools/platformTools.h" using std::exception; using std::string; diff --git a/src/time/Timed.h b/src/time/Timed.h index f18bf05..04add08 100644 --- a/src/time/Timed.h +++ b/src/time/Timed.h @@ -1,6 +1,6 @@ #pragma once -#include +#include "time/TimeRange.h" #include template diff --git a/src/time/Timeline.h b/src/time/Timeline.h index 6473c5d..88b9179 100644 --- a/src/time/Timeline.h +++ b/src/time/Timeline.h @@ -3,7 +3,7 @@ #include #include #include -#include "tools.h" +#include "tools/tools.h" enum class FindMode { SampleLeft, diff --git a/src/time/timedLogging.h b/src/time/timedLogging.h index 947f4fe..90407af 100644 --- a/src/time/timedLogging.h +++ b/src/time/timedLogging.h @@ -3,7 +3,7 @@ #include "centiseconds.h" #include "TimeRange.h" #include "Timed.h" -#include "logging.h" +#include "logging/logging.h" template void logTimedEvent(const std::string& eventName, const Timed timedValue) { diff --git a/tests/BoundedTimelineTests.cpp b/tests/BoundedTimelineTests.cpp index a24f568..3a038de 100644 --- a/tests/BoundedTimelineTests.cpp +++ b/tests/BoundedTimelineTests.cpp @@ -1,5 +1,5 @@ #include -#include "BoundedTimeline.h" +#include "time/BoundedTimeline.h" using namespace testing; using std::vector; diff --git a/tests/ContinuousTimelineTests.cpp b/tests/ContinuousTimelineTests.cpp index e55cdcd..e1d4806 100644 --- a/tests/ContinuousTimelineTests.cpp +++ b/tests/ContinuousTimelineTests.cpp @@ -1,5 +1,5 @@ #include -#include "ContinuousTimeline.h" +#include "time/ContinuousTimeline.h" using namespace testing; using std::vector; diff --git a/tests/LazyTests.cpp b/tests/LazyTests.cpp index f3f1aac..dd17023 100644 --- a/tests/LazyTests.cpp +++ b/tests/LazyTests.cpp @@ -1,5 +1,5 @@ #include -#include "Lazy.h" +#include "tools/Lazy.h" using namespace testing; using std::make_unique; diff --git a/tests/TimelineTests.cpp b/tests/TimelineTests.cpp index 39724f9..ab6e807 100644 --- a/tests/TimelineTests.cpp +++ b/tests/TimelineTests.cpp @@ -1,5 +1,5 @@ #include -#include "Timeline.h" +#include "time/Timeline.h" #include #include diff --git a/tests/g2pTests.cpp b/tests/g2pTests.cpp index d992d4e..e246785 100644 --- a/tests/g2pTests.cpp +++ b/tests/g2pTests.cpp @@ -1,5 +1,5 @@ #include -#include "g2p.h" +#include "recognition/g2p.h" using namespace testing; using std::vector; diff --git a/tests/pairsTests.cpp b/tests/pairsTests.cpp index 1037225..b2eb27e 100644 --- a/tests/pairsTests.cpp +++ b/tests/pairsTests.cpp @@ -1,5 +1,5 @@ #include -#include "pairs.h" +#include "tools/pairs.h" using namespace testing; using std::vector; diff --git a/tests/stringToolsTests.cpp b/tests/stringToolsTests.cpp index 7f58971..722de8b 100644 --- a/tests/stringToolsTests.cpp +++ b/tests/stringToolsTests.cpp @@ -1,5 +1,5 @@ #include -#include "stringTools.h" +#include "tools/stringTools.h" using namespace testing; using std::string; diff --git a/tests/tokenizationTests.cpp b/tests/tokenizationTests.cpp index 577c6bb..5714706 100644 --- a/tests/tokenizationTests.cpp +++ b/tests/tokenizationTests.cpp @@ -1,5 +1,5 @@ #include -#include "tokenization.h" +#include "recognition/tokenization.h" #include #include #include