Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
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 607 of file regex.h.

Member Typedef Documentation

◆ Ch

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

Definition at line 610 of file regex.h.

◆ Encoding

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

Definition at line 609 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 612 of file regex.h.

612 :
613 regex_(regex), allocator_(allocator), ownAllocator_(0),
614 state0_(allocator, 0), state1_(allocator, 0), stateSet_()
615 {
616 RAPIDJSON_ASSERT(regex_.IsValid());
617 if (!allocator_)
618 ownAllocator_ = allocator_ = RAPIDJSON_NEW(Allocator)();
619 stateSet_ = static_cast<unsigned*>(allocator_->Malloc(GetStateSetSize()));
620 state0_.template Reserve<SizeType>(regex_.stateCount_);
621 state1_.template Reserve<SizeType>(regex_.stateCount_);
622 }
Concept for allocating, resizing and freeing memory block.
#define RAPIDJSON_ASSERT(x)
Assertion.
Definition rapidjson.h:406
#define RAPIDJSON_NEW(TypeName)
! customization point for global new
Definition rapidjson.h:627

◆ ~GenericRegexSearch()

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

Definition at line 624 of file regex.h.

624 {
625 Allocator::Free(stateSet_);
626 RAPIDJSON_DELETE(ownAllocator_);
627 }
#define RAPIDJSON_DELETE(x)
! customization point for global delete
Definition rapidjson.h:631

Member Function Documentation

◆ Match() [1/2]

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

Definition at line 634 of file regex.h.

634 {
636 return Match(is);
637 }
bool Match(InputStream &is)
Definition regex.h:630
Read-only string stream.
Definition stream.h:154
char * s
Here is the call graph for this function:

◆ Match() [2/2]

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

Definition at line 630 of file regex.h.

630 {
631 return SearchWithAnchoring(is, true, true);
632 }
Here is the caller graph for this function:

◆ Search() [1/2]

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

Definition at line 644 of file regex.h.

644 {
646 return Search(is);
647 }
bool Search(InputStream &is)
Definition regex.h:640
Here is the call graph for this function:

◆ Search() [2/2]

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

Definition at line 640 of file regex.h.

640 {
641 return SearchWithAnchoring(is, regex_.anchorBegin_, regex_.anchorEnd_);
642 }
Here is the caller graph for this function:

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