IODA Bundle
Type_Provider.cpp
Go to the documentation of this file.
1 /*
2  * (C) Copyright 2020 UCAR
3  *
4  * This software is licensed under the terms of the Apache Licence Version 2.0
5  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
6  */
8 
9 #include <stdexcept>
10 
11 #include "ioda/Types/Type.h"
12 #include "ioda/defs.h"
13 #include "ioda/Exception.h"
14 
15 namespace ioda {
16 namespace detail {
18 
19 Type Type_Provider::makeFundamentalType(std::type_index) const {
20  throw Exception("Backend does not implement fundamental types.", ioda_Here());
21 }
22 
23 Type Type_Provider::makeArrayType(std::initializer_list<Dimensions_t>, std::type_index,
24  std::type_index) const {
25  throw Exception("Backend does not implement array types.", ioda_Here());
26 }
27 
28 Type Type_Provider::makeStringType(size_t, std::type_index) const {
29  throw Exception("Backend does not implement string types.", ioda_Here());
30 }
31 
33 } // namespace detail
34 } // namespace ioda
IODA's error system.
Interfaces for ioda::Type and related classes.
Frontend/backend bindings for the type system.
The ioda exception class.
Definition: Exception.h:54
Represents the "type" (i.e. integer, string, float) of a piece of data.
Definition: Type.h:123
virtual Type makeArrayType(std::initializer_list< Dimensions_t > dimensions, std::type_index typeOuter, std::type_index typeInner) const
Make an array type, like a double[2].
virtual PointerOwner getReturnedPointerOwner() const
When a pointer is passed from the backend to the frontend, who has to free it?
virtual Type makeFundamentalType(std::type_index type) const
Make a basic object type, like a double, a float, or a char.
virtual Type makeStringType(size_t string_length, std::type_index typeOuter) const
Make a variable-length string type.
Common preprocessor definitions used throughout IODA.
PointerOwner
Who owns (and should free) pointers passed across the frontend / backend interface?
Definition: Type_Provider.h:27
@ Caller
The user has to free pointers.
#define ioda_Here()