IOSS 2.0
Loading...
Searching...
No Matches
Ioss_ConcreteVariableType.h
Go to the documentation of this file.
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_export.h"
10
11#include "Ioss_VariableType.h" // for VariableType
12#include <string> // for string
13
14namespace Ioss {
15 class IOSS_EXPORT StorageInitializer
16 {
17 public:
19 // Assignment operator
20 // Copy constructor
21 };
22
23#define MAKE_CLASS(X) \
24 class IOSS_EXPORT X : public VariableType \
25 { \
26 public: \
27 IOSS_NODISCARD std::string label(int which, const char suffix_sep = '_') const override; \
28 static void factory(); \
29 X(const X &) = delete; \
30 \
31 IOSS_NODISCARD VariableType::Type type() const override { return Type::STANDARD; } \
32 IOSS_NODISCARD std::string type_string() const override { return "Standard"; } \
33 \
34 protected: \
35 X(); \
36 \
37 private: \
38 }
39
40 class IOSS_EXPORT Invalid_Storage : public VariableType
41 {
42 public:
44 IOSS_NODISCARD std::string label(int which, char suffix_sep = '_') const override;
45 IOSS_NODISCARD std::string label_name(const std::string &base, int /*which*/, char suffix_sep1,
46 char suffix_sep2, bool suffices_uppercase) const override;
47 IOSS_NODISCARD int suffix_count() const override { return 0; }
48 static void factory();
49
50 IOSS_NODISCARD VariableType::Type type() const override { return Type::UNKNOWN; }
51 IOSS_NODISCARD std::string type_string() const override { return "Invalid"; }
52
53 protected:
55 };
56
57 class IOSS_EXPORT Scalar : public VariableType
58 {
59 public:
60 Scalar(const Scalar &) = delete;
61 IOSS_NODISCARD std::string label(int which, char suffix_sep = '_') const override;
62 IOSS_NODISCARD std::string label_name(const std::string &base, int /*which*/, char suffix_sep1,
63 char suffix_sep2, bool suffices_uppercase) const override;
64 IOSS_NODISCARD int suffix_count() const override { return 0; }
65 static void factory();
66
67 IOSS_NODISCARD VariableType::Type type() const override { return Type::SCALAR; }
68 IOSS_NODISCARD std::string type_string() const override { return "Scalar"; }
69
70 protected:
71 Scalar();
72 };
73
95} // namespace Ioss
#define IOSS_NODISCARD
Definition Ioss_CodeTypes.h:55
#define MAKE_CLASS(X)
Definition Ioss_ConcreteVariableType.h:23
Definition Ioss_ConcreteVariableType.h:91
Definition Ioss_ConcreteVariableType.h:90
Definition Ioss_ConcreteVariableType.h:89
Definition Ioss_ConcreteVariableType.h:82
Definition Ioss_ConcreteVariableType.h:81
Definition Ioss_ConcreteVariableType.h:80
Definition Ioss_ConcreteVariableType.h:79
Definition Ioss_ConcreteVariableType.h:78
Definition Ioss_ConcreteVariableType.h:41
IOSS_NODISCARD std::string type_string() const override
Definition Ioss_ConcreteVariableType.h:51
Invalid_Storage(const Invalid_Storage &)=delete
IOSS_NODISCARD int suffix_count() const override
Definition Ioss_ConcreteVariableType.h:47
IOSS_NODISCARD VariableType::Type type() const override
Definition Ioss_ConcreteVariableType.h:50
Definition Ioss_ConcreteVariableType.h:92
Definition Ioss_ConcreteVariableType.h:93
Definition Ioss_ConcreteVariableType.h:76
Definition Ioss_ConcreteVariableType.h:77
Definition Ioss_ConcreteVariableType.h:58
IOSS_NODISCARD std::string type_string() const override
Definition Ioss_ConcreteVariableType.h:68
Scalar(const Scalar &)=delete
IOSS_NODISCARD int suffix_count() const override
Definition Ioss_ConcreteVariableType.h:64
IOSS_NODISCARD VariableType::Type type() const override
Definition Ioss_ConcreteVariableType.h:67
Definition Ioss_ConcreteVariableType.h:16
Definition Ioss_ConcreteVariableType.h:88
Definition Ioss_ConcreteVariableType.h:87
Definition Ioss_ConcreteVariableType.h:86
Definition Ioss_ConcreteVariableType.h:85
Definition Ioss_ConcreteVariableType.h:84
Definition Ioss_ConcreteVariableType.h:83
Definition Ioss_ConcreteVariableType.h:94
A generic variable type.
Definition Ioss_VariableType.h:70
Type
Definition Ioss_VariableType.h:72
Definition Ioss_ConcreteVariableType.h:74
Definition Ioss_ConcreteVariableType.h:75
The main namespace for the Ioss library.
Definition Ioad_DatabaseIO.C:40