//#####################################################################
// Copyright 2020, Craig Schroeder.
// This file is part of PhysBAM whose distribution is governed by the license contained in the accompanying file PHYSBAM_COPYRIGHT.txt.
//#####################################################################
#ifndef __SYMBOLIC_BASE__
#define __SYMBOLIC_BASE__

#include <iosfwd>
namespace PhysBAM{
class SYMBOLIC;
class SYMBOLIC_BASE
{
public:
    virtual ~SYMBOLIC_BASE()=default;
    virtual void Set(double x)=0;
    virtual void Print(double x,std::ostream& o) const=0;
    virtual SYMBOLIC_BASE* Clone() const=0;

    enum class type_1
    {
        copy,pos,neg,abs,inv,sqrt,floor,ceil,rint,round,
        exp,log,sin,cos,tan,asin,acos,atan,cbrt,
        expm1,log1p,sinh,cosh,tanh,asinh,acosh,atanh,
        modf_ret,modf_arg
    };
    enum class type_2 {add,sub,mul,div,hypot,pow,atan2,fmod,cyl_neumann,cyl_bessel_j};

    virtual void Unary(double x,const SYMBOLIC& a,type_1 op)=0;
    virtual void Binary(double x,const SYMBOLIC& a,const SYMBOLIC& b,type_2 op)=0;
};
}

#endif
