+#include "ALogger.hh"
#include "TPushParser.hh"
-#include "TListener.hh"
+#include "AMathMLFactory.hh"
-TPushParser::TPushParser(const TDictionary& d) : dictionary(d), listener(0)
+TPushParser::TPushParser(ALogger& l, const TDictionary& d) : APushParser(l), dictionary(d)
{
init();
}
-TPushParser::TPushParser(const TDictionary& d, TListener& l) : dictionary(d), listener(&l)
+TPushParser::TPushParser(ALogger& l, AMathMLFactory& f, const TDictionary& d) : APushParser(l, f), dictionary(d)
{
init();
}
cout << "ignored token" << endl;
}
- if (listener) listener->callback(doc); //it shoul be repristened if you remove the comment in the else above
+ //if (listener) listener->callback(doc); //it shoul be repristened if you remove the comment in the else above
} // this end corresponds to the if ((doc.root().first() && doc.root().first().is("math")) || token.category == TToken::SHIFT)
else
cout << "push: ignored token...you have to enter in math mode...insert $" << endl;
}
-
- //if (listener) listener->callback(doc);
+ if (factory) factory->documentModified(doc);
if (frames.empty()) cout << "stack vuoto" << endl;
else cout << "stack non vuoto" << endl;
}
void
-TPushParser::setCursor(const std::string& c)
+TPushParser::setCursorHint(const std::string& c)
{
cursor["val"] = c;
- if (listener) listener->callback(doc);
+ if (factory) factory->documentModified(doc);
}