IOSS 2.0

info_interface.h
Go to the documentation of this file.
1 /*
2 * Copyright(C) 1999-2017 National Technology & Engineering Solutions
3 * of Sandia, LLC (NTESS). Under the terms of Contract DE-NA0003525 with
4 * NTESS, the U.S. Government retains certain rights in this software.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met:
9 *
10 * * Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer.
12 *
13 * * Redistributions in binary form must reproduce the above
14 * copyright notice, this list of conditions and the following
15 * disclaimer in the documentation and/or other materials provided
16 * with the distribution.
17 *
18 * * Neither the name of NTESS nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
25 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
26 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
27 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
28 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
32 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34 #ifndef info_SystemInterface_h
35 #define info_SystemInterface_h
36
37 #include "Ioss_GetLongOpt.h" // for GetLongOption
38 #include <iosfwd> // for ostream
39 #include <string> // for string
40
41 /** \brief A special namespace for the io_info demonstration program interface.
42 */
43 namespace Info {
44 class Interface
45 {
46 public:
47 Interface();
48 ~Interface();
49
50 bool parse_options(int argc, char **argv);
51
52 int summary() const { return summary_; }
53 bool check_node_status() const { return checkNodeStatus_; }
54 bool compute_volume() const { return computeVolume_; }
55 bool compute_bbox() const { return computeBBox_; }
56 bool adjacencies() const { return adjacencies_; }
57 bool ints_64_bit() const { return ints64Bit_; }
58 bool list_groups() const { return listGroups_; }
59
60 int surface_split_scheme() const { return surfaceSplitScheme_; }
61 char field_suffix_separator() const { return fieldSuffixSeparator_; }
62 bool use_generic_names() const { return useGenericNames_; }
63 bool disable_field_recognition() const { return disableFieldRecognition_; }
64 std::string decomp_method() const { return decompMethod_; }
65 std::string filename() const { return filename_; }
66 std::string type() const { return filetype_; }
67 std::string groupname() const { return groupname_; }
68
69 //! Dumps representation of data in this class to cerr
70
71 private:
72 void enroll_options();
73
74 Ioss::GetLongOption options_;
75 std::string filetype_{"exodus"};
76 std::string filename_;
77 std::string groupname_;
78 std::string decompMethod_;
79
80 bool checkNodeStatus_{false};
81 bool computeVolume_{false};
82 bool adjacencies_{false};
83 bool ints64Bit_{false};
84 bool computeBBox_{false};
85 bool listGroups_{false};
86 bool useGenericNames_{false};
87 bool disableFieldRecognition_{false};
88 char fieldSuffixSeparator_{'_'};
89
90 int summary_{0};
91 int surfaceSplitScheme_{1};
92 };
93 } // namespace Info
94 #endif
Info::Interface::checkNodeStatus_
bool checkNodeStatus_
Definition: info_interface.h:80
Info::Interface::disableFieldRecognition_
bool disableFieldRecognition_
Definition: info_interface.h:87
Info::Interface::surface_split_scheme
int surface_split_scheme() const
Definition: info_interface.h:60
Info::Interface::filetype_
std::string filetype_
Definition: info_interface.h:75
Info::Interface
Definition: info_interface.h:44
Info::Interface::decomp_method
std::string decomp_method() const
Definition: info_interface.h:64
Info::Interface::check_node_status
bool check_node_status() const
Definition: info_interface.h:53
Info::Interface::useGenericNames_
bool useGenericNames_
Definition: info_interface.h:86
Info::Interface::Interface
Interface()
Definition: info_interface.C:61
Info::Interface::disable_field_recognition
bool disable_field_recognition() const
Definition: info_interface.h:63
Info::Interface::parse_options
bool parse_options(int argc, char **argv)
Definition: info_interface.C:173
Info::Interface::groupname_
std::string groupname_
Definition: info_interface.h:77
Info::Interface::options_
Ioss::GetLongOption options_
Definition: info_interface.h:74
Info::Interface::use_generic_names
bool use_generic_names() const
Definition: info_interface.h:62
Info::Interface::decompMethod_
std::string decompMethod_
Definition: info_interface.h:78
Info::Interface::summary_
int summary_
Definition: info_interface.h:90
Info::Interface::compute_volume
bool compute_volume() const
Definition: info_interface.h:54
Info::Interface::ints_64_bit
bool ints_64_bit() const
Definition: info_interface.h:57
Info::Interface::~Interface
~Interface()
Info::Interface::fieldSuffixSeparator_
char fieldSuffixSeparator_
Definition: info_interface.h:88
Info::Interface::computeVolume_
bool computeVolume_
Definition: info_interface.h:81
Info::Interface::filename_
std::string filename_
Definition: info_interface.h:76
Info::Interface::computeBBox_
bool computeBBox_
Definition: info_interface.h:84
Ioss::GetLongOption
A database of program command line and environment variable options and methods for manipulating them...
Definition: Ioss_GetLongOpt.h:47
Info::Interface::listGroups_
bool listGroups_
Definition: info_interface.h:85
Info::Interface::filename
std::string filename() const
Definition: info_interface.h:65
Info
A special namespace for the io_info demonstration program interface.
Definition: info_interface.h:43
Info::Interface::surfaceSplitScheme_
int surfaceSplitScheme_
Definition: info_interface.h:91
Info::Interface::list_groups
bool list_groups() const
Definition: info_interface.h:58
Info::Interface::adjacencies
bool adjacencies() const
Definition: info_interface.h:56
Info::Interface::type
std::string type() const
Definition: info_interface.h:66
Info::Interface::summary
int summary() const
Definition: info_interface.h:52
Info::Interface::compute_bbox
bool compute_bbox() const
Definition: info_interface.h:55
Info::Interface::enroll_options
void enroll_options()
Dumps representation of data in this class to cerr.
Definition: info_interface.C:65
Info::Interface::ints64Bit_
bool ints64Bit_
Definition: info_interface.h:83
Info::Interface::groupname
std::string groupname() const
Definition: info_interface.h:67
Info::Interface::adjacencies_
bool adjacencies_
Definition: info_interface.h:82
Ioss_GetLongOpt.h
Info::Interface::field_suffix_separator
char field_suffix_separator() const
Definition: info_interface.h:61