GEOSX
tv_data_display.h
Go to the documentation of this file.
1 /*
2  * $Header$
3  * $Locker$
4 
5  Copyright (c) 2010-2012, Rogue Wave Software, Inc.
6 
7  Permission is hereby granted, free of charge, to any person obtaining a copy
8  of the tv_data_display.h and tv_data_display.c files (the "Software"), to deal
9  in the Software without restriction, including without limitation the rights
10  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
11  of the Software, and to permit persons to whom the Software is furnished to do
12  so, subject to the following conditions:
13 
14  The above copyright notice and this permission notice shall be included in all
15  copies or substantial portions of the Software.
16 
17  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
18  INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
19  PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
20  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22  SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 
24  * Update log
25  *
26  * Feb 1 2012 NYP: Updated Copyright
27  * Sep 27 2010 ANB: reworked as part of totalview/12314
28  * Jun 17 2010 JVD: Added TV_elide_row.
29  * Sep 25 2009 SJT: Add idempotence header.
30  * Jul 1 2009 SJT: Created.
31  *
32  */
33 
38 //UNCRUSTIFY-OFF
40 
41 #ifndef TV_DATA_DISPLAY_H_INCLUDED
42 #define TV_DATA_DISPLAY_H_INCLUDED 1
43 
44 #define TV_TTF_DATA_DISPLAY_API_VERSION 1
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif
49 
50 /* TV_ttf_display_type should return one of these values */
51 enum TV_ttf_format_result
52 {
53  TV_ttf_format_ok, /* Type is known, and successfully converted */
54  TV_ttf_format_ok_elide, /* as TV_ttf_format_ok, but elide type */
55  TV_ttf_format_failed, /* Type is known, but could not convert it */
56  TV_ttf_format_raw, /* Just display it as a regular type for now */
57  TV_ttf_format_never /* Don't know about this type, and please don't ask again */
58 };
59 typedef enum TV_ttf_format_result TV_ttf_format_result;
60 
61 /* TV_ttf_add_row returns one of these values */
62 enum TV_ttf_error_codes
63 {
64  TV_ttf_ec_ok = 0, /* operation succeeded */
65  TV_ttf_ec_not_active,
66  TV_ttf_ec_invalid_characters,
67  TV_ttf_ec_buffer_exhausted
68 };
69 typedef enum TV_ttf_error_codes TV_ttf_error_codes;
70 
71 #define TV_ttf_type_ascii_string "$string"
72 #define TV_ttf_type_int "$int"
73 #if 0
74 #define TV_elide_row "" /* field_name to use when row elision is desired */
75 #endif
76 
77 /* returns logical true (non-zero) if the TV_ttf_format_result fr represents
78  a format result that indicates success
79  */
80 extern int TV_ttf_is_format_result_ok ( TV_ttf_format_result fr );
81 
82 /*
83  TV_ttf_ec_ok: Success
84  TV_ttf_ec_not_active: Called with no active callback to
85  TV_ttf_display_type
86  TV_ttf_ec_invalid_characters: field_name or type_name has illegal characters
87  TV_ttf_ec_buffer_exhausted: No more room left for display data
88  */
89 extern int TV_ttf_add_row( const char * field_name,
90  const char * type_name,
91  const void * value );
92 
93 #ifdef __cplusplus
94 }
95 #endif
96 
97 #endif
98 
100 //UNCRUSTIFY-ON