TPRegexp Class Reference

#include <TPRegexp.h>

Inheritance diagram for TPRegexp:

TPMERegexp TPMERegexp List of all members.

Public Member Functions

 TPRegexp ()
 TPRegexp (const TString &pat)
 TPRegexp (const TPRegexp &p)
virtual ~TPRegexp ()
Int_t Match (const TString &s, const TString &mods="", Int_t start=0, Int_t nMaxMatch=10, TArrayI *pos=0)
TObjArrayMatchS (const TString &s, const TString &mods="", Int_t start=0, Int_t nMaxMatch=10)
Bool_t MatchB (const TString &s, const TString &mods="", Int_t start=0, Int_t nMaxMatch=10)
Int_t Substitute (TString &s, const TString &replace, const TString &mods="", Int_t start=0, Int_t nMatchMax=10)
TString GetPattern () const
TString GetModifiers () const
TPRegexpoperator= (const TPRegexp &p)
 TPRegexp ()
 TPRegexp (const TString &pat)
 TPRegexp (const TPRegexp &p)
virtual ~TPRegexp ()
Int_t Match (const TString &s, const TString &mods="", Int_t start=0, Int_t nMaxMatch=10, TArrayI *pos=0)
TObjArrayMatchS (const TString &s, const TString &mods="", Int_t start=0, Int_t nMaxMatch=10)
Bool_t MatchB (const TString &s, const TString &mods="", Int_t start=0, Int_t nMaxMatch=10)
Int_t Substitute (TString &s, const TString &replace, const TString &mods="", Int_t start=0, Int_t nMatchMax=10)
TString GetPattern () const
TString GetModifiers () const
TPRegexpoperator= (const TPRegexp &p)

Protected Types

enum  
enum  

Protected Member Functions

void Compile ()
void Optimize ()
UInt_t ParseMods (const TString &mods) const
Int_t ReplaceSubs (const TString &s, TString &final, const TString &replacePattern, Int_t *ovec, Int_t nmatch) const
Int_t MatchInternal (const TString &s, Int_t start, Int_t nMaxMatch, TArrayI *pos=0)
Int_t SubstituteInternal (TString &s, const TString &replace, Int_t start, Int_t nMaxMatch0, Bool_t doDollarSubst)
void Compile ()
void Optimize ()
UInt_t ParseMods (const TString &mods) const
Int_t ReplaceSubs (const TString &s, TString &final, const TString &replacePattern, Int_t *ovec, Int_t nmatch) const
Int_t MatchInternal (const TString &s, Int_t start, Int_t nMaxMatch, TArrayI *pos=0)
Int_t SubstituteInternal (TString &s, const TString &replace, Int_t start, Int_t nMaxMatch0, Bool_t doDollarSubst)

Protected Attributes

TString fPattern
PCREPriv_tfPriv
UInt_t fPCREOpts
PCREPriv_tfPriv

Detailed Description

Definition at line 42 of file TPRegexp.h.


Member Enumeration Documentation

anonymous enum [protected]

Definition at line 45 of file TPRegexp.h.

anonymous enum [protected]

Definition at line 45 of file TPRegexp.h.


Constructor & Destructor Documentation

TPRegexp::TPRegexp (  ) 

TPRegexp::TPRegexp ( const TString pat  ) 

Definition at line 56 of file TPRegexp.cxx.

References fPattern, fPCREOpts, and fPriv.

TPRegexp::TPRegexp ( const TPRegexp p  ) 

Definition at line 66 of file TPRegexp.cxx.

References fPattern, fPCREOpts, fPriv, and p.

TPRegexp::~TPRegexp (  )  [virtual]

Definition at line 76 of file TPRegexp.cxx.

References PCREPriv_t::fPCRE, PCREPriv_t::fPCREExtra, fPriv, and pcre_free.

TPRegexp::TPRegexp (  ) 

TPRegexp::TPRegexp ( const TString pat  ) 

TPRegexp::TPRegexp ( const TPRegexp p  ) 

virtual TPRegexp::~TPRegexp (  )  [virtual]


Member Function Documentation

