Cadabra
Computer algebra system for field theory problems
TerminalStream.hh
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Kernel.hh"
4 #include <ostream>
5 
6 namespace cadabra {
7 
8  class TerminalStream {
9  public:
10  TerminalStream(const Kernel&, std::ostream&);
11 
12  TerminalStream& operator<<(const Ex&);
13  TerminalStream& operator<<(std::shared_ptr<Ex>);
14 
15  template<class T>
16  TerminalStream& operator<<(const T& obj)
17  {
18  out_ << obj;
19  return *this;
20  }
21 
22  TerminalStream& operator <<(std::ostream& (*os)(std::ostream&))
23  {
24  out_ << os;
25  return *this;
26  }
27  private:
28  const Kernel& kernel;
29  std::ostream& out_;
30  };
31 
32 
33  }
cadabra::TerminalStream::out_
std::ostream & out_
Definition: TerminalStream.hh:29
cadabra::Kernel
Definition: Kernel.hh:15
cadabra::TerminalStream::operator<<
TerminalStream & operator<<(const Ex &)
Definition: TerminalStream.cc:12
cadabra::TerminalStream::TerminalStream
TerminalStream(const Kernel &, std::ostream &)
Definition: TerminalStream.cc:7
cadabra::TerminalStream
Definition: TerminalStream.hh:8
cadabra::TerminalStream::operator<<
TerminalStream & operator<<(const T &obj)
Definition: TerminalStream.hh:16
cadabra::TerminalStream::kernel
const Kernel & kernel
Definition: TerminalStream.hh:28
cadabra
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:83
cadabra::Ex
Definition: Storage.hh:140
Kernel.hh