// default ctor, dtor, copy ctor, assignment operator and helpers:
//////////
-// public
-
/** Default ctor. Initializes to 1 x 1-dimensional zero-matrix. */
matrix::matrix() : inherited(TINFO_matrix), row(1), col(1)
{
m.push_back(_ex0());
}
-// protected
-
-/** For use by copy ctor and assignment operator. */
void matrix::copy(const matrix & other)
{
inherited::copy(other);
m = other.m; // STL's vector copying invoked here
}
-void matrix::destroy(bool call_parent)
-{
- if (call_parent) inherited::destroy(call_parent);
-}
+DEFAULT_DESTROY(matrix)
//////////
// other ctors
// archiving
//////////
-/** Construct object from archive_node. */
matrix::matrix(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst)
{
debugmsg("matrix ctor from archive_node", LOGLEVEL_CONSTRUCT);
}
}
-/** Unarchive the object. */
-ex matrix::unarchive(const archive_node &n, const lst &sym_lst)
-{
- return (new matrix(n, sym_lst))->setflag(status_flags::dynallocated);
-}
-
-/** Archive the object. */
void matrix::archive(archive_node &n) const
{
inherited::archive(n);
}
}
+DEFAULT_UNARCHIVE(matrix)
+
//////////
// functions overriding virtual functions from bases classes
//////////