void TPRegexp::Compile (  )  [protected]

Definition at line 194 of file TPRegexp.cxx.

References TString::Data(), Error, fPattern, PCREPriv_t::fPCRE, PCREPriv_t::fPCREExtra, fPCREOpts, fPriv, Info, kPCRE_DEBUG_MSGS, kPCRE_INTMASK, kPCRE_OPTIMIZE, Optimize(), pcre_compile(), and pcre_free.

Referenced by Match(), TPMERegexp::Reset(), Substitute(), and TPMERegexp::TPMERegexp().

void TPRegexp::Optimize (  )  [protected]

Definition at line 219 of file TPRegexp.cxx.

References TString::Data(), Error, fPattern, PCREPriv_t::fPCRE, PCREPriv_t::fPCREExtra, fPCREOpts, fPriv, Info, kPCRE_DEBUG_MSGS, pcre_free, and pcre_study().

Referenced by Compile().

UInt_t TPRegexp::ParseMods ( const TString mods  )  const [protected]

Definition at line 106 of file TPRegexp.cxx.

References Error, fPCREOpts, kPCRE_DEBUG_MSGS, kPCRE_GLOBAL, kPCRE_OPTIMIZE, TString::Length(), m, opts, PCRE_CASELESS, PCRE_DOTALL, PCRE_EXTENDED, and PCRE_MULTILINE.

Referenced by Match(), TPMERegexp::Reset(), Substitute(), and TPMERegexp::TPMERegexp().

Int_t TPRegexp::ReplaceSubs ( const TString s,
TString final,
const TString replacePattern,
Int_t ovec,
Int_t  nmatch 
) const [protected]

Definition at line 240 of file TPRegexp.cxx.

References TString::Data(), Error, fPCREOpts, Info, kPCRE_DEBUG_MSGS, p, and s.

Referenced by SubstituteInternal().

Int_t TPRegexp::MatchInternal ( const TString s,
Int_t  start,
Int_t  nMaxMatch,
TArrayI pos = 0 
) [protected]

Definition at line 296 of file TPRegexp.cxx.

References Error, PCREPriv_t::fPCRE, PCREPriv_t::fPCREExtra, fPriv, PCRE_ERROR_NOMATCH, pcre_exec(), s, and TArrayI::Set().

Referenced by TPMERegexp::Match(), and Match().

Int_t TPRegexp::SubstituteInternal ( TString s,
const TString replace,
Int_t  start,
Int_t  nMaxMatch0,
Bool_t  doDollarSubst 
) [protected]

Definition at line 383 of file TPRegexp.cxx.

References Error, PCREPriv_t::fPCRE, PCREPriv_t::fPCREExtra, fPCREOpts, fPriv, kPCRE_GLOBAL, kTRUE, PCRE_ERROR_NOMATCH, pcre_exec(), ReplaceSubs(), and s.

Referenced by TPMERegexp::Substitute(), and Substitute().

Int_t TPRegexp::Match ( const TString s,
const TString mods = "",
Int_t  start = 0,
Int_t  nMaxMatch = 10,
TArrayI pos = 0 
)

Definition at line 323 of file TPRegexp.cxx.

References Compile(), PCREPriv_t::fPCRE, fPCREOpts, fPriv, MatchInternal(), opts, ParseMods(), and s.

Referenced by MatchB(), MatchS(), TStringToken::NextToken(), and TDataSetManager::ParseUri().

TObjArray * TPRegexp::MatchS ( const TString s,
const TString mods = "",
Int_t  start = 0,
Int_t  nMaxMatch = 10 
)

Definition at line 345 of file TPRegexp.cxx.

References TObjArray::Add(), i, Match(), s, and TCollection::SetOwner().

Bool_t TPRegexp::MatchB ( const TString s,
const TString mods = "",
Int_t  start = 0,
Int_t  nMaxMatch = 10 
) [inline]

Definition at line 80 of file TPRegexp.h.

References Match(), s, and start.

Int_t TPRegexp::Substitute ( TString s,
const TString replace,
const TString mods = "",
Int_t  start = 0,
Int_t  nMatchMax = 10 
)

