TSDuck Version 3.16-1064 (TSDuck - The MPEG Transport Stream Toolkit)
tsAlgorithm.h File Reference

Miscellaneous C++ algorithms supplementing the standard <algorithm>. More...

Classes

class  ts::IOManipulatorProxy< OSTREAM, PARAM, TRAITS >
 I/O manipulator with argument for subclasses of std::basic_ostream. More...
 

Namespaces

 ts
 TSDuck namespace, containing all TSDuck classes and functions.
 

Functions

template<typename ELEMENT , class CONTAINER >
bool ts::AppendUnique (CONTAINER &container, const ELEMENT &e)
 Append an element into a container if not already present in the container. More...
 
template<typename T , class UnaryPredicate >
bool ts::EnumerateCombinations (const std::set< T > &values, const std::set< T > &fixed, size_t size, UnaryPredicate predicate)
 Enumerate all 'k'-elements combinations of a 'n'-elements set. More...
 
template<class OSTREAM , class TRAITS = std::char_traits<typename OSTREAM::char_type>>
std::basic_ostream< typename OSTREAM::char_type, TRAITS > & ts::IOManipulator (std::basic_ostream< typename OSTREAM::char_type, TRAITS > &strm, OSTREAM &(OSTREAM::*func)())
 I/O manipulator for subclasses of std::basic_ostream. More...
 
template<class CONTAINER >
size_t ts::LargestSize (const CONTAINER &container)
 Get the size of the largest object in a container of objects having a size() method. More...
 
template<class MAP >
std::list< typename MAP::key_type > ts::MapKeys (const MAP &container)
 Get the list of all keys in a map. More...
 
template<class MAP >
std::list< typename MAP::mapped_type > ts::MapValues (const MAP &container)
 Get the list of all values in a map. More...
 
template<class OSTREAM , class PARAM , class TRAITS = std::char_traits<typename OSTREAM::char_type>>
std::basic_ostream< typename OSTREAM::char_type, TRAITS > & operator<< (std::basic_ostream< typename OSTREAM::char_type, TRAITS > &strm, const ts::IOManipulatorProxy< OSTREAM, PARAM, TRAITS > &proxy)
 An overload of operator "<<" on std::basic_ostream for ts::IOManipulatorProxy. More...
 
template<class CONTAINER >
size_t ts::SmallestSize (const CONTAINER &container)
 Get the size of the smallest object in a container of objects having a size() method. More...
 

Detailed Description

Miscellaneous C++ algorithms supplementing the standard <algorithm>.

This file declares several template functions implementing general-purpose algorithms. This header may be considered as an extension of the standard header <algorithm>, implementing other algorithms.

Function Documentation

◆ operator<<()

template<class OSTREAM , class PARAM , class TRAITS = std::char_traits<typename OSTREAM::char_type>>
std::basic_ostream<typename OSTREAM::char_type, TRAITS>& operator<< ( std::basic_ostream< typename OSTREAM::char_type, TRAITS > &  strm,
const ts::IOManipulatorProxy< OSTREAM, PARAM, TRAITS > &  proxy 
)

An overload of operator "<<" on std::basic_ostream for ts::IOManipulatorProxy.

Template Parameters
OSTREAMA subclass of std::basic_ostream.
PARAMThe type of the parameter for the manipulator.
Parameters
[in,out]strmThe stream of class OSTREAM to manipulate.
[in]proxyThe ts::IOManipulatorProxy object.
Returns
A reference to the strm object.
See also
ts::IOManipulatorProxy