IOSS 2.0
Loading...
Searching...
No Matches
Ioss_ComposedVariableType.h
Go to the documentation of this file.
1// Copyright(C) 1999-2020, 2022, 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_CodeTypes.h"
12#include "Ioss_VariableType.h" // for VariableType
13#include <string> // for string
14
15namespace Ioss {
16 class IOSS_EXPORT ComposedVariableType : public VariableType
17 {
18 public:
19 IOSS_NODISCARD static std::string composed_name(const std::string &base,
20 const std::string &secondary);
21 IOSS_NODISCARD static VariableType *composed_variable_type(const VariableType *inst,
22 const VariableType *secondary);
23
24 IOSS_NODISCARD VariableType::Type type() const override { return Type::COMPOSED; }
25 IOSS_NODISCARD std::string type_string() const override;
26
27 IOSS_NODISCARD std::string label(int which, char suffix_sep = '_') const override;
28
29 ComposedVariableType(const VariableType *base_type, const VariableType *secondary,
30 bool delete_me);
32
33 IOSS_NODISCARD const VariableType *get_base_type() const { return baseType; }
34 IOSS_NODISCARD const VariableType *get_secondary_type() const { return secondaryType; }
35
36 private:
37 const VariableType *baseType{nullptr};
38 const VariableType *secondaryType{nullptr};
39 };
40} // namespace Ioss
#define IOSS_NODISCARD
Definition Ioss_CodeTypes.h:55
Definition Ioss_ComposedVariableType.h:17
IOSS_NODISCARD VariableType::Type type() const override
Definition Ioss_ComposedVariableType.h:24
IOSS_NODISCARD const VariableType * get_base_type() const
Definition Ioss_ComposedVariableType.h:33
IOSS_NODISCARD const VariableType * get_secondary_type() const
Definition Ioss_ComposedVariableType.h:34
ComposedVariableType(const ComposedVariableType &)=delete
A generic variable type.
Definition Ioss_VariableType.h:70
Type
Definition Ioss_VariableType.h:72
The main namespace for the Ioss library.
Definition Ioad_DatabaseIO.C:40