Cadabra
Computer algebra system for field theory problems
DisplayBase.hh
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "Props.hh"
5 #include "Storage.hh"
6 
7 namespace cadabra {
8 
17 
18  class DisplayBase {
19  public:
20  DisplayBase(const Kernel&, const Ex&);
21 
22  void output(std::ostream&);
23  void output(std::ostream&, Ex::iterator);
24 
25  virtual void dispatch(std::ostream&, Ex::iterator)=0;
26 
27  protected:
33 
34  virtual bool needs_brackets(Ex::iterator it)=0;
35 
36  const Ex& tree;
37  const Kernel& kernel;
38 
39  };
40 
41  }
cadabra::DisplayBase::output
void output(std::ostream &)
Definition: DisplayBase.cc:11
Storage.hh
cadabra::DisplayBase::dispatch
virtual void dispatch(std::ostream &, Ex::iterator)=0
cadabra::DisplayBase::needs_brackets
virtual bool needs_brackets(Ex::iterator it)=0
Determine if a node needs extra brackets around it.
cadabra::Kernel
Definition: Kernel.hh:14
cadabra::DisplayBase::tree
const Ex & tree
Definition: DisplayBase.hh:36
cadabra::DisplayBase
Definition: DisplayBase.hh:18
cadabra::Ex
Definition: Storage.hh:140
cadabra
Functions to handle the exchange properties of two or more symbols in a product.
Definition: Adjform.cc:80
Props.hh
cadabra::DisplayBase::kernel
const Kernel & kernel
Definition: DisplayBase.hh:37
cadabra::DisplayBase::DisplayBase
DisplayBase(const Kernel &, const Ex &)
Definition: DisplayBase.cc:6