diff --git a/.gitignore b/.gitignore index 17b605d..36dfbbb 100644 --- a/.gitignore +++ b/.gitignore @@ -74,3 +74,5 @@ output/ .boost_installed 4DSSE_logs/ .last_build_flags + +.idea/ diff --git a/build-config/yaml-cpp/meson.build b/build-config/yaml-cpp/meson.build index 434a233..27c9332 100644 --- a/build-config/yaml-cpp/meson.build +++ b/build-config/yaml-cpp/meson.build @@ -1,5 +1,10 @@ +yaml_cpp_cmake_options = cmake.subproject_options() +yaml_cpp_cmake_options.add_cmake_defines({ + 'CMAKE_POLICY_VERSION_MINIMUM': '3.5' +}) yaml_cpp_sp = cmake.subproject( - 'yaml-cpp' + 'yaml-cpp', + options: yaml_cpp_cmake_options, ) yaml_cpp_dep = yaml_cpp_sp.dependency('yaml-cpp') add_project_arguments('-I' + meson.current_build_dir() + '/subprojects/yaml-cpp/__CMake_build', language: 'cpp') \ No newline at end of file diff --git a/src/resource/private/resourceManager.cpp b/src/resource/private/resourceManager.cpp index ebbe62d..72c667e 100644 --- a/src/resource/private/resourceManager.cpp +++ b/src/resource/private/resourceManager.cpp @@ -1,3 +1,23 @@ +/* *********************************************************************** +// +// Copyright (C) 2025 -- The 4D-STAR Collaboration +// File Author: Emily Boudreaux +// Last Modified: March 20, 2025 +// +// 4DSSE is free software; you can use it and/or modify +// it under the terms and restrictions the GNU General Library Public +// License version 3 (GPLv3) as published by the Free Software Foundation. +// +// 4DSSE is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public License +// along with this software; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// *********************************************************************** */ #include #include #include diff --git a/src/resource/private/resourceManagerTypes.cpp b/src/resource/private/resourceManagerTypes.cpp index 98593bf..26d77df 100644 --- a/src/resource/private/resourceManagerTypes.cpp +++ b/src/resource/private/resourceManagerTypes.cpp @@ -1,3 +1,23 @@ +/* *********************************************************************** +// +// Copyright (C) 2025 -- The 4D-STAR Collaboration +// File Author: Emily Boudreaux +// Last Modified: April 09, 2025 +// +// 4DSSE is free software; you can use it and/or modify +// it under the terms and restrictions the GNU General Library Public +// License version 3 (GPLv3) as published by the Free Software Foundation. +// +// 4DSSE is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public License +// along with this software; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// *********************************************************************** */ #include #include "resourceManagerTypes.h" @@ -22,7 +42,7 @@ std::string getFirstSegment(const std::string& input) { Resource createResource(const std::string& type, const std::string& path) { static const std::unordered_map> factoryMap = { {"opac", [](const std::string& p) { return Resource( - std::make_unique(p)); + std::make_unique(opat::readOPAT(p))); }}, {"mesh", [](const std::string& p) { return Resource( std::make_unique(p)); diff --git a/src/resource/public/resourceManager.h b/src/resource/public/resourceManager.h index 6c34635..fb03a12 100644 --- a/src/resource/public/resourceManager.h +++ b/src/resource/public/resourceManager.h @@ -1,3 +1,23 @@ +/* *********************************************************************** +// +// Copyright (C) 2025 -- The 4D-STAR Collaboration +// File Author: Emily Boudreaux +// Last Modified: March 20, 2025 +// +// 4DSSE is free software; you can use it and/or modify +// it under the terms and restrictions the GNU General Library Public +// License version 3 (GPLv3) as published by the Free Software Foundation. +// +// 4DSSE is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public License +// along with this software; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// *********************************************************************** */ #ifndef RESOURCE_MANAGER_H #define RESOURCE_MANAGER_H diff --git a/src/resource/public/resourceManagerTypes.h b/src/resource/public/resourceManagerTypes.h index 7700e03..5161fcc 100644 --- a/src/resource/public/resourceManagerTypes.h +++ b/src/resource/public/resourceManagerTypes.h @@ -1,3 +1,23 @@ +/* *********************************************************************** +// +// Copyright (C) 2025 -- The 4D-STAR Collaboration +// File Author: Emily Boudreaux +// Last Modified: April 09, 2025 +// +// 4DSSE is free software; you can use it and/or modify +// it under the terms and restrictions the GNU General Library Public +// License version 3 (GPLv3) as published by the Free Software Foundation. +// +// 4DSSE is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +// See the GNU Library General Public License for more details. +// +// You should have received a copy of the GNU Library General Public License +// along with this software; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// *********************************************************************** */ #ifndef RESOURCE_MANAGER_TYPES_H #define RESOURCE_MANAGER_TYPES_H @@ -30,7 +50,7 @@ * @endcode */ using Resource = std::variant< - std::unique_ptr, + std::unique_ptr, std::unique_ptr, std::unique_ptr>; diff --git a/tests/meson.build b/tests/meson.build index aeff502..472fd5c 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -16,6 +16,5 @@ subdir('composition') # Subdirectories for sandbox tests subdir('dobj_sandbox') -subdir('opatIO_sandbox') subdir('composition_sandbox') diff --git a/tests/opatIO_sandbox/GS98hz.opat b/tests/opatIO_sandbox/GS98hz.opat deleted file mode 100644 index 43e5baf..0000000 Binary files a/tests/opatIO_sandbox/GS98hz.opat and /dev/null differ diff --git a/tests/opatIO_sandbox/meson.build b/tests/opatIO_sandbox/meson.build deleted file mode 100644 index 095c09a..0000000 --- a/tests/opatIO_sandbox/meson.build +++ /dev/null @@ -1 +0,0 @@ -executable('tryGS98', 'opacity.cpp', dependencies: [opatio_dep]) \ No newline at end of file diff --git a/tests/opatIO_sandbox/opacity.cpp b/tests/opatIO_sandbox/opacity.cpp deleted file mode 100644 index 72ddb04..0000000 --- a/tests/opatIO_sandbox/opacity.cpp +++ /dev/null @@ -1,28 +0,0 @@ -#include -#include -//#include -#include "opatIO.h" - - -int main() { - - std::string FILENAME = "GS98hz.opat"; - OpatIO opatIO(FILENAME); - Header header = opatIO.getHeader(); - std::cout << header.version << std::endl; - std::cout << header.comment << std::endl; - std::cout << header.numTables << std::endl; - - std::vector tableIndex = opatIO.getTableIndex(); - - //print out the X,Z pairs in the table - for (size_t i=0; i< tableIndex.size()-1; i++){ - std::cout << "Table [" << i << "]: {" << tableIndex[i].index.at(0) << ", " - << tableIndex[i].index.at(1) << "}" << std::endl; - } - - //find the table index corresponding to X=0.1, Z=0.001 - std::vector index = {0.1, 0.001}; - OPATTable tab = opatIO.getTable(index); - -}