GNU Octave  4.2.1
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 | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
octave::regexp Class Reference

#include "lo-regexp.h"

Collaboration diagram for octave::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)
 

Static Public Member Functions

static bool is_match (const std::string &pat, const std::string &buffer, const regexp::opts &opt=regexp::opts(), const std::string &who="regexp")
 
static Array< boolis_match (const std::string &pat, const string_vector &buffer, const regexp::opts &opt=regexp::opts(), const std::string &who="regexp")
 
static regexp::match_data match (const std::string &pat, const std::string &buffer, const regexp::opts &opt=regexp::opts(), const std::string &who="regexp")
 
static std::string replace (const std::string &pat, const std::string &buffer, const std::string &replacement, const regexp::opts &opt=regexp::opts(), const std::string &who="regexp")
 

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

Constructor & Destructor Documentation

octave::regexp::regexp ( const std::string pat = "",
const regexp::opts opt = regexp::opts (),
const std::string w = "regexp" 
)
inline

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

octave::regexp::regexp ( const regexp rx)
inline

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

octave::regexp::~regexp ( void  )
inline

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

References free().

Member Function Documentation

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

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

References options, and pattern().

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

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

References data.

Referenced by compile_internal().

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

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

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

static bool octave::regexp::is_match ( const std::string pat,
const std::string buffer,
const regexp::opts opt = regexp::opts (),
const std::string who = "regexp" 
)
inlinestatic

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

References is_match().

static Array<bool> octave::regexp::is_match ( const std::string pat,
const string_vector buffer,
const regexp::opts opt = regexp::opts (),
const std::string who = "regexp" 
)
inlinestatic

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

References is_match().

regexp::match_data octave::regexp::match ( const std::string buffer)
static regexp::match_data octave::regexp::match ( const std::string pat,
const std::string buffer,
const regexp::opts opt = regexp::opts (),
const std::string who = "regexp" 
)
inlinestatic

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

References match().

regexp& octave::regexp::operator= ( const regexp rx)
inline

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

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

std::string octave::regexp::replace ( const std::string buffer,
const std::string replacement 
)
static std::string octave::regexp::replace ( const std::string pat,
const std::string buffer,
const std::string replacement,
const regexp::opts opt = regexp::opts (),
const std::string who = "regexp" 
)
inlinestatic

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

References replace().

Member Data Documentation

void* octave::regexp::data
private

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

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

std::string octave::regexp::m
private

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

Array<int> octave::regexp::named_idx
private

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

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

string_vector octave::regexp::named_pats
private

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

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

int octave::regexp::nnames
private

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

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

opts octave::regexp::options
private

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

Referenced by compile_internal(), and match().

std::string octave::regexp::pattern
private

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

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

std::string octave::regexp::who
private

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

Referenced by compile_internal(), and match().


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