diff --git a/COPYING b/COPYING index 26b6dbc..a623aa4 100644 --- a/COPYING +++ b/COPYING @@ -1,33 +1,21 @@ -GNU GENERAL PUBLIC LICENSE - Version 3, 29 June 2007 - - A NASA's CDF modern C++ library. - Copyright (C) 2022 Alexis Jeandet - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - This program 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 General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program. If not, see . - -Also add information on how to contact you by electronic and paper mail. - - You should also get your employer (if you work as a programmer) or school, -if any, to sign a "copyright disclaimer" for the program, if necessary. -For more information on this, and how to apply and follow the GNU GPL, see -. - - The GNU General Public License does not permit incorporating your program -into proprietary programs. If your program is a subroutine library, you -may consider it more useful to permit linking proprietary applications with -the library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. But first, please read -. - +MIT License + +Copyright (c) 2024 Laboratory of Plasma Physics, Ecole Polytechnique, CNRS, Sorbonne Université, Université Paris-Saclay + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 04db484..ec7185e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) +[![GitHub License](https://img.shields.io/github/license/SciQLop/CDFpp)](https://mit-license.org/) [![Documentation Status](https://readthedocs.org/projects/pycdfpp/badge/?version=latest)](https://pycdfpp.readthedocs.io/en/latest/?badge=latest) [![CPP17](https://img.shields.io/badge/Language-C++17-blue.svg)]() [![PyPi](https://img.shields.io/pypi/v/pycdfpp.svg)](https://pypi.python.org/pypi/pycdfpp) diff --git a/include/cdfpp/attribute.hpp b/include/cdfpp/attribute.hpp index a7fc347..ec19652 100644 --- a/include/cdfpp/attribute.hpp +++ b/include/cdfpp/attribute.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2019, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include "cdf-data.hpp" #include "cdf-repr.hpp" #include @@ -218,7 +222,7 @@ struct VariableAttribute } inline data_t& operator*() { return data; } - inline const data_t& operator*()const { return data; } + inline const data_t& operator*() const { return data; } [[nodiscard]] inline data_t& value() { return data; } [[nodiscard]] inline const data_t& value() const { return data; } diff --git a/include/cdfpp/cdf-data.hpp b/include/cdfpp/cdf-data.hpp index 0e75531..ae3605e 100644 --- a/include/cdfpp/cdf-data.hpp +++ b/include/cdfpp/cdf-data.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2019, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include "cdf-debug.hpp" #include "cdf-enums.hpp" #include "cdf-helpers.hpp" diff --git a/include/cdfpp/cdf-debug.hpp b/include/cdfpp/cdf-debug.hpp index ac545d6..72c7cdb 100644 --- a/include/cdfpp/cdf-debug.hpp +++ b/include/cdfpp/cdf-debug.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2019, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #ifdef CDFPP_ENABLE_ASSERT #include #define CDFPP_ASSERT(x) assert(x) @@ -30,9 +34,9 @@ #include #define CDFPP_NON_NULL(...) HEDLEY_NON_NULL(__VA_ARGS__) #define CDF_WARN_UNUSED_RESULT HEDLEY_WARN_UNUSED_RESULT -#define CDFPP_DIAGNOSTIC_PUSH HEDLEY_DIAGNOSTIC_PUSH +#define CDFPP_DIAGNOSTIC_PUSH HEDLEY_DIAGNOSTIC_PUSH #define CDFPP_DIAGNOSTIC_DISABLE_DEPRECATED HEDLEY_DIAGNOSTIC_DISABLE_DEPRECATED -#define CDFPP_DIAGNOSTIC_POP HEDLEY_DIAGNOSTIC_POP +#define CDFPP_DIAGNOSTIC_POP HEDLEY_DIAGNOSTIC_POP #else #define CDFPP_NON_NULL(...) #define CDF_WARN_UNUSED_RESULT diff --git a/include/cdfpp/cdf-enums.hpp b/include/cdfpp/cdf-enums.hpp index 6dd499b..f630914 100644 --- a/include/cdfpp/cdf-enums.hpp +++ b/include/cdfpp/cdf-enums.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2019, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include #include #include diff --git a/include/cdfpp/cdf-file.hpp b/include/cdfpp/cdf-file.hpp index 8f2887f..4de9547 100644 --- a/include/cdfpp/cdf-file.hpp +++ b/include/cdfpp/cdf-file.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2019, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include "attribute.hpp" #include "cdf-enums.hpp" #include "cdf-map.hpp" diff --git a/include/cdfpp/cdf-helpers.hpp b/include/cdfpp/cdf-helpers.hpp index 4ad73bb..93f4eb8 100644 --- a/include/cdfpp/cdf-helpers.hpp +++ b/include/cdfpp/cdf-helpers.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2022, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include #include #include diff --git a/include/cdfpp/cdf-io/cdf-io.hpp b/include/cdfpp/cdf-io/cdf-io.hpp index e662f9b..af816d4 100644 --- a/include/cdfpp/cdf-io/cdf-io.hpp +++ b/include/cdfpp/cdf-io/cdf-io.hpp @@ -1,24 +1,28 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2019, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include "loading/loading.hpp" #include "saving/saving.hpp" diff --git a/include/cdfpp/cdf-io/common.hpp b/include/cdfpp/cdf-io/common.hpp index 69c9bcc..5be202a 100644 --- a/include/cdfpp/cdf-io/common.hpp +++ b/include/cdfpp/cdf-io/common.hpp @@ -1,26 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2019, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ - +#pragma once #include "../attribute.hpp" #include "./endianness.hpp" #include "./majority-swap.hpp" diff --git a/include/cdfpp/cdf-io/compression.hpp b/include/cdfpp/cdf-io/compression.hpp index d3ae3b9..bcc2b35 100644 --- a/include/cdfpp/cdf-io/compression.hpp +++ b/include/cdfpp/cdf-io/compression.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include "../cdf-enums.hpp" #include #ifdef CDFpp_USE_LIBDEFLATE @@ -59,8 +63,7 @@ no_init_vector deflate(const T& input) } template -no_init_vector deflate( - cdf_compression_type type, const T& input) +no_init_vector deflate(cdf_compression_type type, const T& input) { if (type == cdf_compression_type::gzip_compression) return gzdeflate(input); diff --git a/include/cdfpp/cdf-io/decompression.hpp b/include/cdfpp/cdf-io/decompression.hpp index 3d90158..94e166c 100644 --- a/include/cdfpp/cdf-io/decompression.hpp +++ b/include/cdfpp/cdf-io/decompression.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include "../cdf-enums.hpp" #include #include diff --git a/include/cdfpp/cdf-io/desc-records.hpp b/include/cdfpp/cdf-io/desc-records.hpp index 340d3fc..7de4dd8 100644 --- a/include/cdfpp/cdf-io/desc-records.hpp +++ b/include/cdfpp/cdf-io/desc-records.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2019, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include "../cdf-enums.hpp" #include "special-fields.hpp" #include diff --git a/include/cdfpp/cdf-io/endianness.hpp b/include/cdfpp/cdf-io/endianness.hpp index ca45f05..129ec26 100644 --- a/include/cdfpp/cdf-io/endianness.hpp +++ b/include/cdfpp/cdf-io/endianness.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2019, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include "cdfpp_config.h" #ifdef CDFpp_BIG_ENDIAN inline const bool host_is_big_endian = true; @@ -49,8 +53,8 @@ inline const bool host_is_little_endian = true; #include "../cdf-debug.hpp" #include "../cdf-enums.hpp" #include -#include #include +#include #include #include @@ -155,8 +159,7 @@ namespace template -[[nodiscard]] CDFPP_NON_NULL(1) -inline T decode(const U* input) +[[nodiscard]] CDFPP_NON_NULL(1) inline T decode(const U* input) { if constexpr (sizeof(T) > 1) { @@ -195,9 +198,9 @@ inline void _impl_decode_v(value_t* data, std::size_t size) template CDFPP_NON_NULL(1) - inline void decode_v(value_t* data, std::size_t size) +inline void decode_v(value_t* data, std::size_t size) { - _impl_decode_v(reinterpret_cast*>(data),size); + _impl_decode_v(reinterpret_cast*>(data), size); } template diff --git a/include/cdfpp/cdf-io/libdeflate.hpp b/include/cdfpp/cdf-io/libdeflate.hpp index 06c13cf..859c93e 100644 --- a/include/cdfpp/cdf-io/libdeflate.hpp +++ b/include/cdfpp/cdf-io/libdeflate.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include "../cdf-debug.hpp" #include "cdfpp/no_init_vector.hpp" diff --git a/include/cdfpp/cdf-io/loading/attribute.hpp b/include/cdfpp/cdf-io/loading/attribute.hpp index 447d6b7..d52b49a 100644 --- a/include/cdfpp/cdf-io/loading/attribute.hpp +++ b/include/cdfpp/cdf-io/loading/attribute.hpp @@ -1,29 +1,33 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2019, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ -#include "cdfpp/attribute.hpp" +#pragma once #include "../common.hpp" #include "../desc-records.hpp" #include "./records-loading.hpp" +#include "cdfpp/attribute.hpp" namespace cdf::io::attribute { @@ -58,7 +62,7 @@ bool load_all(context_t& context, common::cdf_repr& repr) { auto& [offset, ADR] = blk; std::vector var_nums; - Attribute::attr_data_t data = [&,&ADR=ADR]() -> Attribute::attr_data_t + Attribute::attr_data_t data = [&, &ADR = ADR]() -> Attribute::attr_data_t { if (ADR.AzEDRhead != 0) return load_data( diff --git a/include/cdfpp/cdf-io/loading/buffers.hpp b/include/cdfpp/cdf-io/loading/buffers.hpp index e5c13fd..56900d3 100644 --- a/include/cdfpp/cdf-io/loading/buffers.hpp +++ b/include/cdfpp/cdf-io/loading/buffers.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2019, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include #include #include @@ -339,8 +343,8 @@ struct shared_buffer_t shared_buffer_t& operator=(shared_buffer_t&&) = default; template - inline auto read(Types&&... args) - -> decltype(std::declval>()->read(std::forward(args)...)) + inline auto read(Types&&... args) -> decltype(std::declval>()->read( + std::forward(args)...)) { return p_buffer->read(std::forward(args)...); } diff --git a/include/cdfpp/cdf-io/loading/loading.hpp b/include/cdfpp/cdf-io/loading/loading.hpp index 20daea1..8a90b76 100644 --- a/include/cdfpp/cdf-io/loading/loading.hpp +++ b/include/cdfpp/cdf-io/loading/loading.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include "../common.hpp" #include "../decompression.hpp" #include "../desc-records.hpp" diff --git a/include/cdfpp/cdf-io/loading/records-loading.hpp b/include/cdfpp/cdf-io/loading/records-loading.hpp index c3a4dcc..fbaaeb8 100644 --- a/include/cdfpp/cdf-io/loading/records-loading.hpp +++ b/include/cdfpp/cdf-io/loading/records-loading.hpp @@ -1,21 +1,24 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org diff --git a/include/cdfpp/cdf-io/loading/variable.hpp b/include/cdfpp/cdf-io/loading/variable.hpp index ecfe08b..4bb1d5d 100644 --- a/include/cdfpp/cdf-io/loading/variable.hpp +++ b/include/cdfpp/cdf-io/loading/variable.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2019, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include "../common.hpp" #include "../decompression.hpp" #include "../desc-records.hpp" diff --git a/include/cdfpp/cdf-io/majority-swap.hpp b/include/cdfpp/cdf-io/majority-swap.hpp index f8a7d89..6fb73c5 100644 --- a/include/cdfpp/cdf-io/majority-swap.hpp +++ b/include/cdfpp/cdf-io/majority-swap.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2022, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include "../cdf-data.hpp" #include "../cdf-debug.hpp" #include "../no_init_vector.hpp" diff --git a/include/cdfpp/cdf-io/reflection.hpp b/include/cdfpp/cdf-io/reflection.hpp index 83b8a09..d950037 100644 --- a/include/cdfpp/cdf-io/reflection.hpp +++ b/include/cdfpp/cdf-io/reflection.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include #include diff --git a/include/cdfpp/cdf-io/rle.hpp b/include/cdfpp/cdf-io/rle.hpp index 28a41c7..575e471 100644 --- a/include/cdfpp/cdf-io/rle.hpp +++ b/include/cdfpp/cdf-io/rle.hpp @@ -1,26 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2022, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ - +#pragma once #include "cdfpp/no_init_vector.hpp" #include #include @@ -92,7 +95,7 @@ inline no_init_vector deflate(const T& input) } while (input_cursor != std::cend(input) and *input_cursor == 0); last_copy_cursor = input_cursor; result.push_back(0); - result.push_back(z_count-1); + result.push_back(z_count - 1); } else { diff --git a/include/cdfpp/cdf-io/saving/buffers.hpp b/include/cdfpp/cdf-io/saving/buffers.hpp index efeacf2..1f3f7cf 100644 --- a/include/cdfpp/cdf-io/saving/buffers.hpp +++ b/include/cdfpp/cdf-io/saving/buffers.hpp @@ -1,21 +1,24 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org diff --git a/include/cdfpp/cdf-io/saving/create_records.hpp b/include/cdfpp/cdf-io/saving/create_records.hpp index 1a3903f..3d6cf17 100644 --- a/include/cdfpp/cdf-io/saving/create_records.hpp +++ b/include/cdfpp/cdf-io/saving/create_records.hpp @@ -1,21 +1,24 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org diff --git a/include/cdfpp/cdf-io/saving/layout_records.hpp b/include/cdfpp/cdf-io/saving/layout_records.hpp index 62f24c6..3c7e6dd 100644 --- a/include/cdfpp/cdf-io/saving/layout_records.hpp +++ b/include/cdfpp/cdf-io/saving/layout_records.hpp @@ -1,21 +1,24 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org diff --git a/include/cdfpp/cdf-io/saving/link_records.hpp b/include/cdfpp/cdf-io/saving/link_records.hpp index ec3ebfa..dbe42ce 100644 --- a/include/cdfpp/cdf-io/saving/link_records.hpp +++ b/include/cdfpp/cdf-io/saving/link_records.hpp @@ -1,21 +1,24 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org diff --git a/include/cdfpp/cdf-io/saving/records-saving.hpp b/include/cdfpp/cdf-io/saving/records-saving.hpp index a0e8409..3896da9 100644 --- a/include/cdfpp/cdf-io/saving/records-saving.hpp +++ b/include/cdfpp/cdf-io/saving/records-saving.hpp @@ -1,21 +1,24 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org @@ -165,8 +168,8 @@ template { using Field_t = std::remove_cv_t>; constexpr std::size_t count = count_members; - if constexpr (std::is_compound_v && (count > 1) - && (not is_string_field_v)&&(not is_table_field_v)) + if constexpr (std::is_compound_v && (count > 1) && (not is_string_field_v) + && (not is_table_field_v)) return record_size(field); else return field_size(s, std::forward(field)); @@ -239,7 +242,7 @@ inline std::size_t save_fields(const strurt_t& s, writer_t& writer, const T& fie if constexpr (is_cdf_DR_header_v) return save_header(s, field, writer); else if constexpr (std::is_compound_v && (count > 1) - && (not is_string_field_v)&&(not is_table_field_v)) + && (not is_string_field_v) && (not is_table_field_v)) return save_record(field, writer); else return save_field(writer, field); diff --git a/include/cdfpp/cdf-io/saving/saving.hpp b/include/cdfpp/cdf-io/saving/saving.hpp index 2bf90e7..c679f47 100644 --- a/include/cdfpp/cdf-io/saving/saving.hpp +++ b/include/cdfpp/cdf-io/saving/saving.hpp @@ -1,21 +1,24 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org @@ -212,7 +215,7 @@ Greenbelt, Maryland 20771 USA (User support: gsfc-cdf-support@lists.nasa.gov) )" } }; svg_ctx.body.gdr.record = { {}, 0, 0, 0, 0, 0, 0, 0xFFFF, 0, 0, 0, 0, - chrono::leap_seconds::last_updated, {0xFFFF}, {} }; + chrono::leap_seconds::last_updated, { 0xFFFF }, {} }; update_size(svg_ctx.body.cdr); update_size(svg_ctx.body.gdr); return svg_ctx; diff --git a/include/cdfpp/cdf-io/special-fields.hpp b/include/cdfpp/cdf-io/special-fields.hpp index 6268dfa..85ba734 100644 --- a/include/cdfpp/cdf-io/special-fields.hpp +++ b/include/cdfpp/cdf-io/special-fields.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include "../no_init_vector.hpp" #include #include diff --git a/include/cdfpp/cdf-io/zlib.hpp b/include/cdfpp/cdf-io/zlib.hpp index 9eae642..fab7363 100644 --- a/include/cdfpp/cdf-io/zlib.hpp +++ b/include/cdfpp/cdf-io/zlib.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2019, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include "../cdf-debug.hpp" #include "cdfpp/no_init_vector.hpp" #include diff --git a/include/cdfpp/cdf-io/zstd.hpp b/include/cdfpp/cdf-io/zstd.hpp index 32a0820..83ee2d4 100644 --- a/include/cdfpp/cdf-io/zstd.hpp +++ b/include/cdfpp/cdf-io/zstd.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2024, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include "../cdf-debug.hpp" #include "cdfpp/no_init_vector.hpp" #include diff --git a/include/cdfpp/cdf-map.hpp b/include/cdfpp/cdf-map.hpp index 98a3f9b..e844ca0 100644 --- a/include/cdfpp/cdf-map.hpp +++ b/include/cdfpp/cdf-map.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include #include "cdfpp_config.h" diff --git a/include/cdfpp/cdf-repr.hpp b/include/cdfpp/cdf-repr.hpp index e19a16d..818e265 100644 --- a/include/cdfpp/cdf-repr.hpp +++ b/include/cdfpp/cdf-repr.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2019, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include "cdfpp_config.h" #include #include @@ -53,9 +57,10 @@ inline stream_t& operator<<(stream_t& os, const decltype(cdf::to_time_point(tt20 auto tt = std::gmtime(&tp_time_t); if (tt) { - const uint64_t ns = (std::chrono::duration_cast(tp.time_since_epoch()) - % 1000000000) - .count(); + const uint64_t ns + = (std::chrono::duration_cast(tp.time_since_epoch()) + % 1000000000) + .count(); // clang-format off os << std::setprecision(4) << std::setw(4) << std::setfill('0') << tt->tm_year + 1900 << '-' << std::setprecision(2) << std::setw(2) << std::setfill('0') << tt->tm_mon + 1 << '-' @@ -107,8 +112,8 @@ inline stream_t& operator<<(stream_t& os, const tt2000_t& time) } template -inline auto stream_collection(stream_t& os, const input_t& input, const item_t& sep) - -> decltype(input.back(), os) +inline auto stream_collection( + stream_t& os, const input_t& input, const item_t& sep) -> decltype(input.back(), os) { os << "[ "; if (std::size(input)) diff --git a/include/cdfpp/cdf.hpp b/include/cdfpp/cdf.hpp index a3549c2..02695e0 100644 --- a/include/cdfpp/cdf.hpp +++ b/include/cdfpp/cdf.hpp @@ -1,30 +1,34 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2019, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include "attribute.hpp" #include "cdf-file.hpp" #include "cdf-io/cdf-io.hpp" -#include "variable.hpp" #include "cdf-repr.hpp" +#include "variable.hpp" #include #include diff --git a/include/cdfpp/chrono/cdf-chrono-constants.hpp b/include/cdfpp/chrono/cdf-chrono-constants.hpp index 4f7aba3..68d0392 100644 --- a/include/cdfpp/chrono/cdf-chrono-constants.hpp +++ b/include/cdfpp/chrono/cdf-chrono-constants.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2020, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include "cdfpp/cdf-debug.hpp" #include diff --git a/include/cdfpp/chrono/cdf-chrono.hpp b/include/cdfpp/chrono/cdf-chrono.hpp index 4d088a7..a1f32a5 100644 --- a/include/cdfpp/chrono/cdf-chrono.hpp +++ b/include/cdfpp/chrono/cdf-chrono.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2020, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include "cdf-chrono-constants.hpp" #include "cdf-leap-seconds.h" #include "cdfpp/cdf-debug.hpp" diff --git a/include/cdfpp/chrono/cdf-leap-seconds.h b/include/cdfpp/chrono/cdf-leap-seconds.h index 44a6e51..6a1f0c2 100644 --- a/include/cdfpp/chrono/cdf-leap-seconds.h +++ b/include/cdfpp/chrono/cdf-leap-seconds.h @@ -1,151 +1,153 @@ - -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2022, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once +#include #include #include -#include namespace cdf::chrono::leap_seconds -{ +{ using namespace std::chrono; - static inline constexpr uint32_t last_updated = 20170101; +static inline constexpr uint32_t last_updated = 20170101; - constexpr std::array leap_seconds_tt2000 = - {// ('1', 'Jan', '1972') - std::pair{ 63072000000000000 , 10000000000}, -// ('1', 'Jul', '1972') - std::pair{ 78796800000000000 , 11000000000}, -// ('1', 'Jan', '1973') - std::pair{ 94694400000000000 , 12000000000}, -// ('1', 'Jan', '1974') - std::pair{ 126230400000000000 , 13000000000}, -// ('1', 'Jan', '1975') - std::pair{ 157766400000000000 , 14000000000}, -// ('1', 'Jan', '1976') - std::pair{ 189302400000000000 , 15000000000}, -// ('1', 'Jan', '1977') - std::pair{ 220924800000000000 , 16000000000}, -// ('1', 'Jan', '1978') - std::pair{ 252460800000000000 , 17000000000}, -// ('1', 'Jan', '1979') - std::pair{ 283996800000000000 , 18000000000}, -// ('1', 'Jan', '1980') - std::pair{ 315532800000000000 , 19000000000}, -// ('1', 'Jul', '1981') - std::pair{ 362793600000000000 , 20000000000}, -// ('1', 'Jul', '1982') - std::pair{ 394329600000000000 , 21000000000}, -// ('1', 'Jul', '1983') - std::pair{ 425865600000000000 , 22000000000}, -// ('1', 'Jul', '1985') - std::pair{ 489024000000000000 , 23000000000}, -// ('1', 'Jan', '1988') - std::pair{ 567993600000000000 , 24000000000}, -// ('1', 'Jan', '1990') - std::pair{ 631152000000000000 , 25000000000}, -// ('1', 'Jan', '1991') - std::pair{ 662688000000000000 , 26000000000}, -// ('1', 'Jul', '1992') - std::pair{ 709948800000000000 , 27000000000}, -// ('1', 'Jul', '1993') - std::pair{ 741484800000000000 , 28000000000}, -// ('1', 'Jul', '1994') - std::pair{ 773020800000000000 , 29000000000}, -// ('1', 'Jan', '1996') - std::pair{ 820454400000000000 , 30000000000}, -// ('1', 'Jul', '1997') - std::pair{ 867715200000000000 , 31000000000}, -// ('1', 'Jan', '1999') - std::pair{ 915148800000000000 , 32000000000}, -// ('1', 'Jan', '2006') - std::pair{ 1136073600000000000 , 33000000000}, -// ('1', 'Jan', '2009') - std::pair{ 1230768000000000000 , 34000000000}, -// ('1', 'Jul', '2012') - std::pair{ 1341100800000000000 , 35000000000}, -// ('1', 'Jul', '2015') - std::pair{ 1435708800000000000 , 36000000000}, -// ('1', 'Jan', '2017') - std::pair{ 1483228800000000000 , 37000000000}, +constexpr std::array leap_seconds_tt2000 = { + // ('1', 'Jan', '1972') + std::pair { 63072000000000000, 10000000000 }, + // ('1', 'Jul', '1972') + std::pair { 78796800000000000, 11000000000 }, + // ('1', 'Jan', '1973') + std::pair { 94694400000000000, 12000000000 }, + // ('1', 'Jan', '1974') + std::pair { 126230400000000000, 13000000000 }, + // ('1', 'Jan', '1975') + std::pair { 157766400000000000, 14000000000 }, + // ('1', 'Jan', '1976') + std::pair { 189302400000000000, 15000000000 }, + // ('1', 'Jan', '1977') + std::pair { 220924800000000000, 16000000000 }, + // ('1', 'Jan', '1978') + std::pair { 252460800000000000, 17000000000 }, + // ('1', 'Jan', '1979') + std::pair { 283996800000000000, 18000000000 }, + // ('1', 'Jan', '1980') + std::pair { 315532800000000000, 19000000000 }, + // ('1', 'Jul', '1981') + std::pair { 362793600000000000, 20000000000 }, + // ('1', 'Jul', '1982') + std::pair { 394329600000000000, 21000000000 }, + // ('1', 'Jul', '1983') + std::pair { 425865600000000000, 22000000000 }, + // ('1', 'Jul', '1985') + std::pair { 489024000000000000, 23000000000 }, + // ('1', 'Jan', '1988') + std::pair { 567993600000000000, 24000000000 }, + // ('1', 'Jan', '1990') + std::pair { 631152000000000000, 25000000000 }, + // ('1', 'Jan', '1991') + std::pair { 662688000000000000, 26000000000 }, + // ('1', 'Jul', '1992') + std::pair { 709948800000000000, 27000000000 }, + // ('1', 'Jul', '1993') + std::pair { 741484800000000000, 28000000000 }, + // ('1', 'Jul', '1994') + std::pair { 773020800000000000, 29000000000 }, + // ('1', 'Jan', '1996') + std::pair { 820454400000000000, 30000000000 }, + // ('1', 'Jul', '1997') + std::pair { 867715200000000000, 31000000000 }, + // ('1', 'Jan', '1999') + std::pair { 915148800000000000, 32000000000 }, + // ('1', 'Jan', '2006') + std::pair { 1136073600000000000, 33000000000 }, + // ('1', 'Jan', '2009') + std::pair { 1230768000000000000, 34000000000 }, + // ('1', 'Jul', '2012') + std::pair { 1341100800000000000, 35000000000 }, + // ('1', 'Jul', '2015') + std::pair { 1435708800000000000, 36000000000 }, + // ('1', 'Jan', '2017') + std::pair { 1483228800000000000, 37000000000 }, }; -constexpr std::array leap_seconds_tt2000_reverse = - {// ('1', 'Jan', '1972') - std::pair{ -883655957816000000 , 10000000000}, -// ('1', 'Jul', '1972') - std::pair{ -867931156816000000 , 11000000000}, -// ('1', 'Jan', '1973') - std::pair{ -852033555816000000 , 12000000000}, -// ('1', 'Jan', '1974') - std::pair{ -820497554816000000 , 13000000000}, -// ('1', 'Jan', '1975') - std::pair{ -788961553816000000 , 14000000000}, -// ('1', 'Jan', '1976') - std::pair{ -757425552816000000 , 15000000000}, -// ('1', 'Jan', '1977') - std::pair{ -725803151816000000 , 16000000000}, -// ('1', 'Jan', '1978') - std::pair{ -694267150816000000 , 17000000000}, -// ('1', 'Jan', '1979') - std::pair{ -662731149816000000 , 18000000000}, -// ('1', 'Jan', '1980') - std::pair{ -631195148816000000 , 19000000000}, -// ('1', 'Jul', '1981') - std::pair{ -583934347816000000 , 20000000000}, -// ('1', 'Jul', '1982') - std::pair{ -552398346816000000 , 21000000000}, -// ('1', 'Jul', '1983') - std::pair{ -520862345816000000 , 22000000000}, -// ('1', 'Jul', '1985') - std::pair{ -457703944816000000 , 23000000000}, -// ('1', 'Jan', '1988') - std::pair{ -378734343816000000 , 24000000000}, -// ('1', 'Jan', '1990') - std::pair{ -315575942816000000 , 25000000000}, -// ('1', 'Jan', '1991') - std::pair{ -284039941816000000 , 26000000000}, -// ('1', 'Jul', '1992') - std::pair{ -236779140816000000 , 27000000000}, -// ('1', 'Jul', '1993') - std::pair{ -205243139816000000 , 28000000000}, -// ('1', 'Jul', '1994') - std::pair{ -173707138816000000 , 29000000000}, -// ('1', 'Jan', '1996') - std::pair{ -126273537816000000 , 30000000000}, -// ('1', 'Jul', '1997') - std::pair{ -79012736816000000 , 31000000000}, -// ('1', 'Jan', '1999') - std::pair{ -31579135816000000 , 32000000000}, -// ('1', 'Jan', '2006') - std::pair{ 189345665184000000 , 33000000000}, -// ('1', 'Jan', '2009') - std::pair{ 284040066184000000 , 34000000000}, -// ('1', 'Jul', '2012') - std::pair{ 394372867184000000 , 35000000000}, -// ('1', 'Jul', '2015') - std::pair{ 488980868184000000 , 36000000000}, -// ('1', 'Jan', '2017') - std::pair{ 536500869184000000 , 37000000000}, +constexpr std::array leap_seconds_tt2000_reverse = { + // ('1', 'Jan', '1972') + std::pair { -883655957816000000, 10000000000 }, + // ('1', 'Jul', '1972') + std::pair { -867931156816000000, 11000000000 }, + // ('1', 'Jan', '1973') + std::pair { -852033555816000000, 12000000000 }, + // ('1', 'Jan', '1974') + std::pair { -820497554816000000, 13000000000 }, + // ('1', 'Jan', '1975') + std::pair { -788961553816000000, 14000000000 }, + // ('1', 'Jan', '1976') + std::pair { -757425552816000000, 15000000000 }, + // ('1', 'Jan', '1977') + std::pair { -725803151816000000, 16000000000 }, + // ('1', 'Jan', '1978') + std::pair { -694267150816000000, 17000000000 }, + // ('1', 'Jan', '1979') + std::pair { -662731149816000000, 18000000000 }, + // ('1', 'Jan', '1980') + std::pair { -631195148816000000, 19000000000 }, + // ('1', 'Jul', '1981') + std::pair { -583934347816000000, 20000000000 }, + // ('1', 'Jul', '1982') + std::pair { -552398346816000000, 21000000000 }, + // ('1', 'Jul', '1983') + std::pair { -520862345816000000, 22000000000 }, + // ('1', 'Jul', '1985') + std::pair { -457703944816000000, 23000000000 }, + // ('1', 'Jan', '1988') + std::pair { -378734343816000000, 24000000000 }, + // ('1', 'Jan', '1990') + std::pair { -315575942816000000, 25000000000 }, + // ('1', 'Jan', '1991') + std::pair { -284039941816000000, 26000000000 }, + // ('1', 'Jul', '1992') + std::pair { -236779140816000000, 27000000000 }, + // ('1', 'Jul', '1993') + std::pair { -205243139816000000, 28000000000 }, + // ('1', 'Jul', '1994') + std::pair { -173707138816000000, 29000000000 }, + // ('1', 'Jan', '1996') + std::pair { -126273537816000000, 30000000000 }, + // ('1', 'Jul', '1997') + std::pair { -79012736816000000, 31000000000 }, + // ('1', 'Jan', '1999') + std::pair { -31579135816000000, 32000000000 }, + // ('1', 'Jan', '2006') + std::pair { 189345665184000000, 33000000000 }, + // ('1', 'Jan', '2009') + std::pair { 284040066184000000, 34000000000 }, + // ('1', 'Jul', '2012') + std::pair { 394372867184000000, 35000000000 }, + // ('1', 'Jul', '2015') + std::pair { 488980868184000000, 36000000000 }, + // ('1', 'Jan', '2017') + std::pair { 536500869184000000, 37000000000 }, }; -} //namespace cdf - \ No newline at end of file +} // namespace cdf diff --git a/include/cdfpp/no_init_vector.hpp b/include/cdfpp/no_init_vector.hpp index a39f363..6d7f234 100644 --- a/include/cdfpp/no_init_vector.hpp +++ b/include/cdfpp/no_init_vector.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include #include #include diff --git a/include/cdfpp/nomap.hpp b/include/cdfpp/nomap.hpp index dbb048f..4f1da30 100644 --- a/include/cdfpp/nomap.hpp +++ b/include/cdfpp/nomap.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include #include #include diff --git a/include/cdfpp/variable.hpp b/include/cdfpp/variable.hpp index dce0db3..b2f1371 100644 --- a/include/cdfpp/variable.hpp +++ b/include/cdfpp/variable.hpp @@ -1,25 +1,29 @@ -#pragma once /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2019, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) +-- +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- This program 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 General Public License for more details. +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org ----------------------------------------------------------------------------*/ +#pragma once #include "attribute.hpp" #include "cdf-data.hpp" #include "cdf-enums.hpp" @@ -34,7 +38,8 @@ #include template -inline stream_t& operator<<(stream_t& os, const cdf_map& attributes) +inline stream_t& operator<<( + stream_t& os, const cdf_map& attributes) { std::for_each(std::cbegin(attributes), std::cend(attributes), [&os](const auto& item) { item.second.__repr__(os, indent_t {}); }); diff --git a/pycdfpp/attribute.hpp b/pycdfpp/attribute.hpp index 1ee944c..78e00d3 100644 --- a/pycdfpp/attribute.hpp +++ b/pycdfpp/attribute.hpp @@ -1,20 +1,24 @@ /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program 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 General Public License for more details. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org @@ -372,8 +376,7 @@ Attribute::attr_data_t to_attr_data_entries( } } -void set_vattr_value( - VariableAttribute& attr, const string_or_buffer_t& value, CDF_Types cdf_type) +void set_vattr_value(VariableAttribute& attr, const string_or_buffer_t& value, CDF_Types cdf_type) { attr = to_attr_data_entry(value, cdf_type); } @@ -423,13 +426,14 @@ void def_attribute_wrapper(T& mod) "__getitem__", [](VariableAttribute& att, std::size_t index) -> py_cdf_attr_data_t { - if (index !=0 ) + if (index != 0) throw std::out_of_range( "Trying to get an attribute value outside of its range"); return to_py_cdf_data(*att); }, py::return_value_policy::copy) - .def("__len__", [](const VariableAttribute& ) { return 1; }) - .def_property_readonly("value", [](VariableAttribute& att) -> py_cdf_attr_data_t { return to_py_cdf_data(*att); }) + .def("__len__", [](const VariableAttribute&) { return 1; }) + .def_property_readonly("value", + [](VariableAttribute& att) -> py_cdf_attr_data_t { return to_py_cdf_data(*att); }) .def("type", [](VariableAttribute& att) { return att.type(); }); } diff --git a/pycdfpp/buffers.hpp b/pycdfpp/buffers.hpp index 33e32ea..8480144 100644 --- a/pycdfpp/buffers.hpp +++ b/pycdfpp/buffers.hpp @@ -1,20 +1,24 @@ /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2019, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program 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 General Public License for more details. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org diff --git a/pycdfpp/cdf.hpp b/pycdfpp/cdf.hpp index 59bf031..86ac64e 100644 --- a/pycdfpp/cdf.hpp +++ b/pycdfpp/cdf.hpp @@ -1,20 +1,24 @@ /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program 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 General Public License for more details. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org @@ -92,13 +96,11 @@ void def_cdf_wrapper(T& mod) .def("__contains__", [](const CDF& cd, std::string& key) { return cd.variables.count(key) > 0; }) .def( - "__iter__", - [](const CDF& cd) + "__iter__", [](const CDF& cd) { return py::make_key_iterator(std::begin(cd.variables), std::end(cd.variables)); }, py::keep_alive<0, 1>()) .def( - "items", - [](const CDF& cd) + "items", [](const CDF& cd) { return py::make_iterator(std::begin(cd.variables), std::end(cd.variables)); }, py::keep_alive<0, 1>()) .def("__len__", [](const CDF& cd) { return std::size(cd.variables); }) diff --git a/pycdfpp/chrono.hpp b/pycdfpp/chrono.hpp index 39c5eb4..b19a509 100644 --- a/pycdfpp/chrono.hpp +++ b/pycdfpp/chrono.hpp @@ -1,20 +1,24 @@ /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2019, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program 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 General Public License for more details. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org diff --git a/pycdfpp/enums.hpp b/pycdfpp/enums.hpp index b6b4456..28e1152 100644 --- a/pycdfpp/enums.hpp +++ b/pycdfpp/enums.hpp @@ -1,20 +1,24 @@ /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program 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 General Public License for more details. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org diff --git a/pycdfpp/pycdfpp.cpp b/pycdfpp/pycdfpp.cpp index 9ff1628..f37519a 100644 --- a/pycdfpp/pycdfpp.cpp +++ b/pycdfpp/pycdfpp.cpp @@ -1,20 +1,24 @@ /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2019, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program 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 General Public License for more details. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org @@ -69,14 +73,11 @@ auto def_cdf_map(T3& mod, const char* name) .def("__contains__", [](const cdf_map& m, std::string& key) { return m.count(key) > 0; }) .def( - "__iter__", - [](const cdf_map& m) - { return py::make_key_iterator(std::begin(m), std::end(m)); }, - py::keep_alive<0, 1>()) + "__iter__", [](const cdf_map& m) + { return py::make_key_iterator(std::begin(m), std::end(m)); }, py::keep_alive<0, 1>()) .def( - "items", - [](const cdf_map& m) { return py::make_iterator(std::begin(m), std::end(m)); }, - py::keep_alive<0, 1>()) + "items", [](const cdf_map& m) + { return py::make_iterator(std::begin(m), std::end(m)); }, py::keep_alive<0, 1>()) .def("keys", [](const cdf_map& m) { diff --git a/pycdfpp/repr.hpp b/pycdfpp/repr.hpp index 7047689..02ede97 100644 --- a/pycdfpp/repr.hpp +++ b/pycdfpp/repr.hpp @@ -1,20 +1,24 @@ /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program 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 General Public License for more details. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org @@ -24,7 +28,6 @@ #include - template inline std::string __repr__(T& obj) { diff --git a/pycdfpp/variable.hpp b/pycdfpp/variable.hpp index f0f08ff..4e21d37 100644 --- a/pycdfpp/variable.hpp +++ b/pycdfpp/variable.hpp @@ -1,20 +1,24 @@ /*------------------------------------------------------------------------------ --- This file is a part of the CDFpp library --- Copyright (C) 2023, Plasma Physics Laboratory - CNRS +-- The MIT License (MIT) -- --- This program is free software; you can redistribute it and/or modify --- it under the terms of the GNU General Public License as published by --- the Free Software Foundation; either version 2 of the License, or --- (at your option) any later version. +-- Copyright © 2024, Laboratory of Plasma Physics- CNRS -- --- This program 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 General Public License for more details. +-- Permission is hereby granted, free of charge, to any person obtaining a copy +-- of this software and associated documentation files (the “Software”), to deal +-- in the Software without restriction, including without limitation the rights +-- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +-- of the Software, and to permit persons to whom the Software is furnished to do +-- so, subject to the following conditions: -- --- You should have received a copy of the GNU General Public License --- along with this program; if not, write to the Free Software --- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +-- The above copyright notice and this permission notice shall be included in all +-- copies or substantial portions of the Software. +-- +-- THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, +-- INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A +-- PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT +-- HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +-- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE +-- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------*/ /*-- Author : Alexis Jeandet -- Mail : alexis.jeandet@member.fsf.org diff --git a/pyproject.toml b/pyproject.toml index fd7e80d..ef3b5d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,7 +13,7 @@ readme = "README.md" classifiers = [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", - "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.8", @@ -21,6 +21,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", ] dependencies = ['numpy', 'pyyaml'] dynamic = [