OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::C2os Namespace Reference

Classes

struct  Container
 New typename for holding the underlying container type. More...
 
struct  PtrContainer
 same idea as C2os::Container<C>, above; importantly, with a different typename More...
 

Functions

template<typename C >
const auto cast (const C &container)
 Provide an instance of C2os::Container<C> from the underlying container.
 
template<typename C >
std::ostream & operator<< (std::ostream &os, const Container< C > &container)
 overload ostream operator<< for the C2os::Container<C> type
 
template<typename C >
const auto cast_deref (const C &container)
 Provide an instance of C2os::PtrContainer<C> from the underlying container.
 
template<typename C >
std::ostream & operator<< (std::ostream &os, const PtrContainer< C > &container)
 overload ostream operator<< for the C2os::PtrContainer<C> type
 

Function Documentation

◆ cast()

template<typename C >
const auto openvpn::C2os::cast ( const C &  container)
inline

Provide an instance of C2os::Container<C> from the underlying container.

This is the only interface the consumer sees (but see cast_deref, below)

Template Parameters
Cunderlying container type (deduced from the container param)
Parameters
containerinstance of the underlying container
Returns
const C2os::Container<C> instance

Definition at line 55 of file ostream_containers.hpp.

Here is the caller graph for this function:

◆ cast_deref()

template<typename C >
const auto openvpn::C2os::cast_deref ( const C &  container)
inline

Provide an instance of C2os::PtrContainer<C> from the underlying container.

This is the only interface the consumer sees if he wants to dereference the contained type T before ostream'ing it

Template Parameters
Cunderlying container type (deduced from the container param)
Parameters
containerinstance of the underlying container
Returns
const C2os::PtrContainer<C> instance

Definition at line 105 of file ostream_containers.hpp.

Here is the caller graph for this function:

◆ operator<<() [1/2]

template<typename C >
std::ostream & openvpn::C2os::operator<< ( std::ostream &  os,
const Container< C > &  container 
)
inline

overload ostream operator<< for the C2os::Container<C> type

Template Parameters
Cunderlying container type
Parameters
osostream instance
containerinstance of the underlying container
Returns
std::ostream& param os

Definition at line 69 of file ostream_containers.hpp.

◆ operator<<() [2/2]

template<typename C >
std::ostream & openvpn::C2os::operator<< ( std::ostream &  os,
const PtrContainer< C > &  container 
)
inline

overload ostream operator<< for the C2os::PtrContainer<C> type

Template Parameters
Cunderlying container type
Parameters
osostream instance
containerinstance of the underlying container
Returns
std::ostream& param os

Definition at line 119 of file ostream_containers.hpp.