File:  [CENS] / python / pyGiNaC / wrappers2 / pyfunc.cpp
Revision 1.1: download - view: text, annotated - select for diffs - revision graph
Thu Apr 19 05:49:44 2001 UTC (16 years, 7 months ago) by pearu
Branches: MAIN
CVS tags: HEAD
Trying boost.python cross_module feature


#include "pyfunc.hpp"

namespace GiNaC
{

  GINAC_IMPLEMENT_REGISTERED_CLASS(pyfunc, basic);
  pyfunc::pyfunc() : inherited(TINFO_pyfunc) {}
  void pyfunc::destroy(bool call_parent)
  {
    if (call_parent) inherited::destroy(call_parent);
  }
  void pyfunc::copy(const pyfunc & other)
  {
    inherited::copy(other);
    this->serial = other.get_serial();
  }
  void pyfunc::archive(archive_node &n) const
  {
    inherited::archive(n);
  }
  pyfunc::pyfunc(const archive_node &n, const lst &sym_lst) : inherited(n, sym_lst) {}
  ex pyfunc::unarchive(const archive_node &n, const lst &sym_lst)
  {  
    return (new pyfunc(n, sym_lst))->setflag(status_flags::dynallocated);
  }
  int pyfunc::compare_same_type(const basic & other) const
  {
    const pyfunc &o = static_cast<const pyfunc &>(other);
    if (this->serial == o.get_serial()) return 0;
    if (this->serial < o.get_serial()) return -1;
    return 1;
  }
  const pyfunc & ex_to_pyfunc(const ex & e)
  {
    return static_cast<const pyfunc &>(*e.bp);
  }

}

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>