Cambridge SMT System
ucam::util::NumberRange< NumberType > Class Template Reference

#include <range.hpp>

Inheritance diagram for ucam::util::NumberRange< NumberType >:
Collaboration diagram for ucam::util::NumberRange< NumberType >:

Public Member Functions

 NumberRange (const std::vector< NumberType > &r)
 Constructor. More...
 
 NumberRange (const RegistryPO &rg, const std::string &rangekey=HifstConstants::kRange)
 Constructor. More...
 
 NumberRange (const std::string &range)
 
void start (void)
 Empty implementation. More...
 
void next (void)
 Increment index. More...
 
bool done (void)
 Checks if reached the last element. More...
 
NumberType get (void)
 Returns range value at position k_. More...
 
NumberType operator() (void)
 
- Public Member Functions inherited from ucam::util::NumberRangeInterface< NumberType >
virtual ~NumberRangeInterface ()
 

Detailed Description

template<class NumberType = uint>
class ucam::util::NumberRange< NumberType >

Definition at line 78 of file range.hpp.

Constructor & Destructor Documentation

template<class NumberType = uint>
ucam::util::NumberRange< NumberType >::NumberRange ( const std::vector< NumberType > &  r)
inline

Constructor.

Parameters
rvector of unsigned integers

Definition at line 90 of file range.hpp.

template<class NumberType = uint>
ucam::util::NumberRange< NumberType >::NumberRange ( const RegistryPO rg,
const std::string &  rangekey = HifstConstants::kRange 
)
inline

Constructor.

Parameters
rgpointer to RegistryPO objects allowing access to command-line/config file options

Definition at line 97 of file range.hpp.

template<class NumberType = uint>
ucam::util::NumberRange< NumberType >::NumberRange ( const std::string &  range)
inline

Definition at line 102 of file range.hpp.

Member Function Documentation

template<class NumberType = uint>
bool ucam::util::NumberRange< NumberType >::done ( void  )
inlinevirtual

Checks if reached the last element.

Implements ucam::util::NumberRangeInterface< NumberType >.

Definition at line 115 of file range.hpp.

Here is the caller graph for this function:

template<class NumberType = uint>
NumberType ucam::util::NumberRange< NumberType >::get ( void  )
inlinevirtual

Returns range value at position k_.

Implements ucam::util::NumberRangeInterface< NumberType >.

Definition at line 119 of file range.hpp.

Here is the caller graph for this function:

template<class NumberType = uint>
void ucam::util::NumberRange< NumberType >::next ( void  )
inlinevirtual

Increment index.

Implements ucam::util::NumberRangeInterface< NumberType >.

Definition at line 111 of file range.hpp.

Here is the caller graph for this function:

template<class NumberType = uint>
NumberType ucam::util::NumberRange< NumberType >::operator() ( void  )
inline

Definition at line 122 of file range.hpp.

template<class NumberType = uint>
void ucam::util::NumberRange< NumberType >::start ( void  )
inlinevirtual

Empty implementation.

Implements ucam::util::NumberRangeInterface< NumberType >.

Definition at line 107 of file range.hpp.

Here is the caller graph for this function:


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