HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CH_ExprLanguage.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS:
7  * This file contains enums and helper functions related to expression
8  * languages and meanings of strings in parameters.
9  */
10 
11 #ifndef __CH_ExprLanguage_h__
12 #define __CH_ExprLanguage_h__
13 
14 #include "CH_API.h"
15 
16 // These enum values are the languages we support in expressions.
18 {
21 };
22 
23 
24 // These enum values are the languages we support in chunks of script.
26 {
29 
31 };
32 
33 
34 // These enum values are used when setting string values in parms.
36 {
37  // The following interpretation applies for CH_STRING_LITERAL:
38  // Parameter Type String Contents Intepretation
39  // -------------- --------------- -------------
40  // string anything literal
41  // ordinal anything looking like a menu token literal
42  // ordinal integer literal
43  // ordinal anything else hscript expression
44  // float float or integer literal
45  // float anything else hscript expression
47 
48  // An hscript expression is always made into an expression and set to use
49  // that language.
51 
52  // A python expression is always made into an expression and set
53  // to use that language.
55 
56  // This option will always set it to an expression, but it will use
57  // the default language (either old-style expressions or python).
59 };
60 
61 
62 // These functions return a string literal corresponding to the language.
63 CH_API const char *CHexprLanguageAsString(CH_ExprLanguage language);
65 
66 // These functions return the language enum value corresponding to the string.
67 // True is returned if the conversion succeeded.
68 CH_API bool CHstringToExprLanguage(const char *str, CH_ExprLanguage &language);
70  const char *str, CH_ScriptLanguage &language);
71 
72 // This function returns a string literal of the label for a language.
74 
75 
76 // This function returns the unique character corresponding to the language.
78 
79 // This function returns the language corresponding to the unique character
80 // by setting "language". True is returned if the conversion succeeded.
81 CH_API bool CHcharToExprLanguage(char char_value, CH_ExprLanguage &language);
82 
83 
84 // This function converts from an expression language to a meaning that says
85 // the string is definitely an expression in that langauge.
87 
88 // This function converts from a string meaning that says it's definitely
89 // an expressin in a some language to that language.
91 
92 
93 // This function returns a string literal corresponding to the meaning.
94 CH_API const char *CHmeaningToString(CH_StringMeaning meaning);
95 
96 // This function returns the meaning corresponding to the string. True is
97 // returned if the conversion succeeded.
98 CH_API bool CHstringToMeaning(const char *meaning_str,
99  CH_StringMeaning &meaning);
100 
101 #endif
CH_API char CHexprLanguageAsChar(CH_ExprLanguage language)
CH_API CH_StringMeaning CHexprLanguageToStringMeaning(CH_ExprLanguage language)
CH_API const char * CHmeaningToString(CH_StringMeaning meaning)
CH_ExprLanguage
CH_StringMeaning
CH_API bool CHcharToExprLanguage(char char_value, CH_ExprLanguage &language)
CH_API const char * CHscriptLanguageAsLabel(CH_ScriptLanguage language)
CH_API const char * CHscriptLanguageAsString(CH_ScriptLanguage language)
CH_API bool CHstringToMeaning(const char *meaning_str, CH_StringMeaning &meaning)
CH_API bool CHstringToScriptLanguage(const char *str, CH_ScriptLanguage &language)
CH_API CH_ExprLanguage CHstringMeaningToExprLanguage(CH_StringMeaning meaning)
#define CH_API
Definition: CH_API.h:10
CH_API bool CHstringToExprLanguage(const char *str, CH_ExprLanguage &language)
CH_API const char * CHexprLanguageAsString(CH_ExprLanguage language)
CH_ScriptLanguage