Electroneum
internal::GenericRegexSearch< RegexType, Allocator > Class Template Reference

#include <regex.h>

Public Types

typedef RegexType::EncodingType Encoding
 
typedef Encoding::Ch Ch
 

Public Member Functions

 GenericRegexSearch (const RegexType &regex, Allocator *allocator=0)
 
 ~GenericRegexSearch ()
 
template<typename InputStream >
bool Match (InputStream &is)
 
bool Match (const Ch *s)
 
template<typename InputStream >
bool Search (InputStream &is)
 
bool Search (const Ch *s)
 

Detailed Description

template<typename RegexType, typename Allocator = CrtAllocator>
class internal::GenericRegexSearch< RegexType, Allocator >

Definition at line 79 of file regex.h.

Member Typedef Documentation

◆ Ch

template<typename RegexType , typename Allocator = CrtAllocator>
typedef Encoding::Ch internal::GenericRegexSearch< RegexType, Allocator >::Ch

Definition at line 602 of file regex.h.

◆ Encoding

template<typename RegexType , typename Allocator = CrtAllocator>
typedef RegexType::EncodingType internal::GenericRegexSearch< RegexType, Allocator >::Encoding

Definition at line 601 of file regex.h.

Constructor & Destructor Documentation

◆ GenericRegexSearch()

template<typename RegexType , typename Allocator = CrtAllocator>
internal::GenericRegexSearch< RegexType, Allocator >::GenericRegexSearch ( const RegexType &  regex,
Allocator *  allocator = 0 
)
inline

Definition at line 604 of file regex.h.

604  :
605  regex_(regex), allocator_(allocator), ownAllocator_(0),
606  state0_(allocator, 0), state1_(allocator, 0), stateSet_()
607  {
608  RAPIDJSON_ASSERT(regex_.IsValid());
609  if (!allocator_)
610  ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)();
611  stateSet_ = static_cast<unsigned*>(allocator_->Malloc(GetStateSetSize()));
612  state0_.template Reserve<SizeType>(regex_.stateCount_);
613  state1_.template Reserve<SizeType>(regex_.stateCount_);
614  }
#define RAPIDJSON_NEW(TypeName)
! customization point for global new
Definition: rapidjson.h:603
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition: rapidjson.h:411

◆ ~GenericRegexSearch()

template<typename RegexType , typename Allocator = CrtAllocator>
internal::GenericRegexSearch< RegexType, Allocator >::~GenericRegexSearch ( )
inline

Definition at line 616 of file regex.h.

616  {
617  Allocator::Free(stateSet_);
618  RAPIDJSON_DELETE(ownAllocator_);
619  }
#define RAPIDJSON_DELETE(x)
! customization point for global delete
Definition: rapidjson.h:607

Member Function Documentation

◆ Match() [1/2]

template<typename RegexType , typename Allocator = CrtAllocator>
template<typename InputStream >
bool internal::GenericRegexSearch< RegexType, Allocator >::Match ( InputStream &  is)
inline

Definition at line 622 of file regex.h.

622  {
623  return SearchWithAnchoring(is, true, true);
624  }
Here is the caller graph for this function:

◆ Match() [2/2]

template<typename RegexType , typename Allocator = CrtAllocator>
bool internal::GenericRegexSearch< RegexType, Allocator >::Match ( const Ch s)
inline

Definition at line 626 of file regex.h.

626  {
628  return Match(is);
629  }
Read-only string stream.
Definition: fwd.h:47
bool Match(InputStream &is)
Definition: regex.h:622
Here is the call graph for this function:

◆ Search() [1/2]

template<typename RegexType , typename Allocator = CrtAllocator>
template<typename InputStream >
bool internal::GenericRegexSearch< RegexType, Allocator >::Search ( InputStream &  is)
inline

Definition at line 632 of file regex.h.

632  {
633  return SearchWithAnchoring(is, regex_.anchorBegin_, regex_.anchorEnd_);
634  }
Here is the caller graph for this function:

◆ Search() [2/2]

template<typename RegexType , typename Allocator = CrtAllocator>
bool internal::GenericRegexSearch< RegexType, Allocator >::Search ( const Ch s)
inline

Definition at line 636 of file regex.h.

636  {
638  return Search(is);
639  }
bool Search(InputStream &is)
Definition: regex.h:632
Read-only string stream.
Definition: fwd.h:47
Here is the call graph for this function:

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