Match< Int > Class Reference

#include <algorithms.h>

详细描述

Match specialization for index position type.

公共成员函数

  Match ()=default
  Match (const Match &)=default
Match operator= ( Match &)=default
MAXON_IMPLICIT   Match ( NO_MATCH_TYPE )
Match operator= ( NO_MATCH_TYPE )
MAXON_IMPLICIT   Match ( Int index)
  Match ( Int index, Int length)
Int   GetPosition () const
  operator Int () const
Int   GetLength () const
Bool   IsFound () const
  operator Bool () const

Private Attributes

Int   _index
Int   _length

构造函数 & 析构函数文档编制

◆  Match() [1/5]

Match ( )
default

Constructs a match that is NO_MATCH.

◆  Match() [2/5]

Match ( const Match < Int > &  )
default

Copy constructor.

◆  Match() [3/5]

MAXON_IMPLICIT Match ( NO_MATCH_TYPE   )

Implicit construction from NO_MATCH.

◆  Match() [4/5]

MAXON_IMPLICIT Match ( Int   index )

Construction from a index position with a default length of 1.

◆  Match() [5/5]

Match ( Int   index ,
Int   length  
)

Construction from a index position and length.

成员函数文档编制

◆  operator=() [1/2]

Match & operator= ( Match < Int > &  )
default

Copy assignment.

◆  operator=() [2/2]

Match & operator= ( NO_MATCH_TYPE   )

Assignment of NO_MATCH.

◆  GetPosition()

Int GetPosition ( ) const

Returns the first position of the match.

◆  operator Int()

operator Int ( ) const

Returns the first position of the match.

◆  GetLength()

Int GetLength ( ) const

Implicit to index type Int. Equivalent to GetPosition() .

◆  IsFound()

Bool IsFound ( ) const

Returns, if this match represents a valid position, or if it is a NO_MATCH.

◆  operator Bool()

operator Bool ( ) const
explicit

Conversion to Bool in conditional expressions (i.e. if statements). Equivalent to IsFound() .

Member Data Documentation

◆  _index

Int _index
private

◆  _length

Int _length
private