-void MathMacroTemplate::setTCode(MathedTextCodes t)
-{
- tcode = t;
-}
-
-
-MathedTextCodes MathMacroTemplate::getTCode() const
-{
- return tcode;
-}
-
-
-int MathMacroTemplate::getNoArgs() const
-{
- return nargs;
-}
-
-
-MathMacroTemplate::MathMacroTemplate(string const & nm, int na, int flg):
- MathParInset(LM_ST_TEXT, nm, LM_OT_MACRO),
- flags(flg), nargs(na)
-{
- if (nargs > 0) {
- tcode = LM_TC_ACTIVE_INSET;
- args_.resize(nargs);
- for (int i = 0; i < nargs; ++i) {
- args_[i].setNumber(i + 1);
- }
- } else {
- tcode = LM_TC_INSET;
- // Here is nargs != args_.size()
- //args = 0;
- }
-}
-
-
-MathMacroTemplate::~MathMacroTemplate()
-{
- // prevent to delete already deleted objects
- for (int i = 0; i < nargs; ++i) {
- args_[i].SetData(0);
- }
-}
+MathMacroTemplate::MathMacroTemplate()
+ : MathNestInset(2), numargs_(0), name_()
+{}