MCPcopy Create free account
hub / github.com/axmolengine/axmol / xpath_node_set_raw

Class xpath_node_set_raw

3rdparty/pugixml/pugixml.cpp:9090–9221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9088 }
9089
9090 class xpath_node_set_raw
9091 {
9092 xpath_node_set::type_t _type;
9093
9094 xpath_node* _begin;
9095 xpath_node* _end;
9096 xpath_node* _eos;
9097
9098 public:
9099 xpath_node_set_raw(): _type(xpath_node_set::type_unsorted), _begin(0), _end(0), _eos(0)
9100 {
9101 }
9102
9103 xpath_node* begin() const
9104 {
9105 return _begin;
9106 }
9107
9108 xpath_node* end() const
9109 {
9110 return _end;
9111 }
9112
9113 bool empty() const
9114 {
9115 return _begin == _end;
9116 }
9117
9118 size_t size() const
9119 {
9120 return static_cast<size_t>(_end - _begin);
9121 }
9122
9123 xpath_node first() const
9124 {
9125 return xpath_first(_begin, _end, _type);
9126 }
9127
9128 void push_back_grow(const xpath_node& node, xpath_allocator* alloc);
9129
9130 void push_back(const xpath_node& node, xpath_allocator* alloc)
9131 {
9132 if (_end != _eos)
9133 *_end++ = node;
9134 else
9135 push_back_grow(node, alloc);
9136 }
9137
9138 void append(const xpath_node* begin_, const xpath_node* end_, xpath_allocator* alloc)
9139 {
9140 if (begin_ == end_) return;
9141
9142 size_t size_ = static_cast<size_t>(_end - _begin);
9143 size_t capacity = static_cast<size_t>(_eos - _begin);
9144 size_t count = static_cast<size_t>(end_ - begin_);
9145
9146 if (size_ + count > capacity)
9147 {

Callers 1

eval_node_setMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected