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_; }
62  bool use_generic_names() const { return useGenericNames_; }
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 
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};
89 
90  int summary_{0};
92  };
93 } // namespace Info
94 #endif
bool checkNodeStatus_
Definition: info_interface.h:80
bool disableFieldRecognition_
Definition: info_interface.h:87
int surface_split_scheme() const
Definition: info_interface.h:60
std::string filetype_
Definition: info_interface.h:75
Definition: info_interface.h:44
std::string decomp_method() const
Definition: info_interface.h:64
bool check_node_status() const
Definition: info_interface.h:53
bool useGenericNames_
Definition: info_interface.h:86
Interface()
Definition: info_interface.C:61
bool disable_field_recognition() const
Definition: info_interface.h:63
bool parse_options(int argc, char **argv)
Definition: info_interface.C:173
std::string groupname_
Definition: info_interface.h:77
Ioss::GetLongOption options_
Definition: info_interface.h:74
bool use_generic_names() const
Definition: info_interface.h:62
std::string decompMethod_
Definition: info_interface.h:78
int summary_
Definition: info_interface.h:90
bool compute_volume() const
Definition: info_interface.h:54
bool ints_64_bit() const
Definition: info_interface.h:57
char fieldSuffixSeparator_
Definition: info_interface.h:88
bool computeVolume_
Definition: info_interface.h:81
std::string filename_
Definition: info_interface.h:76
bool computeBBox_
Definition: info_interface.h:84
A database of program command line and environment variable options and methods for manipulating them...
Definition: Ioss_GetLongOpt.h:47
bool listGroups_
Definition: info_interface.h:85
std::string filename() const
Definition: info_interface.h:65
A special namespace for the io_info demonstration program interface.
Definition: info_interface.h:43
int surfaceSplitScheme_
Definition: info_interface.h:91
bool list_groups() const
Definition: info_interface.h:58
bool adjacencies() const
Definition: info_interface.h:56
std::string type() const
Definition: info_interface.h:66
int summary() const
Definition: info_interface.h:52
bool compute_bbox() const
Definition: info_interface.h:55
void enroll_options()
Dumps representation of data in this class to cerr.
Definition: info_interface.C:65
bool ints64Bit_
Definition: info_interface.h:83
std::string groupname() const
Definition: info_interface.h:67
bool adjacencies_
Definition: info_interface.h:82
char field_suffix_separator() const
Definition: info_interface.h:61