#include <networkscratch.h>
template<typename T>
class tesseract::NetworkScratch::Stack< T >
Definition at line 207 of file networkscratch.h.
◆ Stack()
◆ Borrow()
Definition at line 214 of file networkscratch.h.
216 if (stack_top_ == stack_.size()) {
217 stack_.push_back(
new T);
220 flags_[stack_top_] =
true;
221 return stack_[stack_top_++];
◆ Return()
Definition at line 228 of file networkscratch.h.
231 int index = stack_top_ - 1;
232 while (index >= 0 && stack_[index] != item) --index;
233 if (index >= 0) flags_[index] =
false;
234 while (stack_top_ > 0 && !flags_[stack_top_ - 1]) --stack_top_;
The documentation for this class was generated from the following file: