Blender V5.3
blender::bke::path_templates Namespace Reference

Classes

class  VariableMap
struct  ExpressionInfo
struct  Error

Enumerations

enum class  ErrorType { UNESCAPED_CURLY_BRACE , VARIABLE_SYNTAX , FORMAT_SPECIFIER , UNKNOWN_VARIABLE }

Functions

bool operator== (const Error &left, const Error &right)
std::optional< ExpressionInfo > next_template_variable_expression (StringRef text, size_t starting_offset)

Enumeration Type Documentation

◆ ErrorType

Enumerator
UNESCAPED_CURLY_BRACE 
VARIABLE_SYNTAX 
FORMAT_SPECIFIER 
UNKNOWN_VARIABLE 

Definition at line 270 of file BKE_path_templates.hh.

Function Documentation

◆ next_template_variable_expression()

std::optional< ExpressionInfo > blender::bke::path_templates::next_template_variable_expression ( StringRef text,
size_t starting_offset )

Fetches the next template variable expression in the string at or after the given starting byte offset.

Returns std::nullopt when it encounters invalid expression syntax or when there are no variable expressions in the string after the given offset.

Definition at line 817 of file path_templates.cc.

References blender::bke::path_templates::ExpressionInfo::byte_range, next_template_variable_expression(), blender::next_token(), and blender::bke::path_templates::ExpressionInfo::variable_name.

Referenced by next_template_variable_expression(), and blender::ui::text_shorten_next_template_var().

◆ operator==()