HDK
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
UT_VarEncode.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
* See: https://tools.ietf.org/html/rfc3492
7
*
8
*/
9
10
#ifndef __UT_VarEncode__
11
#define __UT_VarEncode__
12
13
#include "
UT_API.h
"
14
#include <
SYS/SYS_Types.h
>
15
16
class
UT_StringHolder
;
17
18
class
UT_API
UT_VarEncode
19
{
20
public
:
21
/// @{ Returns an encoded variable name, if @c var contains any characters
22
/// illegal in a C-style variable name. Note, the encoding is prefixed.
23
/// If @c var contains only valid C-variable characters, returns it unencoded.
24
static
UT_StringHolder
encodeVar(
const
UT_StringHolder
&var);
25
static
UT_StringHolder
decodeVar(
const
UT_StringHolder
&var);
26
/// @}
27
28
/// @{ Returns an encoded attribute name, if @c var contains any characters
29
/// illegal in a geometry attribute name. Note, the encoding is prefixed.
30
/// If @c var contains only valid C-variable characters, returns it unencoded.
31
static
UT_StringHolder
encodeAttrib(
const
UT_StringHolder
&attr);
32
static
UT_StringHolder
decodeAttrib(
const
UT_StringHolder
&attr);
33
/// @}
34
35
/// @{ Returns an encoded parameter name, if @c var contains any characters
36
/// illegal in a node parameter name. Note, the encoding is prefixed.
37
/// If @c var contains only valid C-variable characters, returns it unencoded.
38
static
UT_StringHolder
encodeParm(
const
UT_StringHolder
&parm);
39
static
UT_StringHolder
decodeParm(
const
UT_StringHolder
&parm);
40
/// @}
41
42
/// @{ Does a simple test on the string to look for the encoding prefix.
43
/// Returns true if found, indicating that the string is already encoded.
44
/// This lets us avoid double-encoding the string.
45
static
bool
isEncoded(
const
UT_StringHolder
&str);
46
/// @}
47
48
private
:
49
static
UT_StringHolder
encode(
const
UT_StringHolder
&
value
,
50
const
char
*safechars);
51
static
UT_StringHolder
decode(
const
UT_StringHolder
&value,
52
const
char
*safechars);
53
};
54
55
#endif
UT_API.h
UT_API
#define UT_API
Definition:
UT_API.h:14
UT_StringHolder
Definition:
UT_StringHolder.h:999
SYS_Types.h
UT_VarEncode
Definition:
UT_VarEncode.h:18
value
Definition:
core.h:1131
UT
UT_VarEncode.h
Generated on Sun Nov 17 2024 03:03:57 for HDK by
1.8.6