Loading [MathJax]/extensions/tex2jax.js
IODA
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
String_c.h
Go to the documentation of this file.
1 #pragma once
2 /*
3  * (C) Copyright 2020-2021 UCAR
4  *
5  * This software is licensed under the terms of the Apache Licence Version 2.0
6  * which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
7  */
8 /*! \defgroup ioda_string Strings
9  * \brief Provides the C-style interface for variable-length strings and string arrays.
10  * \ingroup ioda_c_api
11  *
12  * @{
13  * \file String_c.h
14  * \brief @link ioda_string C bindings @endlink. Needed for reads.
15  */
16 #include "../defs.h"
17 #include "./c_binding_macros.h"
18 
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22 
23 /// \brief Return type when arrays of strings are encountered.
25  size_t n;
26  char** strings;
27 };
28 
29 /// \brief Deallocate a returned string object.
31 
32 /// \brief Namespace encapsulation for string functions.
33 struct c_strings {
34  void (*destruct)(struct ioda_string_ret_t*);
35 };
36 
37 #ifdef __cplusplus
38 }
39 #endif
40 
41 /// @} // End Doxygen block
C bindings interface to templated C++ ioda classes and functions.
#define IODA_DL
A preprocessor tag that indicates that a symbol is to be exported/imported.
Definition: defs.h:110
IODA_DL void ioda_string_ret_t_destruct(struct ioda_string_ret_t *)
Deallocate a returned string object.
Definition: String_c.cpp:19
Namespace encapsulation for string functions.
Definition: String_c.h:33
void(* destruct)(struct ioda_string_ret_t *)
Definition: String_c.h:34
Return type when arrays of strings are encountered.
Definition: String_c.h:24
char ** strings
Definition: String_c.h:26