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
textParserUtils.h
Go to the documentation of this file.
1
//
2
// Copyright 2025 Pixar
3
//
4
// Licensed under the terms set forth in the LICENSE.txt file available at
5
// https://openusd.org/license.
6
//
7
8
#ifndef PXR_USD_SDF_TEXT_PARSER_UTILS_H
9
#define PXR_USD_SDF_TEXT_PARSER_UTILS_H
10
11
#include "
pxr/base/vt/value.h
"
12
#include "
pxr/usd/sdf/api.h
"
13
14
PXR_NAMESPACE_OPEN_SCOPE
15
16
class
SdfValueTypeName
;
17
18
/// Attempt to parse a VtValue from a string representing a value
19
/// given the expected sdf type. The parse follows the expectations of
20
/// the .usda file format. On success, returns a corresponding VtValue.
21
/// On failure, returns an empty VtValue and populates TfError(s).
22
SDF_API
23
VtValue
Sdf_ParseValueFromString
(
const
std::string& input,
24
const
SdfValueTypeName
& expectedSdfType);
25
26
/// Add quotes around given string, escaping inner quotes and
27
/// unprintable characters as necessary. If the string contains newlines
28
/// it's quoted with triple quotes and the newlines are not escaped.
29
SDF_API
30
std::string
Sdf_QuoteString
(
const
std::string& input);
31
32
/// Add @'s around a given path to produce a string representation of
33
/// an asset path. If the path contains @, @@@ will be added around the
34
/// path. If the path contains @@@, the contained @@@ will be escaped.
35
SDF_API
36
std::string
Sdf_QuoteAssetPath
(
const
std::string&
path
);
37
38
PXR_NAMESPACE_CLOSE_SCOPE
39
40
#endif
Sdf_QuoteString
SDF_API std::string Sdf_QuoteString(const std::string &input)
PXR_NAMESPACE_OPEN_SCOPE
#define PXR_NAMESPACE_OPEN_SCOPE
Definition:
pxr.h:73
path
GLsizei const GLchar *const * path
Definition:
glcorearb.h:3341
value.h
SdfValueTypeName
Definition:
valueTypeName.h:71
Sdf_ParseValueFromString
SDF_API VtValue Sdf_ParseValueFromString(const std::string &input, const SdfValueTypeName &expectedSdfType)
api.h
SDF_API
#define SDF_API
Definition:
api.h:23
PXR_NAMESPACE_CLOSE_SCOPE
#define PXR_NAMESPACE_CLOSE_SCOPE
Definition:
pxr.h:74
Sdf_QuoteAssetPath
SDF_API std::string Sdf_QuoteAssetPath(const std::string &path)
VtValue
Definition:
value.h:89
pxr
usd
sdf
textParserUtils.h
Generated on Sun Aug 23 2026 02:17:29 for HDK by
1.8.6