Autonomy Software C++ 24.5.1
Welcome to the Autonomy Software repository of the Mars Rover Design Team (MRDT) at Missouri University of Science and Technology (Missouri S&T)! API reference contains the source code and other resources for the development of the autonomy software for our Mars rover. The Autonomy Software project aims to compete in the University Rover Challenge (URC) by demonstrating advanced autonomous capabilities and robust navigation algorithms.
Loading...
Searching...
No Matches
duckdb_re2::NamedCapturesWalker Class Reference
Inheritance diagram for duckdb_re2::NamedCapturesWalker:
Collaboration diagram for duckdb_re2::NamedCapturesWalker:

Public Member Functions

std::map< std::string, int > * TakeMap ()
virtual Ignored PreVisit (Regexp *re, Ignored ignored, bool *stop)
virtual Ignored ShortVisit (Regexp *re, Ignored ignored)
Public Member Functions inherited from duckdb_re2::Regexp::Walker< Ignored >
virtual Ignored PostVisit (Regexp *re, Ignored parent_arg, Ignored pre_arg, Ignored *child_args, int nchild_args)
virtual Ignored Copy (Ignored arg)
Ignored Walk (Regexp *re, Ignored top_arg)
Ignored WalkExponential (Regexp *re, Ignored top_arg, int max_visits)
void Reset ()
bool stopped_early ()

Private Member Functions

 NamedCapturesWalker (const NamedCapturesWalker &)=delete
NamedCapturesWalker & operator= (const NamedCapturesWalker &)=delete

Private Attributes

std::map< std::string, int > * map_

Constructor & Destructor Documentation

◆ NamedCapturesWalker()

duckdb_re2::NamedCapturesWalker::NamedCapturesWalker ( )
inline
473523: map_(NULL) {}

◆ ~NamedCapturesWalker()

duckdb_re2::NamedCapturesWalker::~NamedCapturesWalker ( )
inline
473524{ delete map_; }

Member Function Documentation

◆ TakeMap()

std::map< std::string, int > * duckdb_re2::NamedCapturesWalker::TakeMap ( )
inline
473526 {
473527 std::map<std::string, int>* m = map_;
473528 map_ = NULL;
473529 return m;
473530 }

◆ PreVisit()

virtual Ignored duckdb_re2::NamedCapturesWalker::PreVisit ( Regexp * re,
Ignored ignored,
bool * stop )
inlinevirtual

Reimplemented from duckdb_re2::Regexp::Walker< Ignored >.

473532 {
473533 if (re->op() == kRegexpCapture && re->name() != NULL) {
473534 // Allocate map once we find a name.
473535 if (map_ == NULL)
473536 map_ = new std::map<std::string, int>;
473537
473538 // Record first occurrence of each name.
473539 // (The rule is that if you have the same name
473540 // multiple times, only the leftmost one counts.)
473541 map_->insert({*re->name(), re->cap()});
473542 }
473543 return ignored;
473544 }

◆ ShortVisit()

virtual Ignored duckdb_re2::NamedCapturesWalker::ShortVisit ( Regexp * re,
Ignored ignored )
inlinevirtual

Implements duckdb_re2::Regexp::Walker< Ignored >.

473546 {
473547 // Should never be called: we use Walk(), not WalkExponential().
473548#ifndef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
473549 LOG(DFATAL) << "NamedCapturesWalker::ShortVisit called";
473550#endif
473551 return ignored;
473552 }

The documentation for this class was generated from the following file: