IOSS 2.0
Loading...
Searching...
No Matches
Ioss_CompositeVariableType.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 CompositeVariableType : public VariableType
17 {
18 public:
19 IOSS_NODISCARD static std::string composite_name(const std::string &base, int copies);
20 IOSS_NODISCARD static VariableType *composite_variable_type(const VariableType *inst,
21 int copies);
22
23 IOSS_NODISCARD VariableType::Type type() const override { return Type::COMPOSITE; }
24 IOSS_NODISCARD std::string type_string() const override;
25
26 IOSS_NODISCARD std::string label(int which, char suffix_sep = '_') const override;
27 CompositeVariableType(const std::string &my_name, int number_components, bool delete_me);
28 CompositeVariableType(const VariableType *base_type, int copies, bool delete_me);
30
31 IOSS_NODISCARD const VariableType *get_base_type() const { return baseType; }
32 IOSS_NODISCARD int get_num_copies() const { return copies_; }
33
34 // Kept for backward compatibility...
35 IOSS_NODISCARD [[deprecated("Use get_base_type")]] const VariableType *GetBaseType() const
36 {
37 return baseType;
38 }
39 IOSS_NODISCARD [[deprecated("Use get_num_copies")]] int GetNumCopies() const { return copies_; }
40
41 private:
44 };
45} // namespace Ioss
#define IOSS_NODISCARD
Definition Ioss_CodeTypes.h:55
Definition Ioss_CompositeVariableType.h:17
IOSS_NODISCARD const VariableType * get_base_type() const
Definition Ioss_CompositeVariableType.h:31
CompositeVariableType(const CompositeVariableType &)=delete
IOSS_NODISCARD int GetNumCopies() const
Definition Ioss_CompositeVariableType.h:39
const VariableType * baseType
Definition Ioss_CompositeVariableType.h:42
int copies_
Definition Ioss_CompositeVariableType.h:43
IOSS_NODISCARD int get_num_copies() const
Definition Ioss_CompositeVariableType.h:32
IOSS_NODISCARD VariableType::Type type() const override
Definition Ioss_CompositeVariableType.h:23
IOSS_NODISCARD const VariableType * GetBaseType() const
Definition Ioss_CompositeVariableType.h:35
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