Transformer SDK For C  6.2.11.309924
formatter.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright CAPLIN Systems Ltd 2000-2013
4  *
5  * $Author: dominic $
6  * $DateTime: 2014/06/04 13:20:27 $
7  * $Change: 291774 $
8  * $Id: //CDev/V-6_2/rtas/modules/format/formatter.h#1 $
9  *
10  * Generic formatting module
11  */
12 #ifndef FORMATTER_H
13 #define FORMATTER_H
14 
15 #ifndef WIN32
16 #ifndef TRANSFORMER_MODULE_EXPORT
17 #define TRANSFORMER_MODULE_EXPORT
18 #endif
19 #else /* WIN32 */
20 #ifndef TRANSFORMER_MODULE_EXPORT
21 #ifdef CHECK
22 #define TRANSFORMER_MODULE_EXPORT
23 #else
24 #define TRANSFORMER_MODULE_EXPORT _declspec(dllimport)
25 #endif
26 #endif
27 #endif /* WIN32 */
28 
29 
30 
31 
43 
50  char *(*format)(formathandler_t *handler, char *input);
51  void (*delete)(formathandler_t *handler);
53 };
54 
55 typedef formathandler_t *(*format_init_t)(char **args);
56 
71 typedef struct {
72  int version;
73  int patch;
76  void (*format_add)(char *identifier, format_init_t func);
82  char *(*format_find_arg)(char **argv, char *search);
93  formathandler_t *(*format_parse)(char *formatstring);
105  char *(*format_apply)(formathandler_t *format, char *text);
116 
117 
118 TRANSFORMER_MODULE_EXPORT void formatter_add(char *ident, format_init_t func);
119 TRANSFORMER_MODULE_EXPORT char *format_find_arg(char **argv, char *search);
120 
121 
122 TRANSFORMER_MODULE_EXPORT void format_delete(formathandler_t *format);
123 TRANSFORMER_MODULE_EXPORT formathandler_t *format_parse(char *formatstring);
124 TRANSFORMER_MODULE_EXPORT char *format_apply(formathandler_t *format, char *text);
125 
126 
127 #endif
TRANSFORMER_MODULE_EXPORT formathandler_t * format_parse(char *formatstring)
Construct a chain of formatters.
Definition: formatter.c:230
int version
Definition: formatter.h:72
formathandler_t * next
Definition: formatter.h:52
Structure used to generate chains of format handlers.
Definition: formatter.h:49
int patch
Definition: formatter.h:73
TRANSFORMER_MODULE_EXPORT char * format_apply(formathandler_t *format, char *text)
Apply a format stream to an input value.
Definition: formatter.c:272
TRANSFORMER_MODULE_EXPORT char * format_find_arg(char **argv, char *search)
Find an argument in the array of arguments.
Definition: formatter.c:247
TRANSFORMER_MODULE_EXPORT void formatter_add(char *ident, format_init_t func)
Add a new formatter.
Definition: formatter.c:214
TRANSFORMER_MODULE_EXPORT void format_delete(formathandler_t *format)
Delete a format chain.
Definition: formatter.c:260
char *(* format)(formathandler_t *handler, char *input)
Definition: formatter.h:50
Interface returned to other modules which require integration with the pipeline.
Definition: formatter.h:71

Generated on Sat Aug 26 2017 12:36:31 for Transformer SDK For C