Mercury
mercury_string_object.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 Argonne National Laboratory, Department of Energy,
3  *                    UChicago Argonne, LLC and The HDF Group.
4  * All rights reserved.
5  *
6  * The full copyright notice, including terms governing use, modification,
7  * and redistribution, is contained in the COPYING file that can be
8  * found at the root of the source code distribution tree.
9  */
10 
11 #ifndef MERCURY_STRING_OBJECT_H
12 #define MERCURY_STRING_OBJECT_H
13 
14 #include "mercury_types.h"
15 
16 typedef struct hg_string_object {
17  char * data;
18  hg_bool_t is_const;
19  hg_bool_t is_owned;
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
33 HG_EXPORT hg_return_t
35 
45 HG_EXPORT hg_return_t
46 hg_string_object_init_char(hg_string_object_t *string, char *s, hg_bool_t is_owned);
47 
57 HG_EXPORT hg_return_t
58 hg_string_object_init_const_char(hg_string_object_t *string, const char *s, hg_bool_t is_owned);
59 
67 HG_EXPORT hg_return_t
69 
78 HG_EXPORT hg_return_t
80 
88 HG_EXPORT char *
90 
91 #ifdef __cplusplus
92 }
93 #endif
94 
95 #endif /* MERCURY_STRING_OBJECT_H */
HG_EXPORT char * hg_string_object_swap(hg_string_object_t *string, char *s)
Exchange the content of the string structure by the content of s.
HG_EXPORT hg_return_t hg_string_object_dup(hg_string_object_t string, hg_string_object_t *new_string)
Duplicate a string object.
HG_EXPORT hg_return_t hg_string_object_init(hg_string_object_t *string)
Initialize a string object.
HG_EXPORT hg_return_t hg_string_object_free(hg_string_object_t *string)
Free a string object.
HG_EXPORT hg_return_t hg_string_object_init_const_char(hg_string_object_t *string, const char *s, hg_bool_t is_owned)
Initialize a string object from the const string pointed to by s.
struct hg_string_object hg_string_object_t
HG_EXPORT hg_return_t hg_string_object_init_char(hg_string_object_t *string, char *s, hg_bool_t is_owned)
Initialize a string object from the string pointed to by s.
enum hg_return hg_return_t