| 1 |
// Copyright(C) 1999-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_CodeTypes.h" |
| 10 |
#include <stddef.h> |
| 11 |
#include <string> |
| 12 |
#include <vector> |
| 13 |
|
| 14 |
#include "ioss_export.h" |
| 15 |
|
| 16 |
namespace Ioss { |
| 17 |
class Field; |
| 18 |
class VariableType; |
| 19 |
|
| 20 |
class IOSS_EXPORT Transform |
| 21 |
{ |
| 22 |
public: |
| 23 |
virtual ~Transform() = default; |
| 24 |
IOSS_NODISCARD virtual const Ioss::VariableType * |
| 25 |
output_storage(const Ioss::VariableType *in) const = 0; |
| 26 |
IOSS_NODISCARD virtual size_t output_count(size_t in) const = 0; |
| 27 |
|
| 28 |
bool execute(const Ioss::Field &field, void *data); |
| 29 |
|
| 30 |
virtual void set_property(const std::string &name, int value); |
| 31 |
virtual void set_property(const std::string &name, double value); |
| 32 |
virtual void set_properties(const std::string &name, const std::vector<int> &values); |
| 33 |
virtual void set_properties(const std::string &name, const std::vector<double> &values); |
| 34 |
|
| 35 |
IOSS_NODISCARD static Transform *create(const std::string &transform); |
| 36 |
|
| 37 |
protected: |
| 38 |
Transform() = default; |
| 39 |
|
| 40 |
virtual bool internal_execute(const Ioss::Field &field, void *data) = 0; |
| 41 |
}; |
| 42 |
} // namespace Ioss |