Definition at line 450 of file TPRegexp.cxx.

References Compile(), PCREPriv_t::fPCRE, fPCREOpts, fPriv, kTRUE, opts, ParseMods(), s, and SubstituteInternal().

Referenced by THtml::TFileDefinition::NormalizePath().

TString TPRegexp::GetPattern (  )  const [inline]

Definition at line 87 of file TPRegexp.h.

References fPattern.

TString TPRegexp::GetModifiers (  )  const

Definition at line 175 of file TPRegexp.cxx.

References fPCREOpts, kPCRE_DEBUG_MSGS, kPCRE_GLOBAL, kPCRE_OPTIMIZE, PCRE_CASELESS, PCRE_DOTALL, PCRE_EXTENDED, and PCRE_MULTILINE.

Referenced by TPMERegexp::Print().

TPRegexp & TPRegexp::operator= ( const TPRegexp p  ) 

Definition at line 88 of file TPRegexp.cxx.

References fPattern, PCREPriv_t::fPCRE, PCREPriv_t::fPCREExtra, fPCREOpts, fPriv, p, and pcre_free.

void TPRegexp::Compile (  )  [protected]

void TPRegexp::Optimize (  )  [protected]

UInt_t TPRegexp::ParseMods ( const TString mods  )  const [protected]

Int_t TPRegexp::ReplaceSubs ( const TString s,
TString final,
const TString replacePattern,
Int_t ovec,
Int_t  nmatch 
) const [protected]

Int_t TPRegexp::MatchInternal ( const TString s,
Int_t  start,
Int_t  nMaxMatch,
TArrayI pos = 0 
) [protected]

Int_t TPRegexp::SubstituteInternal ( TString s,
const TString replace,
Int_t  start,
Int_t  nMaxMatch0,
Bool_t  doDollarSubst 
) [protected]

Int_t TPRegexp::Match ( const TString s,
const TString mods = "",
Int_t  start = 0,
Int_t  nMaxMatch = 10,
TArrayI pos = 0 
)

TObjArray* TPRegexp::MatchS ( const TString s,
const TString mods = "",
Int_t  start = 0,
Int_t  nMaxMatch = 10 
)

Bool_t TPRegexp::MatchB ( const TString s,
const TString mods = "",
Int_t  start = 0,
Int_t  nMaxMatch = 10 
) [inline]

Definition at line 80 of file TPRegexp.h.

References Match(), s, and start.

Int_t TPRegexp::Substitute ( TString s,
const TString replace,
const TString mods = "",
Int_t  start = 0,
Int_t  nMatchMax = 10 
)

TString TPRegexp::GetPattern (  )  const [inline]

Definition at line 87 of file TPRegexp.h.

References fPattern.

TString TPRegexp::GetModifiers (  )  const

TPRegexp& TPRegexp::operator= ( const TPRegexp p  ) 


Member Data Documentation

TString TPRegexp::fPattern [protected]

Definition at line 52 of file TPRegexp.h.

Referenced by Compile(), GetPattern(), operator=(), Optimize(), TPMERegexp::Print(), TPMERegexp::Reset(), and TPRegexp().

PCREPriv_t* TPRegexp::fPriv [protected]

Definition at line 53 of file TPRegexp.h.

Referenced by Compile(), Match(), MatchInternal(), operator=(), Optimize(), Substitute(), SubstituteInternal(), TPRegexp(), and ~TPRegexp().

UInt_t TPRegexp::fPCREOpts [protected]

Definition at line 54 of file TPRegexp.h.

Referenced by Compile(), GetModifiers(), TPMERegexp::Match(), Match(), operator=(), Optimize(), ParseMods(), ReplaceSubs(), TPMERegexp::Reset(), Substitute(), SubstituteInternal(), TPMERegexp::TPMERegexp(), and TPRegexp().

PCREPriv_t* TPRegexp::fPriv [protected]

Definition at line 53 of file TPRegexp.h.


The documentation for this class was generated from the following files:
Generated on Tue Jul 5 16:44:59 2011 for ROOT_528-00b_version by  doxygen 1.5.1