Skip to content

Commit 38718f3

Browse files
marcosbentoiainrussell
authored andcommitted
Pull request #22: Improve use of #include directives
Merge in ECFLOW/ecflow from feature/ECFLOW-1872_improved_includes to develop * commit 'e5f5ba850700ffda0554fa1bb260f4c30dadb07a': Revert cpp-httplib + nlohmann/json to use #include "" (ECFLOW-1872) Correct use of #include <> and "" in ecFlow UI (ECFLOW-1872) Use #include <cstd.*> instead of <std.*.h> (ECFLOW-1872) Correct use of #include <> and "" in Http REST API (ECFLOW-1872) Use #include <> for all Boost headers (ECFLOW-1872)
2 parents 95f1353 + e5f5ba8 commit 38718f3

File tree

127 files changed

+339
-252
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+339
-252
lines changed

ACore/src/EcfPortLock.hpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@
2121
#include <iostream>
2222
#include <sstream>
2323

24+
#include <boost/filesystem.hpp>
25+
#include <boost/filesystem/operations.hpp>
2426
#include <boost/lexical_cast.hpp>
2527

2628
#include "File.hpp"
27-
#include "boost/filesystem.hpp"
28-
#include "boost/filesystem/operations.hpp"
2929

3030
namespace ecf {
3131

ACore/src/File.cpp

+3-6
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,14 @@
1313
// Description : This class is used as a helper class
1414
//============================================================================
1515

16+
#include "File.hpp"
17+
1618
#include <fstream>
1719
#include <stdexcept>
1820

19-
#include "boost/filesystem.hpp"
20-
// #include <boost/token_functions.hpp>
21-
// #include <boost/algorithm/string/trim.hpp>
22-
// #include <boost/algorithm/string.hpp>
23-
// #include <boost/tokenizer.hpp>
21+
#include <boost/filesystem.hpp>
2422

2523
#include "Ecf.hpp"
26-
#include "File.hpp"
2724
#include "Log.hpp"
2825
#include "NodePath.hpp"
2926
#include "Str.hpp"

ACore/src/Log.cpp

+4-2
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,21 @@
1212
//
1313
// Description : Simple singleton implementation of log
1414
//============================================================================
15+
1516
#include "Log.hpp"
1617

1718
#include <cassert>
1819
#include <iostream>
1920
#include <stdexcept>
2021
#include <vector>
2122

23+
#include <boost/filesystem/operations.hpp>
24+
#include <boost/filesystem/path.hpp>
25+
2226
#include "File.hpp"
2327
#include "Indentor.hpp"
2428
#include "Str.hpp"
2529
#include "TimeStamp.hpp"
26-
#include "boost/filesystem/operations.hpp"
27-
#include "boost/filesystem/path.hpp"
2830

2931
using namespace std;
3032
namespace fs = boost::filesystem;

ACore/src/TimeSlot.hpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717

1818
#include <iosfwd>
1919

20-
#include "boost/date_time/posix_time/posix_time_types.hpp"
20+
#include <boost/date_time/posix_time/posix_time_types.hpp>
21+
2122
namespace cereal {
2223
class access;
2324
}

ACore/test/TestCereal.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@
1212
//
1313
// Description
1414
//============================================================================
15+
1516
#include <iostream>
1617

18+
#include <boost/filesystem/operations.hpp>
1719
#include <boost/test/unit_test.hpp>
1820

1921
#include "SerializationTest.hpp"
20-
#include "boost/filesystem/operations.hpp"
2122

2223
using namespace ecf;
2324
using namespace boost;

ACore/test/TestCerealOptionalNVP.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@
1212
//
1313
// Description
1414
//============================================================================
15+
1516
#include <iostream>
1617

18+
#include <boost/filesystem/operations.hpp>
1719
#include <boost/test/unit_test.hpp>
1820

1921
#include "SerializationTest.hpp"
20-
#include "boost/filesystem/operations.hpp"
2122

2223
using namespace ecf;
2324
using namespace boost;

ACore/test/TestCerealWithHierarchy.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
// Description
1414
//============================================================================
1515

16+
#include <boost/filesystem/operations.hpp>
1617
#include <boost/test/unit_test.hpp>
1718

1819
#include "Serialization.hpp"
19-
#include "boost/filesystem/operations.hpp"
2020

2121
using namespace ecf;
2222
using namespace boost;

ACore/test/TestFile.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@
1212
//
1313
// Description :
1414
//============================================================================
15+
1516
#include <cstdlib> // for getenv()
1617
#include <fstream> // for std::ofstream
1718
#include <iostream>
1819
#include <string>
1920

21+
#include <boost/filesystem/operations.hpp>
2022
#include <boost/lexical_cast.hpp>
2123
#include <boost/test/unit_test.hpp>
2224

23-
#include "boost/filesystem/operations.hpp"
24-
2525
// #define FILE_PERF_CHECK_IMPLEMENTATIONS 1;
2626
#ifdef FILE_PERF_CHECK_IMPLEMENTATIONS
2727
#include <boost/timer/timer.hpp>

ACore/test/TestGetUserDetails.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
// #include <pwd.h> /* getpwdid */
2222
// #include <sys/types.h>
2323
// #include <unistd.h>
24-
// #include <stdio.h>
24+
// #include <cstdio>
2525
//
2626
// using namespace std;
2727
// using namespace ecf;

ACore/test/TestLog.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
#include <stdexcept>
1717
#include <string>
1818

19+
#include <boost/filesystem/operations.hpp>
20+
#include <boost/filesystem/path.hpp>
1921
#include <boost/test/unit_test.hpp>
2022

2123
#include "DurationTimer.hpp"
2224
#include "File.hpp"
2325
#include "Log.hpp"
2426
#include "Pid.hpp"
25-
#include "boost/filesystem/operations.hpp"
26-
#include "boost/filesystem/path.hpp"
2727

2828
using namespace ecf;
2929
using namespace std;

ACore/test/TestStackTrace.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
//// Description :
1414
////============================================================================
1515
// #include <boost/test/unit_test.hpp>
16-
// #include "boost/filesystem/operations.hpp"
17-
// #include "boost/filesystem/path.hpp"
16+
// #include <boost/filesystem/operations.hpp>
17+
// #include <boost/filesystem/path.hpp>
1818
// #include <iostream>
1919
// #include <fstream>
2020
////#include "StackTrace.hpp"

ACore/test/TestVersioning.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,13 @@
1212
//
1313
// Description :
1414
//============================================================================
15+
1516
#include "TestVersioning.hpp"
1617

18+
#include <boost/filesystem/operations.hpp>
1719
#include <boost/test/unit_test.hpp>
1820

1921
#include "Serialization.hpp"
20-
#include "boost/filesystem/operations.hpp"
2122

2223
using namespace std;
2324
using namespace boost;

ACore/test/TestWhiteListFile.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
//
1313
// Description :
1414
//============================================================================
15+
1516
#include <iostream>
1617

18+
#include <boost/filesystem/operations.hpp>
19+
#include <boost/filesystem/path.hpp>
1720
#include <boost/test/unit_test.hpp>
1821

1922
#include "File.hpp"
2023
#include "WhiteListFile.hpp"
21-
#include "boost/filesystem/operations.hpp"
22-
#include "boost/filesystem/path.hpp"
2324

2425
namespace fs = boost::filesystem;
2526
using namespace std;

ANattr/src/ClockAttr.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,13 @@
1515

1616
#include "ClockAttr.hpp"
1717

18+
#include <boost/lexical_cast.hpp>
19+
1820
#include "Calendar.hpp"
1921
#include "DateAttr.hpp"
2022
#include "Ecf.hpp"
2123
#include "Indentor.hpp"
2224
#include "Serialization.hpp"
23-
#include "boost/lexical_cast.hpp"
2425

2526
using namespace std;
2627
using namespace ecf;

ANattr/src/VerifyAttr.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,19 @@
1212
//
1313
// Description :
1414
//============================================================================
15+
1516
#include "VerifyAttr.hpp"
1617

1718
#include <sstream>
1819

20+
#include <boost/lexical_cast.hpp>
21+
1922
#include "Ecf.hpp"
2023
#include "Indentor.hpp"
2124
#include "NState.hpp"
2225
#include "PrintStyle.hpp"
2326
#include "Serialization.hpp"
2427
#include "Str.hpp"
25-
#include "boost/lexical_cast.hpp"
2628

2729
using namespace ecf;
2830

ANattr/test/TestMigration.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
1515

1616
#include <boost/date_time/posix_time/posix_time_types.hpp>
17+
#include <boost/filesystem/operations.hpp>
1718
#include <boost/test/unit_test.hpp>
1819

1920
#include "AutoArchiveAttr.hpp"
@@ -35,7 +36,6 @@
3536
#include "Variable.hpp"
3637
#include "VerifyAttr.hpp"
3738
#include "ZombieAttr.hpp"
38-
#include "boost/filesystem/operations.hpp"
3939
#include "cereal_boost_time.hpp"
4040

4141
using namespace std;

ANode/parser/test/ParseTimer.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@
1212
//
1313
// Description :
1414
//============================================================================
15+
1516
#include <string>
1617
#include <iostream>
1718
#include <fstream>
1819

19-
#include "boost/filesystem/operations.hpp"
20-
#include "boost/filesystem/path.hpp"
20+
#include <boost/filesystem/operations.hpp>
21+
#include <boost/filesystem/path.hpp>
2122
#include <boost/timer/timer.hpp>
22-
#include "boost/date_time/posix_time/posix_time_types.hpp"
23+
#include <boost/date_time/posix_time/posix_time_types.hpp>
2324

2425
#include "DefsStructureParser.hpp"
2526
#include "Defs.hpp"

ANode/parser/test/PersistHelper.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,10 @@
1212
//
1313
// Description :
1414
//============================================================================
15+
1516
#include <sstream>
1617

17-
#include "boost/filesystem/operations.hpp"
18+
#include <boost/filesystem/operations.hpp>
1819

1920
#include "PersistHelper.hpp"
2021
#include "Defs.hpp"

ANode/parser/test/TestAutoAddExterns.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@
1212
//
1313
// Description :
1414
//============================================================================
15+
1516
#include <string>
1617
#include <iostream>
1718

18-
#include "boost/filesystem/operations.hpp"
19+
#include <boost/filesystem/operations.hpp>
1920
#include <boost/test/unit_test.hpp>
2021

2122
#include "Defs.hpp"
@@ -54,4 +55,3 @@ BOOST_AUTO_TEST_CASE( test_auto_add_externs )
5455
}
5556

