IOSS 2.0
Loading...
Searching...
No Matches
Ioss_TransformFactory.h
Go to the documentation of this file.
1// Copyright(C) 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_CodeTypes.h"
10#include <functional>
11#include <map>
12#include <string>
13
14#include "ioss_export.h"
15
16namespace Ioss {
17 class Transform;
18
19 class TransformFactory;
20
21 using TransformFactoryMap = std::map<std::string, TransformFactory *, std::less<>>;
22
23 class IOSS_EXPORT TransformFactory
24 {
25 public:
26 virtual ~TransformFactory() = default;
27 IOSS_NODISCARD static Ioss::Transform *create(const std::string &type);
28
29 static int describe(Ioss::NameList *names);
30 IOSS_NODISCARD static Ioss::NameList describe();
31
32 protected:
33 explicit TransformFactory(const std::string &type);
34 virtual Ioss::Transform *make(const std::string &) const = 0;
35 static void alias(const std::string &base, const std::string &syn);
36
37 private:
38 static TransformFactoryMap &registry();
39 };
40} // namespace Ioss
#define IOSS_NODISCARD
Definition Ioss_CodeTypes.h:55
Definition Ioss_TransformFactory.h:24
virtual ~TransformFactory()=default
virtual Ioss::Transform * make(const std::string &) const =0
Definition Ioss_Transform.h:21
The main namespace for the Ioss library.
Definition Ioad_DatabaseIO.C:40
Ioss::NameList NameList
Definition Ioss_ChangeSetFactory.h:25
std::map< std::string, TransformFactory *, std::less<> > TransformFactoryMap
Definition Ioss_TransformFactory.h:21