IOSS 2.0
Loading...
Searching...
No Matches
Ioss_ElementVariableType.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"
13#include <string>
14
15namespace Ioss {
16 class IOSS_EXPORT ElementVariableType : public Ioss::VariableType
17 {
18 public:
19 IOSS_NODISCARD std::string label(int /*which*/, const char /*suffix_sep*/) const override
20 {
21 return "";
22 }
23 IOSS_NODISCARD std::string label_name(const std::string &base, int /*which*/,
24 const char /*suffix_sep*/, const char /*suffix_sep*/,
25 bool /* suffices_uppercase */) const override
26 {
27 return base;
28 }
29 IOSS_NODISCARD int suffix_count() const override { return 0; }
30
31 IOSS_NODISCARD VariableType::Type type() const override { return Type::ELEMENT; }
32 IOSS_NODISCARD std::string type_string() const override { return "Element"; }
33
34 protected:
35 ElementVariableType(const std::string &type, int comp_count);
36 };
37
38 inline ElementVariableType::ElementVariableType(const std::string &type, int comp_count)
39 : Ioss::VariableType(type, comp_count, false)
40 {
41 }
42} // namespace Ioss
#define IOSS_NODISCARD
Definition Ioss_CodeTypes.h:55
Definition Ioss_ElementVariableType.h:17
IOSS_NODISCARD int suffix_count() const override
Definition Ioss_ElementVariableType.h:29
IOSS_NODISCARD std::string label(int, const char) const override
Definition Ioss_ElementVariableType.h:19
ElementVariableType(const std::string &type, int comp_count)
Definition Ioss_ElementVariableType.h:38
IOSS_NODISCARD std::string type_string() const override
Definition Ioss_ElementVariableType.h:32
IOSS_NODISCARD VariableType::Type type() const override
Definition Ioss_ElementVariableType.h:31
IOSS_NODISCARD std::string label_name(const std::string &base, int, const char, const char, bool) const override
Definition Ioss_ElementVariableType.h:23
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