souffle  2.0.2-371-g6315b36
Data Structures | Namespaces | Functions | Variables
StreamUtil.h File Reference
#include <map>
#include <memory>
#include <ostream>
#include <set>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
#include "souffle/utility/ContainerUtil.h"
#include "souffle/utility/span.h"
Include dependency graph for StreamUtil.h:

Go to the source code of this file.

Data Structures

struct  souffle::deref< T >
 A functor dereferencing a given type. More...
 
struct  souffle::id< T >
 A functor representing the identity function for a generic type T. More...
 
struct  souffle::IsPtrLike< A >
 
struct  souffle::IsPtrLike< Own< A > >
 
struct  souffle::IsPtrLike< std::shared_ptr< A > >
 
struct  souffle::IsPtrLike< std::weak_ptr< A > >
 
class  souffle::detail::joined_sequence< Iter, Printer >
 A auxiliary class to be returned by the join function aggregating the information required to print a list of elements as well as the implementation of the printing itself. More...
 
struct  souffle::detail::multiplying_printer< T >
 A utility class required for the implementation of the times function. More...
 
struct  souffle::detail::print< Extractor >
 A generic element printer. More...
 
struct  souffle::print_deref< T >
 A functor printing elements after dereferencing it. More...
 

Namespaces

 souffle
 
 souffle::detail
 
 souffle::stream_write_qualified_char_as_number
 
 std
 

Functions

template<typename Container , typename Printer , typename Iter = typename Container::const_iterator>
detail::joined_sequence< Iter, Printer > souffle::join (const Container &c, const std::string &sep, const Printer &p)
 Creates an object to be forwarded to some output stream for printing the content of containers interspersed by a given separator. More...
 
template<typename Container , typename Iter = typename Container::const_iterator, typename T = typename std::iterator_traits<Iter>::value_type>
std::enable_if_t<!JoinShouldDeref< T >, detail::joined_sequence< Iter, detail::print< id< T > > > > souffle::join (const Container &c, const std::string &sep=",")
 Creates an object to be forwarded to some output stream for printing the content of containers interspersed by a given separator. More...
 
template<typename Container , typename Iter = typename Container::const_iterator, typename T = typename std::iterator_traits<Iter>::value_type>
std::enable_if_t< JoinShouldDeref< T >, detail::joined_sequence< Iter, detail::print< deref< T > > > > souffle::join (const Container &c, const std::string &sep=",")
 
template<typename Iter , typename Printer >
detail::joined_sequence< Iter, Printer > souffle::join (const Iter &a, const Iter &b, const std::string &sep, const Printer &p)
 Creates an object to be forwarded to some output stream for printing sequences of elements interspersed by a given separator. More...
 
template<typename Iter , typename T = typename Iter::value_type>
detail::joined_sequence< Iter, detail::print< id< T > > > souffle::join (const Iter &a, const Iter &b, const std::string &sep=",")
 Creates an object to be forwarded to some output stream for printing sequences of elements interspersed by a given separator. More...
 
template<typename T , size_t E>
ostream & std::operator<< (ostream &out, const array< T, E > &v)
 Enables the generic printing of arrays assuming their element types are printable. More...
 
template<typename K , typename T , typename C , typename A >
ostream & std::operator<< (ostream &out, const map< K, T, C, A > &m)
 Enables the generic printing of maps assuming their element types are printable. More...
 
template<typename K , typename C , typename A >
ostream & std::operator<< (ostream &out, const multiset< K, C, A > &s)
 Enables the generic printing of multisets assuming their element types are printable. More...
 
template<typename A , typename B >
ostream & std::operator<< (ostream &out, const pair< A, B > &p)
 Introduces support for printing pairs as long as their components can be printed. More...
 
template<typename K , typename C , typename A >
ostream & std::operator<< (ostream &out, const set< K, C, A > &s)
 Enables the generic printing of sets assuming their element types are printable. More...
 
template<typename T , size_t E>
ostream & std::operator<< (ostream &out, const souffle::span< T, E > &v)
 Enables the generic printing of spans assuming their element types are printable. More...
 
template<typename T , typename A >
ostream & std::operator<< (ostream &out, const vector< T, A > &v)
 Enables the generic printing of vectors assuming their element types are printable. More...
 
std::ostream & souffle::stream_write_qualified_char_as_number::operator<< (std::ostream &os, signed char c)
 
std::ostream & souffle::stream_write_qualified_char_as_number::operator<< (std::ostream &os, unsigned char c)
 
template<typename T >
detail::multiplying_printer< T > souffle::times (const T &value, unsigned num)
 A utility printing a given value multiple times. More...
 

Variables

template<typename A >
constexpr bool souffle::JoinShouldDeref = IsPtrLike<A>::value && !std::is_same_v<A, char const*>