ATLAS Offline Software
Classes | Public Member Functions | Public Attributes | List of all members
TableUtils::Range< T > Struct Template Reference

#include <TableUtils.h>

Collaboration diagram for TableUtils::Range< T >:

Classes

struct  const_iterator
 

Public Member Functions

const_iterator begin () const
 
const_iterator end () const
 
const T & operator[] (std::size_t index) const
 
std::size_t size () const
 
 operator bool () const
 
template<typename T_Other >
bool equalSize (const T_Other &other_range)
 

Public Attributes

const T * m_ptr = nullptr
 
std::size_t m_size = 0u
 
std::size_t m_offset = 1u
 

Detailed Description

template<typename T>
struct TableUtils::Range< T >

Definition at line 24 of file TableUtils.h.

Member Function Documentation

◆ begin()

template<typename T >
const_iterator TableUtils::Range< T >::begin ( ) const
inline

Definition at line 36 of file TableUtils.h.

36  {
37  return const_iterator{ m_ptr, m_offset };
38  }

◆ end()

template<typename T >
const_iterator TableUtils::Range< T >::end ( ) const
inline

Definition at line 39 of file TableUtils.h.

39  {
40  assert( (m_size % m_offset) == 0 );
41  return const_iterator{ m_ptr+m_size, m_offset };
42  }

◆ equalSize()

template<typename T >
template<typename T_Other >
bool TableUtils::Range< T >::equalSize ( const T_Other &  other_range)
inline

Definition at line 49 of file TableUtils.h.

49  {
50  return m_size == other_range.m_size;
51  }

◆ operator bool()

template<typename T >
TableUtils::Range< T >::operator bool ( ) const
inline

Definition at line 47 of file TableUtils.h.

47 { return m_ptr != nullptr && m_size>0; }

◆ operator[]()

template<typename T >
const T& TableUtils::Range< T >::operator[] ( std::size_t  index) const
inline

Definition at line 43 of file TableUtils.h.

43 { assert(index<m_size && m_ptr); return m_ptr[index]; }

◆ size()

template<typename T >
std::size_t TableUtils::Range< T >::size ( ) const
inline

Definition at line 45 of file TableUtils.h.

45 { return m_size; }

Member Data Documentation

◆ m_offset

template<typename T >
std::size_t TableUtils::Range< T >::m_offset = 1u

Definition at line 27 of file TableUtils.h.

◆ m_ptr

template<typename T >
const T* TableUtils::Range< T >::m_ptr = nullptr

Definition at line 25 of file TableUtils.h.

◆ m_size

template<typename T >
std::size_t TableUtils::Range< T >::m_size = 0u

Definition at line 26 of file TableUtils.h.


The documentation for this struct was generated from the following file:
index
Definition: index.py:1
TableUtils::Range::m_size
std::size_t m_size
Definition: TableUtils.h:26
TableUtils::Range::m_ptr
const T * m_ptr
Definition: TableUtils.h:25
DeMoScan.index
string index
Definition: DeMoScan.py:362
TableUtils::Range::m_offset
std::size_t m_offset
Definition: TableUtils.h:27