Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
boost::xpressive::basic_regex< BidiIter > Struct Template Reference

Class template basic_regex<> is a class for holding a compiled regular expression. More...

#include <xpressive_fwd.hpp>

Inheritance diagram for boost::xpressive::basic_regex< BidiIter >:
Collaboration diagram for boost::xpressive::basic_regex< BidiIter >:

Public Types

typedef BidiIter iterator_type
 
typedef iterator_value
< BidiIter >::type 
char_type
 
typedef iterator_value
< BidiIter >::type 
value_type
 
typedef detail::string_type
< char_type >::type 
string_type
 
typedef
regex_constants::syntax_option_type 
flag_type
 

Public Member Functions

 BOOST_STATIC_CONSTANT (regex_constants::syntax_option_type, ECMAScript=regex_constants::ECMAScript)
 
 BOOST_STATIC_CONSTANT (regex_constants::syntax_option_type, icase=regex_constants::icase_)
 
 BOOST_STATIC_CONSTANT (regex_constants::syntax_option_type, nosubs=regex_constants::nosubs)
 
 BOOST_STATIC_CONSTANT (regex_constants::syntax_option_type, optimize=regex_constants::optimize)
 
 BOOST_STATIC_CONSTANT (regex_constants::syntax_option_type, collate=regex_constants::collate)
 
 BOOST_STATIC_CONSTANT (regex_constants::syntax_option_type, single_line=regex_constants::single_line)
 
 BOOST_STATIC_CONSTANT (regex_constants::syntax_option_type, not_dot_null=regex_constants::not_dot_null)
 
 BOOST_STATIC_CONSTANT (regex_constants::syntax_option_type, not_dot_newline=regex_constants::not_dot_newline)
 
 BOOST_STATIC_CONSTANT (regex_constants::syntax_option_type, ignore_white_space=regex_constants::ignore_white_space)
 
 basic_regex ()
 
 basic_regex (basic_regex< BidiIter > const &that)
 
basic_regex< BidiIter > & operator= (basic_regex< BidiIter > const &that)
 
template<typename Expr >
 basic_regex (Expr const &expr)
 Construct from a static regular expression. More...
 
template<typename Expr >
basic_regex< BidiIter > & operator= (Expr const &expr)
 Construct from a static regular expression. More...
 
std::size_t mark_count () const
 Returns the count of capturing sub-expressions in this regular expression. More...
 
regex_id_type regex_id () const
 Returns a token which uniquely identifies this regular expression. More...
 
void swap (basic_regex< BidiIter > &that)
 Swaps the contents of this basic_regex object with another. More...
 

Static Public Member Functions

template<typename InputIter >
static basic_regex< BidiIter > compile (InputIter begin, InputIter end, flag_type flags=regex_constants::ECMAScript)
 Factory method for building a regex object from a range of characters. More...
 
template<typename InputRange >
static basic_regex< BidiIter > compile (InputRange const &pat, flag_type flags=regex_constants::ECMAScript)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
static basic_regex< BidiIter > compile (char_type const *begin, flag_type flags=regex_constants::ECMAScript)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 
static basic_regex< BidiIter > compile (char_type const *begin, std::size_t len, flag_type flags)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
 

Friends

struct detail::core_access< BidiIter >
 

Detailed Description

template<typename BidiIter>
struct boost::xpressive::basic_regex< BidiIter >

Class template basic_regex<> is a class for holding a compiled regular expression.

Member Typedef Documentation

template<typename BidiIter>
typedef iterator_value<BidiIter>::type boost::xpressive::basic_regex< BidiIter >::char_type
template<typename BidiIter>
typedef regex_constants::syntax_option_type boost::xpressive::basic_regex< BidiIter >::flag_type
template<typename BidiIter>
typedef BidiIter boost::xpressive::basic_regex< BidiIter >::iterator_type
template<typename BidiIter>
typedef detail::string_type<char_type>::type boost::xpressive::basic_regex< BidiIter >::string_type
template<typename BidiIter>
typedef iterator_value<BidiIter>::type boost::xpressive::basic_regex< BidiIter >::value_type

Constructor & Destructor Documentation

template<typename BidiIter>
boost::xpressive::basic_regex< BidiIter >::basic_regex ( )
inline
Postcondition
regex_id() == 0
mark_count() == 0
template<typename BidiIter>
boost::xpressive::basic_regex< BidiIter >::basic_regex ( basic_regex< BidiIter > const &  that)
inline
Parameters
thatThe basic_regex object to copy.
Postcondition
regex_id() == that.regex_id()
mark_count() == that.mark_count()
template<typename BidiIter>
template<typename Expr >
boost::xpressive::basic_regex< BidiIter >::basic_regex ( Expr const &  expr)
inline

Construct from a static regular expression.

Parameters
exprThe static regular expression
Precondition
Expr is the type of a static regular expression.
Postcondition
regex_id() != 0
mark_count() >= 0

Member Function Documentation

