Cadabra
Computer algebra system for field theory problems
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 }
Basic storage class for symbolic mathemematical expressions.
Definition: Storage.hh:130
void output(std::ostream &)
Definition: DisplayBase.cc:11
virtual void dispatch(std::ostream &, Ex::iterator)=0
Base class for all display classes.
Definition: DisplayBase.hh:18
const Kernel & kernel
Definition: DisplayBase.hh:37
DisplayBase(const Kernel &, const Ex &)
Definition: DisplayBase.cc:6
const Ex & tree
Definition: DisplayBase.hh:36
virtual bool needs_brackets(Ex::iterator it)=0
Determine if a node needs extra brackets around it.
Definition: Kernel.hh:15