OASIS
Open Algebra Software
Loading...
Searching...
No Matches
Serialization.hpp
Go to the documentation of this file.
1//
2// Created by Matthew McCall on 4/28/24.
3//
4
5#ifndef OASIS_SERIALIZATION_HPP
6#define OASIS_SERIALIZATION_HPP
7
8#include "Expression.hpp"
9
10namespace Oasis {
11
12class Real;
13class Imaginary;
14class Matrix;
15class Variable;
16class Undefined;
17class EulerNumber;
18class Pi;
19
20template <IExpression, IExpression>
21class Add;
22
23template <IExpression MinuendT, IExpression SubtrahendT>
24class Subtract;
25
26template <IExpression MultiplicandT, IExpression MultiplierT>
27class Multiply;
28
29template <IExpression DividendT, IExpression DivisorT>
30class Divide;
31
32template <IExpression BaseT, IExpression PowerT>
33class Exponent;
34
35template <IExpression BaseT, IExpression ArgumentT>
36class Log;
37
38template <typename OperandT>
39class Negate;
40
41template <typename OperandT>
42class Magnitude;
43
44template <IExpression, IExpression>
45class Derivative;
46
47template <IExpression Integrand, IExpression Differential>
48class Integral;
49
51public:
52 virtual void Serialize(const Real& real) = 0;
53 virtual void Serialize(const Imaginary& imaginary) = 0;
54 virtual void Serialize(const Matrix& matrix) = 0;
55 virtual void Serialize(const Variable& variable) = 0;
56 virtual void Serialize(const Undefined& undefined) = 0;
57 virtual void Serialize(const EulerNumber&) = 0;
58 virtual void Serialize(const Pi&) = 0;
59 virtual void Serialize(const Add<Expression, Expression>& add) = 0;
60 virtual void Serialize(const Subtract<Expression, Expression>& subtract) = 0;
61 virtual void Serialize(const Multiply<Expression, Expression>& multiply) = 0;
62 virtual void Serialize(const Divide<Expression, Expression>& divide) = 0;
63 virtual void Serialize(const Exponent<Expression, Expression>& exponent) = 0;
64 virtual void Serialize(const Log<Expression, Expression>& log) = 0;
65 virtual void Serialize(const Negate<Expression>& negate) = 0;
66 virtual void Serialize(const Magnitude<Expression>& magnitude) = 0;
67 virtual void Serialize(const Derivative<Expression, Expression>& derivative) = 0;
68 virtual void Serialize(const Integral<Expression, Expression>& integral) = 0;
69
70 virtual ~SerializationVisitor() = default;
71};
72
73}
74
75#endif // OASIS_SERIALIZATION_HPP
The Add expression adds two expressions together.
Definition Add.hpp:42
The Derivative class template calculates the derivative of given expressions.
Definition Derivative.hpp:40
The Divide expression divides two expressions.
Definition Divide.hpp:42
An 'EulerNumber' number.
Definition EulerNumber.hpp:15
The exponent expression creates an exponent two expressions.
Definition Exponent.hpp:43
An 'imaginary' number.
Definition Imaginary.hpp:15
The Integral expression integrates the two expressions together.
Definition Integral.hpp:41
The Log expression represents the logarithm of a base and an argument.
Definition Log.hpp:42
Definition Magnitude.hpp:28
A matrix.
Definition Matrix.hpp:16
The Multiply expression multiplies two expressions.
Definition Multiply.hpp:40
Definition Negate.hpp:14
Mathematical Constant Pi.
Definition Pi.hpp:15
A real number.
Definition Real.hpp:15
Definition Serialization.hpp:50
virtual void Serialize(const Negate< Expression > &negate)=0
virtual void Serialize(const Magnitude< Expression > &magnitude)=0
virtual void Serialize(const Exponent< Expression, Expression > &exponent)=0
virtual void Serialize(const Integral< Expression, Expression > &integral)=0
virtual ~SerializationVisitor()=default
virtual void Serialize(const Subtract< Expression, Expression > &subtract)=0
virtual void Serialize(const Variable &variable)=0
virtual void Serialize(const Multiply< Expression, Expression > &multiply)=0
virtual void Serialize(const Matrix &matrix)=0
virtual void Serialize(const Add< Expression, Expression > &add)=0
virtual void Serialize(const EulerNumber &)=0
virtual void Serialize(const Derivative< Expression, Expression > &derivative)=0
virtual void Serialize(const Divide< Expression, Expression > &divide)=0
virtual void Serialize(const Pi &)=0
virtual void Serialize(const Undefined &undefined)=0
virtual void Serialize(const Log< Expression, Expression > &log)=0
virtual void Serialize(const Imaginary &imaginary)=0
virtual void Serialize(const Real &real)=0
The Subtract expression subtracts two expressions.
Definition Subtract.hpp:43
An undefined expression.
Definition Undefined.hpp:15
An algebraic variable.
Definition Variable.hpp:21
Definition Add.hpp:11