std::__detail::_Nfa (3) - Linux Manuals
NAME
std::__detail::_Nfa -
SYNOPSIS
Inherits std::__detail::_Automaton, and std::vector< _State >.
Public Types
typedef
regex_constants::syntax_option_type _FlagT"
typedef unsigned int _SizeT
typedef _State _StateT
typedef std::allocator< _State > allocator_type
typedef
__gnu_cxx::__normal_iterator
< const_pointer, vector > const_iterator"
typedef
_Alloc_traits::const_pointer const_pointer"
typedef
_Alloc_traits::const_reference const_reference"
typedef std::reverse_iterator
< const_iterator > const_reverse_iterator"
typedef ptrdiff_t difference_type
typedef
__gnu_cxx::__normal_iterator
< pointer, vector > iterator"
typedef _Base::pointer pointer
typedef _Alloc_traits::reference reference
typedef std::reverse_iterator
< iterator > reverse_iterator"
typedef size_t size_type
typedef _State value_type
Public Member Functions
_Nfa (_FlagT __f)
_Alloc_traits::_S_on_swap (_M_get_Tp_allocator(), __x._M_get_Tp_allocator())
const _StateSet & _M_final_states () const
_StateIdT _M_insert_accept ()
_StateIdT _M_insert_alt (_StateIdT __next, _StateIdT __alt)
_StateIdT _M_insert_matcher (_Matcher __m)
_StateIdT _M_insert_subexpr_begin (const _Tagger &__t)
_StateIdT _M_insert_subexpr_end (unsigned int __i, const _Tagger &__t)
_FlagT _M_options () const
_StateIdT _M_start () const
_SizeT _M_sub_count () const
void assign (size_type __n, const value_type &__val)
void assign (_InputIterator __first, _InputIterator __last)
void assign (initializer_list< value_type > __l)
reference at (size_type __n)
const_reference at (size_type __n) const
reference back ()
const_reference back () const
iterator begin () noexcept
const_iterator begin () const noexcept
size_type capacity () const noexcept
const_iterator cbegin () const noexcept
const_iterator cend () const noexcept
void clear () noexcept
const_reverse_iterator crbegin () const noexcept
const_reverse_iterator crend () const noexcept
_State * data () noexcept
const _State * data () const noexcept
iterator emplace (iterator __position, _Args &&...__args)
void emplace_back (_Args &&...__args)
bool empty () const noexcept
iterator end () noexcept
const_iterator end () const noexcept
iterator erase (iterator __position)
iterator erase (iterator __first, iterator __last)
reference front ()
const_reference front () const
iterator insert (iterator __position, const value_type &__x)
iterator insert (iterator __position, value_type &&__x)
void insert (iterator __position, initializer_list< value_type > __l)
void insert (iterator __position, size_type __n, const value_type &__x)
void insert (iterator __position, _InputIterator __first, _InputIterator __last)
size_type max_size () const noexcept
reference operator[] (size_type __n)
const_reference operator[] (size_type __n) const
void pop_back ()
void push_back (const value_type &__x)
void push_back (value_type &&__x)
reverse_iterator rbegin () noexcept
const_reverse_iterator rbegin () const noexcept
reverse_iterator rend () noexcept
const_reverse_iterator rend () const noexcept
void reserve (size_type __n)
void resize (size_type __new_size)
void resize (size_type __new_size, const value_type &__x)
void shrink_to_fit ()
size_type size () const noexcept
Public Attributes
Protected Member Functions
pointer _M_allocate (size_t __n)
pointer _M_allocate_and_copy (size_type __n, _ForwardIterator __first, _ForwardIterator __last)
void _M_assign_aux (_InputIterator __first, _InputIterator __last, std::input_iterator_tag)
void _M_assign_aux (_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag)
void _M_assign_dispatch (_Integer __n, _Integer __val, __true_type)
void _M_assign_dispatch (_InputIterator __first, _InputIterator __last, __false_type)
size_type _M_check_len (size_type __n, const char *__s) const
void _M_deallocate (pointer __p, size_t __n)
void _M_default_append (size_type __n)
void _M_default_initialize (size_type __n)
void _M_emplace_back_aux (_Args &&...__args)
void _M_erase_at_end (pointer __pos)
void _M_fill_assign (size_type __n, const value_type &__val)
void _M_fill_initialize (size_type __n, const value_type &__value)
void _M_fill_insert (iterator __pos, size_type __n, const value_type &__x)
_Tp_alloc_type & _M_get_Tp_allocator () noexcept
const _Tp_alloc_type & _M_get_Tp_allocator () const noexcept
void _M_initialize_dispatch (_Integer __n, _Integer __value, __true_type)
void _M_initialize_dispatch (_InputIterator __first, _InputIterator __last, __false_type)
void _M_insert_aux (iterator __position, _Args &&...__args)
void _M_insert_dispatch (iterator __pos, _Integer __n, _Integer __val, __true_type)
void _M_insert_dispatch (iterator __pos, _InputIterator __first, _InputIterator __last, __false_type)
void _M_range_check (size_type __n) const
void _M_range_initialize (_InputIterator __first, _InputIterator __last, std::input_iterator_tag)
void _M_range_initialize (_ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag)
void _M_range_insert (iterator __pos, _InputIterator __first, _InputIterator __last, std::input_iterator_tag)
void _M_range_insert (iterator __pos, _ForwardIterator __first, _ForwardIterator __last, std::forward_iterator_tag)
bool _M_shrink_to_fit ()
allocator_type get_allocator () const noexcept
Protected Attributes
Detailed Description
struct _Nfa
A collection of all states making up an NFA.
An NFA is a 4-tuple M = (K, S, s, F), where K is a finite set of states, S is the alphabet of the NFA, s is the initial state, F is a set of final (accepting) states.
This NFA class is templated on S, a type that will hold values of the underlying alphabet (without regard to semantics of that alphabet). The other elements of the tuple are generated during construction of the NFA and are available through accessor member functions.
Definition at line 269 of file regex_nfa.h.
Member Function Documentation
pointer std::vector< _State , std::allocator<_State > >::_M_allocate_and_copy (size_type__n, _ForwardIterator__first, _ForwardIterator__last) [inline], [protected], [inherited]
Memory expansion handler. Uses the member allocation function to obtain n bytes of memory, and then copies [first,last) into it.Definition at line 1135 of file stl_vector.h.
void std::vector< _State , std::allocator<_State > >::_M_range_check (size_type__n) const [inline], [protected], [inherited]
Safety check used only from at().
Definition at line 791 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::size().
void std::vector< _State , std::allocator<_State > >::assign (size_type__n, const value_type &__val) [inline], [inherited]
Assigns a given value to a vector.
Parameters:
-
__n Number of elements to be assigned.
__val Value to be assigned.
This function fills a vector with __n copies of the given value. Note that the assignment completely changes the vector and that the resulting vector's size is the same as the number of elements assigned. Old data may be lost.
Definition at line 479 of file stl_vector.h.
void std::vector< _State , std::allocator<_State > >::assign (_InputIterator__first, _InputIterator__last) [inline], [inherited]
Assigns a range to a vector.
Parameters:
-
__first An input iterator.
__last An input iterator.
This function fills a vector with copies of the elements in the range [__first,__last).
Note that the assignment completely changes the vector and that the resulting vector's size is the same as the number of elements assigned. Old data may be lost.
Definition at line 498 of file stl_vector.h.
void std::vector< _State , std::allocator<_State > >::assign (initializer_list< value_type >__l) [inline], [inherited]
Assigns an initializer list to a vector.
Parameters:
- __l An initializer_list.
This function fills a vector with copies of the elements in the initializer list __l.
Note that the assignment completely changes the vector and that the resulting vector's size is the same as the number of elements assigned. Old data may be lost.
Definition at line 524 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::assign().
reference std::vector< _State , std::allocator<_State > >::at (size_type__n) [inline], [inherited]
Provides access to the data contained in the vector.
Parameters:
- __n The index of the element for which data should be accessed.
Returns:
- Read/write reference to data.
Exceptions:
- std::out_of_range If __n is an invalid index.
This function provides for safer data access. The parameter is first checked that it is in the range of the vector. The function throws out_of_range if the check fails.
Definition at line 810 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::_M_range_check().
const_reference std::vector< _State , std::allocator<_State > >::at (size_type__n) const [inline], [inherited]
Provides access to the data contained in the vector.
Parameters:
- __n The index of the element for which data should be accessed.
Returns:
- Read-only (constant) reference to data.
Exceptions:
- std::out_of_range If __n is an invalid index.
This function provides for safer data access. The parameter is first checked that it is in the range of the vector. The function throws out_of_range if the check fails.
Definition at line 828 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::_M_range_check().
reference std::vector< _State , std::allocator<_State > >::back () [inline], [inherited]
Returns a read/write reference to the data at the last element of the vector.Definition at line 855 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::end().
const_reference std::vector< _State , std::allocator<_State > >::back () const [inline], [inherited]
Returns a read-only (constant) reference to the data at the last element of the vector.Definition at line 863 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::end().
iterator std::vector< _State , std::allocator<_State > >::begin () [inline], [noexcept], [inherited]
Returns a read/write iterator that points to the first element in the vector. Iteration is done in ordinary element order.Definition at line 538 of file stl_vector.h.
const_iterator std::vector< _State , std::allocator<_State > >::begin () const [inline], [noexcept], [inherited]
Returns a read-only (constant) iterator that points to the first element in the vector. Iteration is done in ordinary element order.Definition at line 547 of file stl_vector.h.
size_type std::vector< _State , std::allocator<_State > >::capacity () const [inline], [noexcept], [inherited]
Returns the total number of elements that the vector can hold before needing to allocate more memory.Definition at line 725 of file stl_vector.h.
const_iterator std::vector< _State , std::allocator<_State > >::cbegin () const [inline], [noexcept], [inherited]
Returns a read-only (constant) iterator that points to the first element in the vector. Iteration is done in ordinary element order.Definition at line 611 of file stl_vector.h.
const_iterator std::vector< _State , std::allocator<_State > >::cend () const [inline], [noexcept], [inherited]
Returns a read-only (constant) iterator that points one past the last element in the vector. Iteration is done in ordinary element order.Definition at line 620 of file stl_vector.h.
void std::vector< _State , std::allocator<_State > >::clear () [inline], [noexcept], [inherited]
Erases all the elements. Note that this function only erases the elements, and that if the elements themselves are pointers, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibility.Definition at line 1125 of file stl_vector.h.
const_reverse_iterator std::vector< _State , std::allocator<_State > >::crbegin () const [inline], [noexcept], [inherited]
Returns a read-only (constant) reverse iterator that points to the last element in the vector. Iteration is done in reverse element order.Definition at line 629 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::end().
const_reverse_iterator std::vector< _State , std::allocator<_State > >::crend () const [inline], [noexcept], [inherited]
Returns a read-only (constant) reverse iterator that points to one before the first element in the vector. Iteration is done in reverse element order.Definition at line 638 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::begin().
_State * std::vector< _State , std::allocator<_State > >::data () [inline], [noexcept], [inherited]
Returns a pointer such that [data(), data() + size()) is a valid range. For a non-empty vector, data() == &front().Definition at line 878 of file stl_vector.h.
References std::__addressof(), and std::vector< _Tp, _Alloc >::front().
iterator std::vector< _State , std::allocator<_State > >::emplace (iterator__position, _Args &&...__args) [inherited]
Inserts an object in vector before specified iterator.
Parameters:
-
__position An iterator into the vector.
__args Arguments.
Returns:
- An iterator that points to the inserted data.
This function will insert an object of type T constructed with T(std::forward<Args>(args)...) before the specified location. Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list.
bool std::vector< _State , std::allocator<_State > >::empty () const [inline], [noexcept], [inherited]
Returns true if the vector is empty. (Thus begin() would equal end().)Definition at line 734 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::begin(), and std::vector< _Tp, _Alloc >::end().
iterator std::vector< _State , std::allocator<_State > >::end () [inline], [noexcept], [inherited]
Returns a read/write iterator that points one past the last element in the vector. Iteration is done in ordinary element order.Definition at line 556 of file stl_vector.h.
const_iterator std::vector< _State , std::allocator<_State > >::end () const [inline], [noexcept], [inherited]
Returns a read-only (constant) iterator that points one past the last element in the vector. Iteration is done in ordinary element order.Definition at line 565 of file stl_vector.h.
iterator std::vector< _State , std::allocator<_State > >::erase (iterator__position) [inherited]
Remove element at given position.
Parameters:
- __position Iterator pointing to element to be erased.
Returns:
- An iterator pointing to the next element (or end()).
This function will erase the element at the given position and thus shorten the vector by one.
Note This operation could be expensive and if it is frequently used the user should consider using std::list. The user is also cautioned that this function only erases the element, and that if the element is itself a pointer, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibility.
iterator std::vector< _State , std::allocator<_State > >::erase (iterator__first, iterator__last) [inherited]
Remove a range of elements.
Parameters:
-
__first Iterator pointing to the first element to be erased.
__last Iterator pointing to one past the last element to be erased.
Returns:
- An iterator pointing to the element pointed to by __last prior to erasing (or end()).
This function will erase the elements in the range [__first,__last) and shorten the vector accordingly.
Note This operation could be expensive and if it is frequently used the user should consider using std::list. The user is also cautioned that this function only erases the elements, and that if the elements themselves are pointers, the pointed-to memory is not touched in any way. Managing the pointer is the user's responsibility.
reference std::vector< _State , std::allocator<_State > >::front () [inline], [inherited]
Returns a read/write reference to the data at the first element of the vector.Definition at line 839 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::begin().
const_reference std::vector< _State , std::allocator<_State > >::front () const [inline], [inherited]
Returns a read-only (constant) reference to the data at the first element of the vector.Definition at line 847 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::begin().
iterator std::vector< _State , std::allocator<_State > >::insert (iterator__position, const value_type &__x) [inherited]
Inserts given value into vector before specified iterator.
Parameters:
-
__position An iterator into the vector.
__x Data to be inserted.
Returns:
- An iterator that points to the inserted data.
This function will insert a copy of the given value before the specified location. Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list.
iterator std::vector< _State , std::allocator<_State > >::insert (iterator__position, value_type &&__x) [inline], [inherited]
Inserts given rvalue into vector before specified iterator.
Parameters:
-
__position An iterator into the vector.
__x Data to be inserted.
Returns:
- An iterator that points to the inserted data.
This function will insert a copy of the given rvalue before the specified location. Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list.
Definition at line 988 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::emplace().
void std::vector< _State , std::allocator<_State > >::insert (iterator__position, initializer_list< value_type >__l) [inline], [inherited]
Inserts an initializer_list into the vector.
Parameters:
-
__position An iterator into the vector.
__l An initializer_list.
This function will insert copies of the data in the initializer_list l into the vector before the location specified by position.
Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list.
Definition at line 1005 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::insert().
void std::vector< _State , std::allocator<_State > >::insert (iterator__position, size_type__n, const value_type &__x) [inline], [inherited]
Inserts a number of copies of given data into the vector.
Parameters:
-
__position An iterator into the vector.
__n Number of elements to be inserted.
__x Data to be inserted.
This function will insert a specified number of copies of the given data before the location specified by position.
Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list.
Definition at line 1023 of file stl_vector.h.
void std::vector< _State , std::allocator<_State > >::insert (iterator__position, _InputIterator__first, _InputIterator__last) [inline], [inherited]
Inserts a range into the vector.
Parameters:
-
__position An iterator into the vector.
__first An input iterator.
__last An input iterator.
This function will insert copies of the data in the range [__first,__last) into the vector before the location specified by pos.
Note that this kind of operation could be expensive for a vector and if it is frequently used the user should consider using std::list.
Definition at line 1044 of file stl_vector.h.
size_type std::vector< _State , std::allocator<_State > >::max_size () const [inline], [noexcept], [inherited]
Returns the size() of the largest possible vector.Definition at line 650 of file stl_vector.h.
References std::allocator_traits< _Tp_alloc_type >::max_size().
reference std::vector< _State , std::allocator<_State > >::operator[] (size_type__n) [inline], [inherited]
Subscript access to the data contained in the vector.
Parameters:
- __n The index of the element for which data should be accessed.
Returns:
- Read/write reference to data.
This operator allows for easy, array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined. (For checked lookups see at().)
Definition at line 770 of file stl_vector.h.
const_reference std::vector< _State , std::allocator<_State > >::operator[] (size_type__n) const [inline], [inherited]
Subscript access to the data contained in the vector.
Parameters:
- __n The index of the element for which data should be accessed.
Returns:
- Read-only (constant) reference to data.
This operator allows for easy, array-style, data access. Note that data access with this operator is unchecked and out_of_range lookups are not defined. (For checked lookups see at().)
Definition at line 785 of file stl_vector.h.
void std::vector< _State , std::allocator<_State > >::pop_back () [inline], [inherited]
Removes last element. This is a typical stack operation. It shrinks the vector by one.
Note that no data is returned, and if the last element's data is needed, it should be retrieved before pop_back() is called.
Definition at line 937 of file stl_vector.h.
void std::vector< _State , std::allocator<_State > >::push_back (const value_type &__x) [inline], [inherited]
Add data to the end of the vector.
Parameters:
- __x Data to be added.
This is a typical stack operation. The function creates an element at the end of the vector and assigns the given data to it. Due to the nature of a vector this operation can be done in constant time if the vector has preallocated space available.
Definition at line 901 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::end().
reverse_iterator std::vector< _State , std::allocator<_State > >::rbegin () [inline], [noexcept], [inherited]
Returns a read/write reverse iterator that points to the last element in the vector. Iteration is done in reverse element order.Definition at line 574 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::end().
const_reverse_iterator std::vector< _State , std::allocator<_State > >::rbegin () const [inline], [noexcept], [inherited]
Returns a read-only (constant) reverse iterator that points to the last element in the vector. Iteration is done in reverse element order.Definition at line 583 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::end().
reverse_iterator std::vector< _State , std::allocator<_State > >::rend () [inline], [noexcept], [inherited]
Returns a read/write reverse iterator that points to one before the first element in the vector. Iteration is done in reverse element order.Definition at line 592 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::begin().
const_reverse_iterator std::vector< _State , std::allocator<_State > >::rend () const [inline], [noexcept], [inherited]
Returns a read-only (constant) reverse iterator that points to one before the first element in the vector. Iteration is done in reverse element order.Definition at line 601 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::begin().
void std::vector< _State , std::allocator<_State > >::reserve (size_type__n) [inherited]
Attempt to preallocate enough memory for specified number of elements.
Parameters:
- __n Number of elements required.
Exceptions:
- std::length_error If n exceeds max_size().
This function attempts to reserve enough memory for the vector to hold the specified number of elements. If the number requested is more than max_size(), length_error is thrown.
The advantage of this function is that if optimal code is a necessity and the user can determine the number of elements that will be required, the user can reserve the memory in advance, and thus prevent a possible reallocation of memory and copying of vector data.
void std::vector< _State , std::allocator<_State > >::resize (size_type__new_size) [inline], [inherited]
Resizes the vector to the specified number of elements.
Parameters:
- __new_size Number of elements the vector should contain.
This function will resize the vector to the specified number of elements. If the number is smaller than the vector's current size the vector is truncated, otherwise default constructed elements are appended.
Definition at line 664 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::size().
void std::vector< _State , std::allocator<_State > >::resize (size_type__new_size, const value_type &__x) [inline], [inherited]
Resizes the vector to the specified number of elements.
Parameters:
-
__new_size Number of elements the vector should contain.
__x Data with which new elements should be populated.
This function will resize the vector to the specified number of elements. If the number is smaller than the vector's current size the vector is truncated, otherwise the vector is extended and new elements are populated with given data.
Definition at line 684 of file stl_vector.h.
References std::vector< _Tp, _Alloc >::end(), std::vector< _Tp, _Alloc >::insert(), and std::vector< _Tp, _Alloc >::size().
void std::vector< _State , std::allocator<_State > >::shrink_to_fit () [inline], [inherited]
A non-binding request to reduce capacity() to size().Definition at line 716 of file stl_vector.h.
size_type std::vector< _State , std::allocator<_State > >::size () const [inline], [noexcept], [inherited]
Returns the number of elements in the vector.Definition at line 645 of file stl_vector.h.
Member Data Documentation
std::vector< _State , std::allocator<_State > >::__pad0__ [explicit], [inherited]
Creates a vector with default constructed elements.
Parameters:
-
__n The number of elements to initially create.
__a An allocator.
This constructor fills the vector with __n default constructed elements.
Definition at line 270 of file stl_vector.h.
std::vector< _State , std::allocator<_State > >::void [inherited]
Swaps data with another vector.
Parameters:
- __x A vector of the same element and allocator types.
This exchanges the elements between two vectors in constant time. (Three pointers, so it should be quite fast.) Note that the global std::swap() function is specialized such that std::swap(v1,v2) will feed to this function.
Definition at line 1112 of file stl_vector.h.
Author
Generated automatically by Doxygen for libstdc++ from the source code.