GEOS
OutputBase.hpp
Go to the documentation of this file.
1 /*
2  * ------------------------------------------------------------------------------------------------------------
3  * SPDX-License-Identifier: LGPL-2.1-only
4  *
5  * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC
6  * Copyright (c) 2018-2024 Total, S.A
7  * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University
8  * Copyright (c) 2023-2024 Chevron
9  * Copyright (c) 2019- GEOS/GEOSX Contributors
10  * All rights reserved
11  *
12  * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
13  * ------------------------------------------------------------------------------------------------------------
14  */
15 
19 #ifndef GEOS_FILEIO_OUTPUTS_OUTPUTBASE_HPP_
20 #define GEOS_FILEIO_OUTPUTS_OUTPUTBASE_HPP_
21 
22 #include "dataRepository/Group.hpp"
24 
25 
26 namespace geos
27 {
28 
35 {
36 public:
38  explicit OutputBase( string const & name, Group * const parent );
39 
41  virtual ~OutputBase() override;
42 
47  static void setOutputDirectory( string const & outputDir );
48 
53  static string const & getOutputDirectory();
54 
59  static void setFileNameRoot( string const & root );
60 
65  static string const & getFileNameRoot();
66 
68  virtual void setupDirectoryStructure();
69 
70  // Catalog interface
74 
75  // Catalog view keys
76  struct viewKeysStruct
77  {
78  static constexpr auto childDirectoryString = "childDirectory";
79  static constexpr auto parallelThreadsString = "parallelThreads";
80  } outputBaseViewKeys;
82 
87  string childDirectory() const { return m_childDirectory; }
88 
93  integer parallelThreads() const { return m_parallelThreads; }
94 
95 
96 
97 protected:
103  virtual void initializePreSubGroups() override;
104 
105 private:
106  string m_childDirectory;
107  integer m_parallelThreads;
108 
109 };
110 
111 
112 } /* namespace geos */
113 
114 #endif /* GEOS_FILEIO_OUTPUTS_OUTPUTBASE_HPP_ */
string childDirectory() const
Get the path of the child directory where output will be written.
Definition: OutputBase.hpp:87
virtual void setupDirectoryStructure()
Method for setting up output directories.
static string const & getOutputDirectory()
Getter for the output directory.
static string const & getFileNameRoot()
Getter for the file name root.
integer parallelThreads() const
Get the number of parallel threads to use to write plotfiles.
Definition: OutputBase.hpp:93
virtual ~OutputBase() override
Destructor.
virtual void initializePreSubGroups() override
Do initialization prior to calling initialization operations on the subgroups.
OutputBase(string const &name, Group *const parent)
Constructor.
static void setOutputDirectory(string const &outputDir)
Setter for the output directory.
static void setFileNameRoot(string const &root)
Setter for the file name root.
This class provides the base class/interface for the catalog value objects.
std::unordered_map< std::string, std::unique_ptr< CatalogInterface< BASETYPE, ARGS... > > > CatalogType
This is the type that will be used for the catalog. The catalog is actually instantiated in the BASET...
static CatalogInterface::CatalogType & getCatalog()
Get the singleton catalog for this Group.
std::int32_t integer
Signed integer type.
Definition: DataTypes.hpp:82
struct containing the view access keys to be bound with class data member