5657
BOOST_AUTO_TEST_SUITE_END()
57-

ANode/parser/test/TestParser.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313
//
1414
// Description :
1515
//============================================================================
16+
1617
#include <string>
1718
#include <iostream>
1819

1920
#include <boost/test/unit_test.hpp>
20-
#include "boost/filesystem/operations.hpp"
21-
#include "boost/filesystem/path.hpp"
21+
#include <boost/filesystem/operations.hpp>
22+
#include <boost/filesystem/path.hpp>
2223

2324
#include "DefsStructureParser.hpp"
2425
#include "Defs.hpp"

ANode/parser/test/TestSingleDefsFile.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,16 @@
1414
//
1515
// Description :
1616
//============================================================================
17+
1718
#include <string>
1819
#include <iostream>
1920
#include <fstream>
2021

21-
#include "boost/filesystem/operations.hpp"
22-
#include "boost/filesystem/path.hpp"
22+
#include <boost/filesystem/operations.hpp>
23+
#include <boost/filesystem/path.hpp>
2324
#include <boost/timer/timer.hpp>
2425
#include <boost/chrono.hpp>
25-
#include "boost/date_time/posix_time/posix_time_types.hpp"
26+
#include <boost/date_time/posix_time/posix_time_types.hpp>
2627
#include <boost/test/unit_test.hpp>
2728

2829
#include "DefsStructureParser.hpp"

ANode/src/EcfFile.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
//
1313
// Description :
1414
//============================================================================
15+
1516
#include "EcfFile.hpp"
1617

1718
#include <cerrno>
@@ -20,6 +21,7 @@
2021
#include <stdexcept>
2122

2223
#include <boost/algorithm/string/trim.hpp>
24+
#include <boost/filesystem/operations.hpp>
2325
#include <sys/stat.h>
2426
#include <sys/wait.h> // for waitpid
2527

@@ -29,7 +31,6 @@
2931
#include "Log.hpp"
3032
#include "Str.hpp"
3133
#include "Submittable.hpp"
32-
#include "boost/filesystem/operations.hpp"
3334

3435
// #define DEBUG_ECF_ 1
3536
// #define DEBUG_PRE_PROCESS 1

ANode/src/EcfFile.hpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@
1414
//
1515
// Description :
1616
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
17+
1718
#include <fstream>
1819
#include <memory>
1920

21+
#include <boost/filesystem/path.hpp>
22+
2023
#include "NodeFwd.hpp"
21-
#include "boost/filesystem/path.hpp"
2224

2325
// This class is used to minimise file I/0.
2426
// When job processing the same include file can be opened and closed many time

ANode/src/JobCreationCtrl.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include <iostream>
2020
#include <stdexcept>
2121

22-
#include "boost/filesystem/operations.hpp"
22+
#include <boost/filesystem/operations.hpp>
2323

2424
namespace fs = boost::filesystem;
2525

0 commit comments

Comments
 (0)