Classes | Public Member Functions | Private Member Functions | Private Attributes

regexp Class Reference

#include "regexp.h"

Collaboration diagram for regexp:
Collaboration graph
[legend]

List of all members.

Classes

class  match_data
class  match_element
struct  opts

Public Member Functions

 regexp (const std::string &pat="", const regexp::opts &opt=regexp::opts(), const std::string &w="regexp")
 regexp (const regexp &rx)
 ~regexp (void)
void compile (const std::string &pat, const regexp::opts &opt=regexp::opts())
Array< boolis_match (const string_vector &buffer)
bool is_match (const std::string &buffer)
match_data match (const std::string &buffer)
regexpoperator= (const regexp &rx)
std::string replace (const std::string &buffer, const std::string &replacement)

Private Member Functions

void compile_internal (void)
void free (void)

Private Attributes

void * data
std::string m
Array< intnamed_idx
string_vector named_pats
int nnames
opts options
std::string pattern
std::string who

Detailed Description

Definition at line 36 of file regexp.h.


Constructor & Destructor Documentation

regexp::regexp ( const std::string &  pat = "",
const regexp::opts opt = regexp::opts (),
const std::string &  w = "regexp" 
) [inline]

Definition at line 43 of file regexp.h.

References compile_internal().

regexp::regexp ( const regexp rx  )  [inline]

Definition at line 52 of file regexp.h.

regexp::~regexp ( void   )  [inline]

Definition at line 71 of file regexp.h.

References free().


Member Function Documentation

void regexp::compile ( const std::string &  pat,
const regexp::opts opt = regexp::opts () 
) [inline]

Definition at line 73 of file regexp.h.

References compile_internal(), options, and pattern.

void regexp::compile_internal ( void   )  [private]
void regexp::free ( void   )  [private]

Definition at line 61 of file regexp.cc.

References data.

Referenced by compile_internal(), and ~regexp().

bool regexp::is_match ( const std::string &  buffer  ) 

Definition at line 417 of file regexp.cc.

References octave_base_list< elt_type >::begin(), and match().

Referenced by is_match(), and is_regexp_match().

Array< bool > regexp::is_match ( const string_vector buffer  ) 

Definition at line 429 of file regexp.cc.

References is_match(), and Array< T >::length().

regexp::match_data regexp::match ( const std::string &  buffer  ) 
regexp& regexp::operator= ( const regexp rx  )  [inline]

Definition at line 57 of file regexp.h.

References data, named_idx, named_pats, nnames, and pattern.

std::string regexp::replace ( const std::string &  buffer,
const std::string &  replacement 
)

Member Data Documentation

void* regexp::data [private]

Definition at line 223 of file regexp.h.

Referenced by compile_internal(), free(), match(), and operator=().

std::string regexp::m [private]

Definition at line 225 of file regexp.h.

Definition at line 228 of file regexp.h.

Referenced by compile_internal(), match(), and operator=().

Definition at line 226 of file regexp.h.

Referenced by compile_internal(), match(), and operator=().

int regexp::nnames [private]

Definition at line 227 of file regexp.h.

Referenced by compile_internal(), match(), and operator=().

opts regexp::options [private]

Definition at line 220 of file regexp.h.

Referenced by compile(), compile_internal(), and match().

std::string regexp::pattern [private]

Definition at line 218 of file regexp.h.

Referenced by compile(), compile_internal(), and operator=().

std::string regexp::who [private]

Definition at line 229 of file regexp.h.

Referenced by compile_internal(), and match().


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines