GNU Octave  3.8.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
regexp Class Reference

#include "lo-regexp.h"

Collaboration diagram for regexp:
Collaboration graph
[legend]

Classes

class  match_data
class  match_element
class  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())
bool is_match (const std::string &buffer)
Array< boolis_match (const string_vector &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

voiddata
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 lo-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 45 of file lo-regexp.h.

regexp::regexp ( const regexp rx)
inline

Definition at line 54 of file lo-regexp.h.

regexp::~regexp ( void  )
inline

Definition at line 73 of file lo-regexp.h.

Member Function Documentation

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

Definition at line 75 of file lo-regexp.h.

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

Definition at line 61 of file lo-regexp.cc.

References data.

Referenced by compile_internal().

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

Definition at line 433 of file lo-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 59 of file lo-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 231 of file lo-regexp.h.

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

std::string regexp::m
private

Definition at line 233 of file lo-regexp.h.

Array<int> regexp::named_idx
private

Definition at line 236 of file lo-regexp.h.

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

string_vector regexp::named_pats
private

Definition at line 234 of file lo-regexp.h.

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

int regexp::nnames
private

Definition at line 235 of file lo-regexp.h.

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

opts regexp::options
private

Definition at line 228 of file lo-regexp.h.

Referenced by compile_internal(), and match().

std::string regexp::pattern
private

Definition at line 226 of file lo-regexp.h.

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

std::string regexp::who
private

Definition at line 237 of file lo-regexp.h.

Referenced by compile_internal(), and match().


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