]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_exfuncinset.C
architectural changes to tex2lyx
[lyx.git] / src / mathed / math_exfuncinset.C
index 93cd53e79f7ed3a6cb74cc938ab36e95f25f02b6..a7079179c639d5e5c0a5630e0fb85fc07486010a 100644 (file)
@@ -1,8 +1,3 @@
-
-#ifdef __GNUG__
-#pragma implementation 
-#endif
-
 #include <config.h>
 
 #include "math_exfuncinset.h"
@@ -10,6 +5,8 @@
 #include "math_mathmlstream.h"
 #include "math_streamstr.h"
 
+using std::auto_ptr;
+
 
 MathExFuncInset::MathExFuncInset(string const & name)
        : MathNestInset(1), name_(name)
@@ -23,19 +20,19 @@ MathExFuncInset::MathExFuncInset(string const & name, MathArray const & ar)
 }
 
 
-MathInset * MathExFuncInset::clone() const
+auto_ptr<InsetBase> MathExFuncInset::clone() const
 {
-       return new MathExFuncInset(*this);
+       return auto_ptr<InsetBase>(new MathExFuncInset(*this));
 }
 
 
-void MathExFuncInset::metrics(MathMetricsInfo & mi) const
+void MathExFuncInset::metrics(MetricsInfo & mi, Dimension & /*dim*/) const
 {
        mathed_string_dim(mi.base.font, name_, dim_);
 }
 
 
-void MathExFuncInset::draw(MathPainterInfo & pi, int x, int y) const
+void MathExFuncInset::draw(PainterInfo & pi, int x, int y) const
 {
        drawStrBlack(pi, x, y, name_);
 }
@@ -47,7 +44,7 @@ string MathExFuncInset::name() const
 }
 
 
-void MathExFuncInset::maplize(MapleStream & os) const
+void MathExFuncInset::maple(MapleStream & os) const
 {
        if (name_ == "det")
                os << "linalg[det](" << cell(0) << ')';
@@ -56,6 +53,15 @@ void MathExFuncInset::maplize(MapleStream & os) const
 }
 
 
+void MathExFuncInset::maxima(MaximaStream & os) const
+{
+       if (name_ == "det")
+               os << "determinant(" << cell(0) << ')';
+       else
+               os << name_ << '(' << cell(0) << ')';
+}
+
+
 string asMathematicaName(string const & name)
 {
        if (name == "sin")    return "Sin";
@@ -78,7 +84,7 @@ string asMathematicaName(string const & name)
 }
 
 
-void MathExFuncInset::mathematicize(MathematicaStream & os) const
+void MathExFuncInset::mathematica(MathematicaStream & os) const
 {
        os << asMathematicaName(name_) << '[' << cell(0) << ']';
 }
@@ -90,7 +96,7 @@ void MathExFuncInset::mathmlize(MathMLStream & os) const
 }
 
 
-void MathExFuncInset::octavize(OctaveStream & os) const
+void MathExFuncInset::octave(OctaveStream & os) const
 {
        os << name_ << '(' << cell(0) << ')';
 }