#include <networkscratch.h>
template<typename T>
class tesseract::NetworkScratch::Stack< T >
Definition at line 219 of file networkscratch.h.
◆ Stack()
◆ ~Stack()
◆ Borrow()
Definition at line 231 of file networkscratch.h.
232 std::lock_guard<std::mutex> lock(mutex_);
233 if (stack_top_ == stack_.size()) {
234 stack_.push_back(
new T);
235 flags_.push_back(
false);
237 flags_[stack_top_] =
true;
238 return stack_[stack_top_++];
◆ Return()
Definition at line 245 of file networkscratch.h.
246 std::lock_guard<std::mutex> lock(mutex_);
248 int index = stack_top_;
249 while (--index >= 0 && stack_[index] != item) {
252 flags_[index] =
false;
254 while (stack_top_ > 0 && !flags_[stack_top_ - 1]) {
The documentation for this class was generated from the following file: