diff --git a/modules/gfx/tests/test_ent_pov_export.cc b/modules/gfx/tests/test_ent_pov_export.cc index b5c409f9628a110cdfb3f85880f29fb791c517a7..c7730806a1476ce02728b42bcc194c6353908b3d 100644 --- a/modules/gfx/tests/test_ent_pov_export.cc +++ b/modules/gfx/tests/test_ent_pov_export.cc @@ -22,7 +22,7 @@ */ #include <fstream> -#include <ost/io/load_entity.hh> +#include <ost/io/mol/load_entity.hh> #include <ost/gfx/scene.hh> #include <ost/gfx/entity.hh> diff --git a/modules/gui/src/data_viewer/data_viewer.cc b/modules/gui/src/data_viewer/data_viewer.cc index 0c157df37e550bdadbe07cab027f2a762c950f6f..5a75d518126e747a9ac98f8a9f1cf8314f90faf8 100644 --- a/modules/gui/src/data_viewer/data_viewer.cc +++ b/modules/gui/src/data_viewer/data_viewer.cc @@ -30,7 +30,7 @@ //#include <sstream> -//#include <ost/img/io/io_manager.hh> +//#include <ost/io/io_manager.hh> #include <ost/message.hh> //#include <ost/img/alg/fft.hh> #include <ost/img/alg/norm.hh> diff --git a/modules/gui/src/file_loader.hh b/modules/gui/src/file_loader.hh index 23419b613eb851fb9aeeec56ce8c9efe91701050..8e2e50758643ae67df2ea8f9d668f2e0128b7bde 100644 --- a/modules/gui/src/file_loader.hh +++ b/modules/gui/src/file_loader.hh @@ -26,11 +26,11 @@ #include <ost/gui/module_config.hh> #include <ost/io/io_exception.hh> -#include <ost/io/entity_io_handler.hh> -#include <ost/io/sequence_io_handler.hh> -#include <ost/io/surface_io_handler.hh> +#include <ost/io/mol/entity_io_handler.hh> +#include <ost/io/seq/sequence_io_handler.hh> +#include <ost/io/mol/surface_io_handler.hh> #if OST_IMG_ENABLED -#include <ost/io/map_io_handler.hh> +# include <ost/io/img/map_io_handler.hh> #endif #include <QString> diff --git a/modules/gui/src/file_type_dialog.hh b/modules/gui/src/file_type_dialog.hh index 4cd7746afb32d17f843b9d4680e07e5aaa2c8fd6..f1fe6ce5e5fc6e856b15c091b65d03e41309bda2 100644 --- a/modules/gui/src/file_type_dialog.hh +++ b/modules/gui/src/file_type_dialog.hh @@ -27,11 +27,11 @@ -#include <ost/io/entity_io_handler.hh> -#include <ost/io/sequence_io_handler.hh> -#include <ost/io/surface_io_handler.hh> +#include <ost/io/mol/entity_io_handler.hh> +#include <ost/io/seq/sequence_io_handler.hh> +#include <ost/io/mol/surface_io_handler.hh> #if OST_IMG_ENABLED -#include <ost/io/map_io_handler.hh> +#include <ost/io/img/map_io_handler.hh> #endif #include <QDialog> diff --git a/modules/io/src/CMakeLists.txt b/modules/io/src/CMakeLists.txt index 58470a33136c2b794668dc2b39effab39cd2f805..13d6e3c6adef7c8adbe30aa0494d2668ce7242d7 100644 --- a/modules/io/src/CMakeLists.txt +++ b/modules/io/src/CMakeLists.txt @@ -38,12 +38,18 @@ if (ENABLE_IMG) foreach(fname ${OST_IO_IMG_SOURCES}) set(OST_IO_SOURCES ${OST_IO_SOURCES} img/${fname}) endforeach(fname ${OST_IO_IMG_SOURCES}) - - foreach(fname ${OST_IO_IMG_HEADERS}) - set(OST_IO_HEADERS ${OST_IO_HEADERS} img/${fname}) - endforeach(fname ${OST_IO_IMG_HEADERS}) endif() +#################################### +# Add headers in subfolders (additionally) to OST_IO_HEADERS. +# In the end, we will have two copies (!) of each header in the subfolders. +# One copy in ost/io/<SUB> and one in ost/io. + +# As it's silly to have duplicate headers, this behavior might be removed in the +# future. So please always include the headers in the subfolders. +# (e.g. use "#include <ost/io/mol/load_entity.hh>" +# instead of #include <ost/io/load_entity.hh>) +# For compatibility reasons, we keep it for now (dates back to 2010). foreach(fname ${OST_IO_MOL_HEADERS}) set(OST_IO_HEADERS ${OST_IO_HEADERS} mol/${fname}) endforeach(fname ${OST_IO_MOL_HEADERS}) @@ -52,6 +58,12 @@ foreach(fname ${OST_IO_SEQ_HEADERS}) set(OST_IO_HEADERS ${OST_IO_HEADERS} seq/${fname}) endforeach(fname ${OST_IO_SEQ_HEADERS}) +if (ENABLE_IMG) + foreach(fname ${OST_IO_IMG_HEADERS}) + set(OST_IO_HEADERS ${OST_IO_HEADERS} img/${fname}) + endforeach(fname ${OST_IO_IMG_HEADERS}) +endif() +#################################### set(OST_IO_DEPENDENCIES ost_base;ost_conop;ost_seq) if (ENABLE_IMG) diff --git a/modules/io/src/mol/entity_io_sdf_handler.cc b/modules/io/src/mol/entity_io_sdf_handler.cc index 31ba544b0214906993ae1fced35ebf1cbd6feffb..e99933ec3044f97dbcc2715f66bb2a411a168e95 100644 --- a/modules/io/src/mol/entity_io_sdf_handler.cc +++ b/modules/io/src/mol/entity_io_sdf_handler.cc @@ -21,8 +21,8 @@ */ #include <ost/log.hh> -#include <ost/io/sdf_writer.hh> -#include <ost/io/sdf_reader.hh> +#include <ost/io/mol/sdf_writer.hh> +#include <ost/io/mol/sdf_reader.hh> #include "entity_io_sdf_handler.hh" diff --git a/modules/io/tests/test_exceptions.cc b/modules/io/tests/test_exceptions.cc index 2ed51ce3e61239424f4d3ce8b9ce2f77a3825b24..27d9ea661822b6d4879f6b47a1fc204194fa677f 100644 --- a/modules/io/tests/test_exceptions.cc +++ b/modules/io/tests/test_exceptions.cc @@ -25,7 +25,7 @@ #include <boost/test/unit_test.hpp> #include <boost/test/auto_unit_test.hpp> -#include <ost/io/load_map.hh> +#include <ost/io/img/load_map.hh> #include <ost/img/image.hh> #include <ost/io/io_exception.hh> diff --git a/modules/io/tests/test_io_crd.cc b/modules/io/tests/test_io_crd.cc index b317e936bce58126c130f2260c318af8112a7422..4cde64f327c6a0bcd9710d0468db5399edc7f250 100644 --- a/modules/io/tests/test_io_crd.cc +++ b/modules/io/tests/test_io_crd.cc @@ -23,7 +23,7 @@ #include <ost/test_utils/compare_files.hh> #include <ost/mol/mol.hh> #include <ost/io/mol/entity_io_crd_handler.hh> -#include <ost/io/save_entity.hh> +#include <ost/io/mol/save_entity.hh> using namespace ost; using namespace ost::io; diff --git a/modules/io/tests/test_io_dcd.cc b/modules/io/tests/test_io_dcd.cc index 016555e696f569175ff066ffef96ed43abdddb52..fb95e6e83d3f161ebdbd1ae0e21f4a9e34a860ce 100644 --- a/modules/io/tests/test_io_dcd.cc +++ b/modules/io/tests/test_io_dcd.cc @@ -74,7 +74,7 @@ BOOST_AUTO_TEST_CASE(test_io_dcd_charmm_frames) SaveCHARMMTraj(cg,"test_io_dcd_out.pdb","test_io_dcd_out.dcd"); mol::CoordGroupHandle cg2=LoadCHARMMTraj(eh,"test_io_dcd_out.dcd"); BOOST_CHECK_EQUAL(cg2.GetAtomCount(),natoms); - BOOST_CHECK_EQUAL(cg2.GetFrameCount(),1); + BOOST_CHECK_EQUAL(cg2.GetFrameCount(),uint(1)); mol::CoordFramePtr cf2 = cg2.GetFrame(0); BOOST_CHECK(geom::Distance(cf2->GetCellSize(),cell_size)<1e-6); diff --git a/modules/io/tests/test_io_img.cc b/modules/io/tests/test_io_img.cc index 78093264b4b204fd095152fff381ae0ac5419512..411201a97e167be7235c1aa9ab041c43e98c95c9 100644 --- a/modules/io/tests/test_io_img.cc +++ b/modules/io/tests/test_io_img.cc @@ -21,7 +21,7 @@ #include <boost/test/auto_unit_test.hpp> #include <map> -#include <ost/io/load_map.hh> +#include <ost/io/img/load_map.hh> #include <ost/img/image_factory.hh> #include <ost/img/alg/randomize.hh> #include <ost/io/img/map_io_df3_handler.hh> diff --git a/modules/io/tests/test_io_pdb.cc b/modules/io/tests/test_io_pdb.cc index 7d33d8bce38ecc45702b190cbb37439b2b94960d..ff4d3a8dbdfb70988274a0611802cc7413bded60 100644 --- a/modules/io/tests/test_io_pdb.cc +++ b/modules/io/tests/test_io_pdb.cc @@ -32,8 +32,8 @@ using boost::unit_test_framework::test_suite; #include <ost/conop/heuristic.hh> #include <ost/io/mol/entity_io_pdb_handler.hh> -#include <ost/io/pdb_reader.hh> -#include <ost/io/pdb_writer.hh> +#include <ost/io/mol/pdb_reader.hh> +#include <ost/io/mol/pdb_writer.hh> #include <ost/log.hh> #include <ost/io/io_exception.hh> diff --git a/modules/io/tests/test_io_sdf.cc b/modules/io/tests/test_io_sdf.cc index 289bdfea3a7a79247a762cb7a300eab4c6957910..c90b80b30f4efc571412222d4b7ca7e36fdf4f2c 100644 --- a/modules/io/tests/test_io_sdf.cc +++ b/modules/io/tests/test_io_sdf.cc @@ -27,7 +27,7 @@ using boost::unit_test_framework::test_suite; #include <ost/test_utils/compare_files.hh> #include <ost/mol/mol.hh> #include <ost/io/mol/entity_io_sdf_handler.hh> -#include <ost/io/save_entity.hh> +#include <ost/io/mol/save_entity.hh> #include <ost/io/io_exception.hh> using namespace ost; diff --git a/modules/io/tests/test_mae_standalone.cc b/modules/io/tests/test_mae_standalone.cc index 10395fb69d479d11a80be64f53ac2832f30b90c7..48d19c3da2ebf6f50a6591b8fe1c706673de0ccc 100644 --- a/modules/io/tests/test_mae_standalone.cc +++ b/modules/io/tests/test_mae_standalone.cc @@ -1,6 +1,6 @@ #include <ost/log.hh> #include <ost/conop/conop.hh> -#include <ost/io/entity_io_mae_handler.hh> +#include <ost/io/mol/entity_io_mae_handler.hh> using namespace ost; diff --git a/modules/io/tests/test_mmcif_reader.cc b/modules/io/tests/test_mmcif_reader.cc index 3a1906df9ea7c8f7ffc0dae6f79fcc9a54b7972e..40f81cd8c441801df9412d60f9b562610b18498a 100644 --- a/modules/io/tests/test_mmcif_reader.cc +++ b/modules/io/tests/test_mmcif_reader.cc @@ -644,14 +644,14 @@ BOOST_AUTO_TEST_CASE(mmcif_struct_ref) MMCifReader mmcif_p(s, eh, profile); mmcif_p.Parse(); MMCifInfoStructRefs refs=mmcif_p.GetInfo().GetStructRefs(); - BOOST_CHECK_EQUAL(refs.size(), 1); + BOOST_CHECK_EQUAL(refs.size(), size_t(1)); MMCifInfoStructRefPtr sr1=refs[0]; BOOST_CHECK_EQUAL(sr1->GetDBName(), "UNP"); BOOST_CHECK_EQUAL(sr1->GetDBID(), "BLA2_BACCE"); BOOST_CHECK_EQUAL(sr1->GetDBAccess(), "P04190"); BOOST_CHECK_EQUAL(sr1->GetID(), "1"); MMCifInfoStructRefSeqs seqs=sr1->GetAlignedSeqs(); - BOOST_CHECK_EQUAL(seqs.size(), 2); + BOOST_CHECK_EQUAL(seqs.size(), size_t(2)); BOOST_CHECK_EQUAL(seqs[0]->GetID(), "1"); BOOST_CHECK_EQUAL(seqs[0]->GetChainName(), "A"); BOOST_CHECK_EQUAL(seqs[0]->GetSeqBegin(), 1); @@ -665,7 +665,7 @@ BOOST_AUTO_TEST_CASE(mmcif_struct_ref) BOOST_CHECK_EQUAL(seqs[1]->GetDBBegin(), 31); BOOST_CHECK_EQUAL(seqs[1]->GetDBEnd(), 49); MMCifInfoStructRefSeqDifs diffs=seqs[0]->GetDifs(); - BOOST_CHECK_EQUAL(diffs.size(), 1); + BOOST_CHECK_EQUAL(diffs.size(), size_t(1)); BOOST_CHECK_EQUAL(diffs[0]->GetSeqRNum(), 91); BOOST_CHECK_EQUAL(diffs[0]->GetDetails(), "ENGINEERED MUTATION"); } diff --git a/modules/io/tests/test_star_parser.cc b/modules/io/tests/test_star_parser.cc index 4d611807830aabf0b7b24725a708f3f99d81af04..40cdf674f81a7da4a33f3dadab18f3330d338a75 100644 --- a/modules/io/tests/test_star_parser.cc +++ b/modules/io/tests/test_star_parser.cc @@ -137,19 +137,19 @@ public: BOOST_CHECK_EQUAL(columns[0].size(), static_cast<size_t>(1)); ++cur_char_; BOOST_CHECK_EQUAL(columns[1][0], cur_char_); - BOOST_CHECK_EQUAL(columns[1].size(), 1); + BOOST_CHECK_EQUAL(columns[1].size(), static_cast<size_t>(1)); ++cur_char_; BOOST_CHECK_EQUAL(columns[2][0], cur_char_); - BOOST_CHECK_EQUAL(columns[2].size(), 1); + BOOST_CHECK_EQUAL(columns[2].size(), static_cast<size_t>(1)); ++cur_char_; BOOST_CHECK_EQUAL(columns[3][0], cur_char_); - BOOST_CHECK_EQUAL(columns[3].size(), 1); + BOOST_CHECK_EQUAL(columns[3].size(), static_cast<size_t>(1)); ++cur_char_; BOOST_CHECK_EQUAL(columns[4][0], cur_char_); - BOOST_CHECK_EQUAL(columns[4].size(), 1); + BOOST_CHECK_EQUAL(columns[4].size(), static_cast<size_t>(1)); ++cur_char_; BOOST_CHECK_EQUAL(columns[5][0], cur_char_); - BOOST_CHECK_EQUAL(columns[5].size(), 1); + BOOST_CHECK_EQUAL(columns[5].size(), static_cast<size_t>(1)); ++cur_char_; }