template<typename BidiIter>
boost::xpressive::basic_regex< BidiIter >::BOOST_STATIC_CONSTANT ( regex_constants::syntax_option_type  ,
ECMAScript  = regex_constants::ECMAScript 
)
template<typename BidiIter>
boost::xpressive::basic_regex< BidiIter >::BOOST_STATIC_CONSTANT ( regex_constants::syntax_option_type  ,
icase  = regex_constants::icase_ 
)
template<typename BidiIter>
boost::xpressive::basic_regex< BidiIter >::BOOST_STATIC_CONSTANT ( regex_constants::syntax_option_type  ,
nosubs  = regex_constants::nosubs 
)
template<typename BidiIter>
boost::xpressive::basic_regex< BidiIter >::BOOST_STATIC_CONSTANT ( regex_constants::syntax_option_type  ,
optimize  = regex_constants::optimize 
)
template<typename BidiIter>
boost::xpressive::basic_regex< BidiIter >::BOOST_STATIC_CONSTANT ( regex_constants::syntax_option_type  ,
collate  = regex_constants::collate 
)
template<typename BidiIter>
boost::xpressive::basic_regex< BidiIter >::BOOST_STATIC_CONSTANT ( regex_constants::syntax_option_type  ,
single_line  = regex_constants::single_line 
)
template<typename BidiIter>
boost::xpressive::basic_regex< BidiIter >::BOOST_STATIC_CONSTANT ( regex_constants::syntax_option_type  ,
not_dot_null  = regex_constants::not_dot_null 
)
template<typename BidiIter>
boost::xpressive::basic_regex< BidiIter >::BOOST_STATIC_CONSTANT ( regex_constants::syntax_option_type  ,
not_dot_newline  = regex_constants::not_dot_newline 
)
template<typename BidiIter>
boost::xpressive::basic_regex< BidiIter >::BOOST_STATIC_CONSTANT ( regex_constants::syntax_option_type  ,
ignore_white_space  = regex_constants::ignore_white_space 
)
template<typename BidiIter>
template<typename InputIter >
static basic_regex<BidiIter> boost::xpressive::basic_regex< BidiIter >::compile ( InputIter  begin,
InputIter  end,
flag_type  flags = regex_constants::ECMAScript 
)
inlinestatic

Factory method for building a regex object from a range of characters.

Equivalent to regex_compiler< BidiIter >().compile(begin, end, flags);

Parameters
beginThe beginning of a range of characters representing the regular expression to compile.
endThe end of a range of characters representing the regular expression to compile.
flagsOptional bitmask that determines how the pat string is interpreted. (See syntax_option_type.)
Returns
A basic_regex object corresponding to the regular expression represented by the character range.
Precondition
[begin,end) is a valid range.
The range of characters specified by [begin,end) contains a valid string-based representation of a regular expression.
Exceptions
regex_errorwhen the range of characters has invalid regular expression syntax.

Referenced by boost::xpressive::basic_regex< BidiIter >::compile().

template<typename BidiIter>
template<typename InputRange >
static basic_regex<BidiIter> boost::xpressive::basic_regex< BidiIter >::compile ( InputRange const &  pat,
flag_type  flags = regex_constants::ECMAScript 
)
inlinestatic

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References boost::xpressive::basic_regex< BidiIter >::compile().

template<typename BidiIter>
static basic_regex<BidiIter> boost::xpressive::basic_regex< BidiIter >::compile ( char_type const *  begin,
flag_type  flags = regex_constants::ECMAScript 
)
inlinestatic

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References boost::xpressive::basic_regex< BidiIter >::compile().

template<typename BidiIter>
static basic_regex<BidiIter> boost::xpressive::basic_regex< BidiIter >::compile ( char_type const *  begin,
std::size_t  len,
flag_type  flags 
)
inlinestatic

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

References boost::xpressive::basic_regex< BidiIter >::compile().

template<typename BidiIter>
std::size_t boost::xpressive::basic_regex< BidiIter >::mark_count ( ) const
inline

Returns the count of capturing sub-expressions in this regular expression.

References boost::proto::value().

template<typename BidiIter>
basic_regex<BidiIter>& boost::xpressive::basic_regex< BidiIter >::operator= ( basic_regex< BidiIter > const &  that)
inline
Parameters
thatThe basic_regex object to copy.
Postcondition
regex_id() == that.regex_id()
mark_count() == that.mark_count()
Returns
*this

References boost::proto::value().

template<typename BidiIter>
template<typename Expr >
basic_regex<BidiIter>& boost::xpressive::basic_regex< BidiIter >::operator= ( Expr const &  expr)
inline

Construct from a static regular expression.

Parameters
exprThe static regular expression.
Precondition
Expr is the type of a static regular expression.
Postcondition
regex_id() != 0
mark_count() >= 0
Exceptions
std::bad_allocon out of memory
Returns
*this
template<typename BidiIter>
void boost::xpressive::basic_regex< BidiIter >::swap ( basic_regex< BidiIter > &  that)
inline

Swaps the contents of this basic_regex object with another.

Parameters
thatThe other basic_regex object.
Attention
This is a shallow swap that does not do reference tracking. If you embed a basic_regex object by reference in another regular expression and then swap its contents with another basic_regex object, the change will not be visible to the enclosing regular expression. It is done this way to ensure that swap() cannot throw.
Exceptions
nothrow

References boost::proto::value().

Referenced by boost::xpressive::swap().

Friends And Related Function Documentation

template<typename BidiIter>
friend struct detail::core_access< BidiIter >
friend

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