MCPcopy Create free account
hub / github.com/assimp/assimp / eval_string

Method eval_string

contrib/pugixml/src/pugixml.cpp:11181–11422  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11179 }
11180
11181 xpath_string eval_string(const xpath_context& c, const xpath_stack& stack)
11182 {
11183 switch (_type)
11184 {
11185 case ast_string_constant:
11186 return xpath_string::from_const(_data.string);
11187
11188 case ast_func_local_name_0:
11189 {
11190 xpath_node na = c.n;
11191
11192 return xpath_string::from_const(local_name(na));
11193 }
11194
11195 case ast_func_local_name_1:
11196 {
11197 xpath_allocator_capture cr(stack.result);
11198
11199 xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first);
11200 xpath_node na = ns.first();
11201
11202 return xpath_string::from_const(local_name(na));
11203 }
11204
11205 case ast_func_name_0:
11206 {
11207 xpath_node na = c.n;
11208
11209 return xpath_string::from_const(qualified_name(na));
11210 }
11211
11212 case ast_func_name_1:
11213 {
11214 xpath_allocator_capture cr(stack.result);
11215
11216 xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first);
11217 xpath_node na = ns.first();
11218
11219 return xpath_string::from_const(qualified_name(na));
11220 }
11221
11222 case ast_func_namespace_uri_0:
11223 {
11224 xpath_node na = c.n;
11225
11226 return xpath_string::from_const(namespace_uri(na));
11227 }
11228
11229 case ast_func_namespace_uri_1:
11230 {
11231 xpath_allocator_capture cr(stack.result);
11232
11233 xpath_node_set_raw ns = _left->eval_node_set(c, stack, nodeset_eval_first);
11234 xpath_node na = ns.first();
11235
11236 return xpath_string::from_const(namespace_uri(na));
11237 }
11238

Callers 5

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

Calls 15

local_nameFunction · 0.85
qualified_nameFunction · 0.85
namespace_uriFunction · 0.85
find_substringFunction · 0.85
from_heapFunction · 0.85
xpath_stringFunction · 0.85
round_nearestFunction · 0.85
is_nanFunction · 0.85
normalize_spaceFunction · 0.85
from_heap_preallocatedFunction · 0.85
translateFunction · 0.85
translate_tableFunction · 0.85

Tested by

no test coverage detected