ostream & operator<<(ostream & os, MathAtom const & at)
-{
- if (at.nucleus())
- os << *(at.nucleus());
- else
- os << "(nil)";
- return os;
-}
-
-
-ostream & operator<<(ostream & os, MathInset const & inset)
{
WriteStream wi(os, false, false);
- inset.write(wi);
+ at->write(wi);
return os;
}
}
-void MathInset::normalize(NormalStream & os) const
-{
- os << "[unknown ";
- WriteStream wi(os.os(), false, true);
- write(wi);
- os << "] ";
-}
-
-
void MathInset::dump() const
{
lyxerr << "---------------------------------------------\n";
-void MathInset::write(WriteStream &) const
+void MathInset::write(WriteStream & os) const
+{
+ os << '\\' << name().c_str() << ' ';
+}
+
+
+void MathInset::normalize(NormalStream & os) const
{
- lyxerr << "MathInset::write() called directly!\n";
+ os << '[' << name().c_str() << "] ";
}
}
-int MathInset::dispatch(string const &, idx_type, pos_type)
+int MathInset::dispatch(FuncRequest const &, idx_type, pos_type)
{
return 0; // undispatched
}