Debian Codegraph @

packages/seacas/libraries/ioss/src/exodus/Ioex_ChangeSet.h

raw
1 // Copyright(C) 1999-2020, 2022, 2023, 2024 National Technology & Engineering Solutions
2 // of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
3 // NTESS, the U.S. Government retains certain rights in this software.
4 //
5 // See packages/seacas/LICENSE for details
6
7 #pragma once
8
9 #include "Ioss_ChangeSet.h" // for ChangeSet
10 #include "Ioss_ChangeSetFactory.h" // for ChangeSetFactory
11 #include "Ioss_CodeTypes.h"
12 #include "Ioss_DBUsage.h" // for DatabaseUsage
13 #include "Ioss_Map.h" // for Map
14 #include <cstddef> // for size_t
15 #include <cstdint> // for int64_t
16 #include <string> // for string
17 #include <vector> // for vector
18
19 #include "Ioss_State.h" // for State
20 #include "ioex_export.h"
21
22 namespace Ioss {
23 class Region;
24 } // namespace Ioss
25
26 /** \brief A namespace for the exodus change set type.
27 */
28 namespace Ioex {
29 class IOEX_EXPORT ChangeSetFactory : public Ioss::ChangeSetFactory
30 {
31 public:
32 static const ChangeSetFactory *factory();
33
34 private:
35 ChangeSetFactory();
36 Ioss::ChangeSet *make_ChangeSet(Ioss::Region *region) const override;
37 Ioss::ChangeSet *make_ChangeSet(Ioss::DatabaseIO *db, const std::string &dbName,
38 const std::string &dbType,
39 unsigned fileCyclicCount) const override;
40 };
41
42 class IOEX_EXPORT ChangeSet : public Ioss::ChangeSet
43 {
44 public:
45 explicit ChangeSet(Ioss::Region *region);
46 ChangeSet(Ioss::DatabaseIO *db, const std::string &dbName, const std::string &dbType,
47 unsigned fileCyclicCount);
48
49 ~ChangeSet() override;
50
51 void populate_change_sets(bool loadAllFiles = true) override;
52
53 IOSS_NODISCARD Ioss::DatabaseIO *open_change_set(unsigned index,
54 Ioss::DatabaseUsage usage) override;
55 void close_change_set(unsigned index) override;
56
57 private:
58 ChangeSet() = delete;
59 ChangeSet(const ChangeSet &) = delete;
60
61 std::string m_currentChangeSet;
62
63 protected:
64 void get_group_change_sets();
65 void clear_change_sets() override;
66 bool supports_group();
67 };
68
69 } // namespace Ioex