Forward compatibility: flex
[foam-extend-3.2.git] / applications / utilities / postProcessing / dataConversion / foamToTecplot360 / tecio / tecsrc / STRLIST.h
blobb1cb38c0b5de0d72a211880bd3cde77279a9d3c2
1 /*
2 * NOTICE and LICENSE for Tecplot Input/Output Library (TecIO) - OpenFOAM
4 * Copyright (C) 1988-2009 Tecplot, Inc. All rights reserved worldwide.
6 * Tecplot hereby grants OpenCFD limited authority to distribute without
7 * alteration the source code to the Tecplot Input/Output library, known
8 * as TecIO, as part of its distribution of OpenFOAM and the
9 * OpenFOAM_to_Tecplot converter. Users of this converter are also hereby
10 * granted access to the TecIO source code, and may redistribute it for the
11 * purpose of maintaining the converter. However, no authority is granted
12 * to alter the TecIO source code in any form or manner.
14 * This limited grant of distribution does not supersede Tecplot, Inc.'s
15 * copyright in TecIO. Contact Tecplot, Inc. for further information.
17 * Tecplot, Inc.
18 * 3535 Factoria Blvd, Ste. 550
19 * Bellevue, WA 98006, USA
20 * Phone: +1 425 653 1200
21 * http://www.tecplot.com/
25 *****************************************************************
26 *****************************************************************
27 ******* ********
28 ****** Copyright (C) 1988-2008 Tecplot, Inc. *******
29 ******* ********
30 *****************************************************************
31 *****************************************************************
33 #if defined EXTERN
34 # undef EXTERN
35 #endif
36 #if defined STRLISTMODULE
37 # define EXTERN
38 #else
39 # define EXTERN extern
40 #endif
42 #if !defined ARRLIST_h
43 # error "Include ARRLIST.h before including STRLIST.h"
44 #endif
48 * For building pltview.exe under Windows, we use
49 * tecio.dll (which is linked to pltview).
50 * Since pltview.exe uses a few of the
51 * functions here, they need to be exported into
52 * the tecio.dll, thus "TECXXX.h" is included for the
53 * LIBFUNCTION & LIBCALL keywords. They are not
54 * documented with the other TECXXX() functions,
55 * however.
57 * If pltview requires other string functions
58 * in the future, they can be added to the dll
59 * by adding LIBFUNCTION & LIBCALL as in
60 * StringListDealloc(), etc. below.
62 * When building the tecplot kernal, LIBFUNCTION
63 * and LIBCALL are nop's.
66 #include "TECXXX.h"
68 EXTERN Boolean_t StringListValid(StringList_pa StringList);
69 EXTERN void StringListClear(StringList_pa StringList);
70 EXTERN void StringListRemoveStrings(StringList_pa StringList,
71 LgIndex_t StringOffset,
72 LgIndex_t Count);
73 EXTERN void StringListRemoveString(StringList_pa StringList,
74 LgIndex_t StringOffset);
75 LIBFUNCTION void LIBCALL StringListDealloc(StringList_pa *StringList);
76 EXTERN StringList_pa StringListAlloc(void);
77 EXTERN Boolean_t StringListAppendString(StringList_pa StringList,
78 const char *String);
79 LIBFUNCTION LgIndex_t LIBCALL StringListCount(StringList_pa StringList);
80 LIBFUNCTION char * LIBCALL StringListGetString(StringList_pa StringList,
81 LgIndex_t StringOffset);
83 #if defined USE_MACROS_FOR_FUNCTIONS
84 # define StringListGetStringRef StringListGetStringRef_MACRO
85 #else
86 # define StringListGetStringRef StringListGetStringRef_FUNC
87 #endif
89 #if !defined USE_MACROS_FOR_FUNCTIONS
90 EXTERN const char * StringListGetStringRef_FUNC(StringList_pa StringList,
91 LgIndex_t StringOffset);
92 #endif
93 /**
94 * To maintain the string list's integrity the result is cast to a
95 * (const char *) to minimize the risk of users passing the result
96 * to FREE_ARRAY.
98 #define StringListGetStringRef_MACRO(StringList, StringOffset) \
99 ((const char *)ArrayListGetCharPtr((ArrayList_pa)(StringList), StringOffset))
101 EXTERN Boolean_t StringListSetString(StringList_pa StringList,
102 LgIndex_t StringOffset,
103 const char *String);
104 EXTERN Boolean_t StringListInsertString(StringList_pa StringList,
105 LgIndex_t StringOffset,
106 const char *String);
107 EXTERN StringList_pa StringListCopy(StringList_pa StringList);
108 EXTERN Boolean_t StringListAppend(StringList_pa Target,
109 StringList_pa Source);
111 EXTERN char *StringListToNLString(StringList_pa StringList);
112 EXTERN StringList_pa StringListFromNLString(const char *String);
113 EXTERN char **StringListToArray(StringList_pa StringList);
114 EXTERN StringList_pa StringListFromArray(const char **StringArray,
115 LgIndex_t Count);
116 EXTERN StringList_pa StringListFromCompound(const char *String);
117 EXTERN char *StringListToCompound(StringList_pa StringList,
118 char GroupJoinCharacter,
119 const char *CharsToEscape);
120 EXTERN void StringListSort(StringList_pa StringList,
121 StringListStringComparator_pf Comparator,
122 ArbParam_t ClientData);