MCPcopy Create free account
hub / github.com/Kitware/VTK / eval_string

Method eval_string

ThirdParty/pugixml/vtkpugixml/src/pugixml.cpp:11176–11417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

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
string_valueClass · 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

Tested by

no test coverage detected