MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenImageIO / eval_string

Method eval_string

src/include/pugixml.cpp:8340–8556  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8338 }
8339
8340 xpath_string eval_string(const xpath_context& c, const xpath_stack& stack)
8341 {
8342 switch (_type)
8343 {
8344 case ast_string_constant:
8345 return xpath_string_const(_data.string);
8346
8347 case ast_func_local_name_0:
8348 {
8349 xpath_node na = c.n;
8350
8351 return xpath_string_const(local_name(na));
8352 }
8353
8354 case ast_func_local_name_1:
8355 {
8356 xpath_allocator_capture cr(stack.result);
8357
8358 xpath_node_set_raw ns = _left->eval_node_set(c, stack);
8359 xpath_node na = ns.first();
8360
8361 return xpath_string_const(local_name(na));
8362 }
8363
8364 case ast_func_name_0:
8365 {
8366 xpath_node na = c.n;
8367
8368 return xpath_string_const(qualified_name(na));
8369 }
8370
8371 case ast_func_name_1:
8372 {
8373 xpath_allocator_capture cr(stack.result);
8374
8375 xpath_node_set_raw ns = _left->eval_node_set(c, stack);
8376 xpath_node na = ns.first();
8377
8378 return xpath_string_const(qualified_name(na));
8379 }
8380
8381 case ast_func_namespace_uri_0:
8382 {
8383 xpath_node na = c.n;
8384
8385 return xpath_string_const(namespace_uri(na));
8386 }
8387
8388 case ast_func_namespace_uri_1:
8389 {
8390 xpath_allocator_capture cr(stack.result);
8391
8392 xpath_node_set_raw ns = _left->eval_node_set(c, stack);
8393 xpath_node na = ns.first();
8394
8395 return xpath_string_const(namespace_uri(na));
8396 }
8397

Callers 5

compare_eqMethod · 0.80
eval_booleanMethod · 0.80
eval_numberMethod · 0.80
eval_string_concatMethod · 0.80

Calls 15

local_nameFunction · 0.85
qualified_nameFunction · 0.85
namespace_uriFunction · 0.85
find_substringFunction · 0.85
xpath_stringFunction · 0.85
round_nearestFunction · 0.85
is_nanFunction · 0.85
normalize_spaceFunction · 0.85
eval_node_setMethod · 0.80
eval_numberMethod · 0.80
get_stringMethod · 0.80
translateFunction · 0.70

Tested by

no test coverage detected