Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
afw_log_impl_declares.h
Go to the documentation of this file.
1 // See the 'COPYING' file in the project root for licensing information.
2 /*
3  * Interface afw_interface Implementation Declares
4  *
5  * Copyright (c) 2010-2023 Clemson University
6  *
7  */
8 
10 
12 
74 #ifdef __AFW_LOG_IMPL_DECLARES_H__
75 #ifndef AFW_LOG_INF_ONLY
76 #error "afw_log_impl_declares.h already included."
77 #endif
78 #endif
79 #ifndef __AFW_LOG_IMPL_DECLARES_H__
80 #ifdef AFW_LOG_INF_ONLY
81 #error "afw_log_impl_declares.h must be included before AFW_LOG_INF_ONLY."
82 #endif
83 #define __AFW_LOG_IMPL_DECLARES_H__ 1
84 #endif
85 
86 #ifdef AFW_IMPLEMENTATION_ID
87 #define _AFW_IMPLEMENTATION_ID_ AFW_IMPLEMENTATION_ID
88 #else
89 #define _AFW_IMPLEMENTATION_ID_ "unspecified"
90 #endif
91 #ifdef AFW_IMPLEMENTATION_SPECIFIC
92 #define _AFW_IMPLEMENTATION_SPECIFIC_ AFW_IMPLEMENTATION_SPECIFIC
93 #else
94 #define _AFW_IMPLEMENTATION_SPECIFIC_ NULL
95 #endif
96 #ifndef AFW_LOG_INF_ONLY
97 
98 #ifndef impl_afw_log_destroy
99 /* Declare method destroy */
100 AFW_DECLARE_STATIC(void)
101 impl_afw_log_destroy(
102  const afw_log_t * instance,
103  afw_xctx_t * xctx);
104 #endif
105 
106 #ifndef impl_afw_log_set_own_mask
107 /* Declare method set_own_mask */
108 AFW_DECLARE_STATIC(void)
109 impl_afw_log_set_own_mask(
110  const afw_log_t * instance,
112  afw_xctx_t * xctx);
113 #endif
114 
115 #ifndef impl_afw_log_write
116 /* Declare method write */
117 AFW_DECLARE_STATIC(void)
119  const afw_log_t * instance,
120  afw_log_priority_t priority,
121  const afw_utf8_z_t * source_z,
122  const afw_utf8_t * message,
123  afw_xctx_t * xctx);
124 #endif
125 #endif
126 
127 /* inf for interface afw_log */
128 #ifdef __BASE_FILE__
129 #define _AFW_IMPLEMENTATION_SOURCE_FILE_ __BASE_FILE__
130 #else
131 #define _AFW_IMPLEMENTATION_SOURCE_FILE_ __FILE__
132 #endif
133 #ifdef AFW_IMPLEMENTATION_INF_SPECIFIER
134 AFW_IMPLEMENTATION_INF_SPECIFIER(afw_log_inf_t)
135 #else
136 static const afw_log_inf_t
137 #endif
138 #ifdef AFW_IMPLEMENTATION_INF_LABEL
139 AFW_IMPLEMENTATION_INF_LABEL = {
140 #else
141 impl_afw_log_inf = {
142 #endif
143  {
144  AFW_UTF8_LITERAL("afw_log"),
145  AFW_UTF8_LITERAL(_AFW_IMPLEMENTATION_SOURCE_FILE_),
146  AFW_UTF8_LITERAL(_AFW_IMPLEMENTATION_ID_),
147  _AFW_IMPLEMENTATION_SPECIFIC_
148  },
149  impl_afw_log_destroy,
150  impl_afw_log_set_own_mask,
152 };
153 
154 #undef _AFW_IMPLEMENTATION_ID_
155 #undef _AFW_IMPLEMENTATION_SPECIFIC_
156 #undef _AFW_IMPLEMENTATION_SOURCE_FILE_
157 
#define AFW_BEGIN_DECLARES
Interface afw_interface opaque typedefs.
#define AFW_UTF8_LITERAL(A_STRING)
String literal initializer.
Definition: afw_common.h:582
int afw_log_priority_mask_t
Definition: afw_common.h:659
afw_utf8_octet_t afw_utf8_z_t
NFC normalized UTF-8 null terminated string.
Definition: afw_common.h:523
enum afw_log_priority_e afw_log_priority_t
Log levels. See afw_log.h for more information.
impl_afw_log_write(const afw_log_t *instance, afw_log_priority_t priority, const afw_utf8_z_t *source_z, const afw_utf8_t *message, afw_xctx_t *xctx)
Definition: afw_log.c:535
Interface afw_log_inf_s struct.
Interface afw_log public struct.
NFC normalized UTF-8 string.
Definition: afw_common.h:545
Interface afw_xctx public struct.