| The Gaudi Framework v29r1 (5cd95fa2)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Types | Public Member Functions | Private Types | Private Attributes | Static Private Attributes | List of all members
Gaudi::Functional::details::vector_of_const_< Container > Class Template Reference

`#include <GaudiAlg/FunctionalDetails.h>`

Collaboration diagram for Gaudi::Functional::details::vector_of_const_< Container >:
[legend]

## Classes
class | iterator

## Public Types
using | value_type = std::conditional_t< is_optional, ptr_t, val_t >
using | size_type = typename ContainerVector::size_type

## Public Member Functions
| vector_of_const_ ()=default
void | reserve (size_type size)
template<typename T >
void | push_back (T &&container)
iterator | begin () const
iterator | end () const
size_type | size () const
const Container & | operator[] (size_type i) const
const Container & | at (size_type i) const
bool | is_null (size_type i) const

## Private Types
using | val_t = std::add_const_t< std::remove_pointer_t< Container >>
using | ptr_t = std::add_pointer_t< val_t >
using | ref_t = std::add_lvalue_reference_t< val_t >
using | ContainerVector = std::vector< ptr_t >

## Private Attributes
ContainerVector | m_containers

## Static Private Attributes
static constexpr bool | is_optional = std::is_pointer<Container>::value

## Detailed Description

### template<typename Container>
class Gaudi::Functional::details::vector_of_const_< Container >

Definition at line 256 of file FunctionalDetails.h.

## Member Typedef Documentation

template<typename Container >

using Gaudi::Functional::details::vector_of_const_< Container >::ContainerVector = std::vector<ptr_t>
| private

Definition at line 262 of file FunctionalDetails.h.

template<typename Container >

using Gaudi::Functional::details::vector_of_const_< Container >::ptr_t = std::add_pointer_t<val_t>
| private

Definition at line 260 of file FunctionalDetails.h.

template<typename Container >

using Gaudi::Functional::details::vector_of_const_< Container >::ref_t = std::add_lvalue_reference_t<val_t>
| private

Definition at line 261 of file FunctionalDetails.h.

template<typename Container >

using Gaudi::Functional::details::vector_of_const_< Container >::size_type = typename ContainerVector::size_type

Definition at line 267 of file FunctionalDetails.h.

template<typename Container >

using Gaudi::Functional::details::vector_of_const_< Container >::val_t = std::add_const_t<std::remove_pointer_t<Container>>
| private

Definition at line 259 of file FunctionalDetails.h.

template<typename Container >

using Gaudi::Functional::details::vector_of_const_< Container >::value_type = std::conditional_t<is_optional, ptr_t, val_t>

Definition at line 266 of file FunctionalDetails.h.

## Constructor & Destructor Documentation

template<typename Container >

Gaudi::Functional::details::vector_of_const_< Container >::vector_of_const_ | ( |  | ) |
| default

## Member Function Documentation

template<typename Container >

const Container& Gaudi::Functional::details::vector_of_const_< Container >::at | ( | size_type | i | ) | const
| inline

Definition at line 303 of file FunctionalDetails.h.

304 {
305 if ( i >= size() ) throw std::out_of_range{"vector_of_const_::at"};
306 return *m_containers[i];
307 }
std::out_of_range
STL class.
Gaudi::Functional::details::vector_of_const_::size
size_type size() const
Definition: FunctionalDetails.h:301
Gaudi::Functional::details::vector_of_const_::m_containers
ContainerVector m_containers
Definition: FunctionalDetails.h:263
template<typename Container >

iterator Gaudi::Functional::details::vector_of_const_< Container >::begin | ( |  | ) | const
| inline

Definition at line 299 of file FunctionalDetails.h.

299 { return m_containers.begin(); }
Gaudi::Functional::details::vector_of_const_::m_containers
ContainerVector m_containers
Definition: FunctionalDetails.h:263
std::vector::begin
T begin(T...args)
template<typename Container >

iterator Gaudi::Functional::details::vector_of_const_< Container >::end | ( |  | ) | const
| inline

Definition at line 300 of file FunctionalDetails.h.

300 { return m_containers.end(); }
std::vector::end
T end(T...args)
Gaudi::Functional::details::vector_of_const_::m_containers
ContainerVector m_containers
Definition: FunctionalDetails.h:263
template<typename Container >

bool Gaudi::Functional::details::vector_of_const_< Container >::is_null | ( | size_type | i | ) | const
| inline

Definition at line 308 of file FunctionalDetails.h.

308 { return !m_containers[i]; }
Gaudi::Functional::details::vector_of_const_::m_containers
ContainerVector m_containers
Definition: FunctionalDetails.h:263
template<typename Container >

const Container& Gaudi::Functional::details::vector_of_const_< Container >::operator[] | ( | size_type | i | ) | const
| inline

Definition at line 302 of file FunctionalDetails.h.

302 { return *m_containers[i]; }
Gaudi::Functional::details::vector_of_const_::m_containers
ContainerVector m_containers
Definition: FunctionalDetails.h:263
template<typename Container >
template<typename T >

void Gaudi::Functional::details::vector_of_const_< Container >::push_back | ( | T && | container | ) |
| inline

Definition at line 294 of file FunctionalDetails.h.

295 {
296 details2::push_back( m_containers, std::forward<T>( container ),
297 std::integral_constant<bool, is_optional>{} );
298 } // note: does not copy its argument, so we're not really a container...
Gaudi::Functional::details::details2::push_back
void push_back(Container &c, const Value &v, std::true_type)
Definition: FunctionalDetails.h:217
Gaudi::Functional::details::vector_of_const_::m_containers
ContainerVector m_containers
Definition: FunctionalDetails.h:263
std::integral_constant
template<typename Container >

void Gaudi::Functional::details::vector_of_const_< Container >::reserve | ( | size_type | size | ) |
| inline

Definition at line 292 of file FunctionalDetails.h.

292 { m_containers.reserve( size ); }
Gaudi::Functional::details::vector_of_const_::size
size_type size() const
Definition: FunctionalDetails.h:301
Gaudi::Functional::details::vector_of_const_::m_containers
ContainerVector m_containers
Definition: FunctionalDetails.h:263
std::vector::reserve
T reserve(T...args)
template<typename Container >

size_type Gaudi::Functional::details::vector_of_const_< Container >::size | ( |  | ) | const
| inline

Definition at line 301 of file FunctionalDetails.h.

301 { return m_containers.size(); }
Gaudi::Functional::details::vector_of_const_::m_containers
ContainerVector m_containers
Definition: FunctionalDetails.h:263
std::vector::size
T size(T...args)

## Member Data Documentation

template<typename Container >

constexpr bool Gaudi::Functional::details::vector_of_const_< Container >::is_optional = std::is_pointer<Container>::value
| static private

Definition at line 258 of file FunctionalDetails.h.

template<typename Container >

ContainerVector Gaudi::Functional::details::vector_of_const_< Container >::m_containers
| private

Definition at line 263 of file FunctionalDetails.h.

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

- GaudiAlg/GaudiAlg/FunctionalDetails.h