]> www.ginac.de Git - ginac.git/commitdiff
Wipe out remnants of custom RTTI.
authorAlexei Sheplyakov <varg@theor.jinr.ru>
Fri, 17 Oct 2008 09:41:01 +0000 (13:41 +0400)
committerAlexei Sheplyakov <varg@theor.jinr.ru>
Sun, 19 Oct 2008 17:29:11 +0000 (21:29 +0400)
Custom RTTI considered harmful, final part.

33 files changed:
doc/examples/mystring.cpp
ginac/add.cpp
ginac/basic.cpp
ginac/basic.h
ginac/clifford.cpp
ginac/clifford.h
ginac/color.cpp
ginac/constant.cpp
ginac/container.h
ginac/expairseq.cpp
ginac/exprseq.h
ginac/fderivative.cpp
ginac/function.pl
ginac/idx.cpp
ginac/indexed.cpp
ginac/integral.cpp
ginac/lst.h
ginac/matrix.cpp
ginac/mul.cpp
ginac/ncmul.cpp
ginac/numeric.cpp
ginac/power.cpp
ginac/power.h
ginac/pseries.cpp
ginac/registrar.h
ginac/relational.cpp
ginac/structure.h
ginac/symbol.cpp
ginac/symmetry.cpp
ginac/tensor.cpp
ginac/tensor.h
ginac/utils.h
ginac/wildcard.cpp

index e9d125917ba1f5a1ae08980072d2a76711c55b2a..eb0e452cd10b3d87c4131f59e920cea5ccf2b47e 100644 (file)
@@ -29,9 +29,9 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(mystring, basic,
   print_func<print_context>(&mystring::do_print))
 
 // ctors
-mystring::mystring() : inherited(&mystring::tinfo_static) { }
-mystring::mystring(const string &s) : inherited(&mystring::tinfo_static), str(s) { }
-mystring::mystring(const char *s) : inherited(&mystring::tinfo_static), str(s) { }
+mystring::mystring() { }
+mystring::mystring(const string &s) :  str(s) { }
+mystring::mystring(const char *s) :  str(s) { }
 
 // comparison
 int mystring::compare_same_type(const basic &other) const
index 547bee32d72b166c2ae95b292cd34b1c1c8455c5..7f7215440e6d5be712b2b0f93357cf7637644026 100644 (file)
@@ -49,7 +49,6 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(add, expairseq,
 
 add::add()
 {
-       tinfo_key = &add::tinfo_static;
 }
 
 //////////
@@ -60,7 +59,6 @@ add::add()
 
 add::add(const ex & lh, const ex & rh)
 {
-       tinfo_key = &add::tinfo_static;
        overall_coeff = _ex0;
        construct_from_2_ex(lh,rh);
        GINAC_ASSERT(is_canonical());
@@ -68,7 +66,6 @@ add::add(const ex & lh, const ex & rh)
 
 add::add(const exvector & v)
 {
-       tinfo_key = &add::tinfo_static;
        overall_coeff = _ex0;
        construct_from_exvector(v);
        GINAC_ASSERT(is_canonical());
@@ -76,7 +73,6 @@ add::add(const exvector & v)
 
 add::add(const epvector & v)
 {
-       tinfo_key = &add::tinfo_static;
        overall_coeff = _ex0;
        construct_from_epvector(v);
        GINAC_ASSERT(is_canonical());
@@ -84,7 +80,6 @@ add::add(const epvector & v)
 
 add::add(const epvector & v, const ex & oc)
 {
-       tinfo_key = &add::tinfo_static;
        overall_coeff = oc;
        construct_from_epvector(v);
        GINAC_ASSERT(is_canonical());
@@ -92,7 +87,6 @@ add::add(const epvector & v, const ex & oc)
 
 add::add(std::auto_ptr<epvector> vp, const ex & oc)
 {
-       tinfo_key = &add::tinfo_static;
        GINAC_ASSERT(vp.get()!=0);
        overall_coeff = oc;
        construct_from_epvector(*vp);
index 567760c906f6c936fe832c6edddef772291aa832..237c63df785aad095d27c507a4cbb386d0c3e24f 100644 (file)
@@ -55,7 +55,7 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(basic, void,
 /** basic copy constructor: implicitly assumes that the other class is of
  *  the exact same type (as it's used by duplicate()), so it can copy the
  *  tinfo_key and the hash value. */
-basic::basic(const basic & other) : tinfo_key(other.tinfo_key), flags(other.flags & ~status_flags::dynallocated), hashvalue(other.hashvalue)
+basic::basic(const basic & other) : flags(other.flags & ~status_flags::dynallocated), hashvalue(other.hashvalue)
 {
 }
 
@@ -96,9 +96,7 @@ basic::basic(const archive_node &n, lst &sym_lst) : flags(0)
 {
        // Reconstruct tinfo_key from class name
        std::string class_name;
-       if (n.find_string("class", class_name))
-               tinfo_key = find_tinfo_key(class_name);
-       else
+       if (!n.find_string("class", class_name))
                throw (std::runtime_error("archive node contains no class name"));
 }
 
index 3685fb53ca920f6f5e8ebc4c1f5cb8d9c31982c6..534a5915de2d6a8f7ead70952da60c9515ee3508 100644 (file)
@@ -109,7 +109,7 @@ class basic : public refcounted
        
        // default constructor, destructor, copy constructor and assignment operator
 protected:
-       basic() : tinfo_key(&tinfo_static), flags(0) {}
+       basic() : flags(0) {}
 
 public:
        /** basic destructor, virtual because class ex will delete objects of
@@ -122,10 +122,6 @@ public:
        const basic & operator=(const basic & other);
 
 protected:
-       /** Constructor with specified tinfo_key (used by derived classes instead
-        *  of the default constructor to avoid assigning tinfo_key twice). */
-       basic(tinfo_t ti) : tinfo_key(ti), flags(0) {}
-       
        // new virtual functions which can be overridden by derived classes
 public: // only const functions please (may break reference counting)
 
@@ -266,8 +262,6 @@ public:
                }
        }
 
-       tinfo_t tinfo() const {return tinfo_key;}
-
        /** Set some status_flags. */
        const basic & setflag(unsigned f) const {flags |= f; return *this;}
 
@@ -283,7 +277,6 @@ protected:
        
        // member variables
 protected:
-       tinfo_t tinfo_key;                  ///< type info
        mutable unsigned flags;             ///< of type status_flags
        mutable unsigned hashvalue;         ///< hash value
 };
index e66003728b50f856e8a71f748608e1ff6882c595..d3667aac3f16eeb21169ab3913564137ace9aed9 100644 (file)
@@ -76,7 +76,6 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(diracgammaR, tensor,
 
 clifford::clifford() : representation_label(0), metric(0), commutator_sign(-1)
 {
-       tinfo_key = &clifford::tinfo_static;
 }
 
 DEFAULT_CTOR(diracone)
@@ -95,7 +94,6 @@ DEFAULT_CTOR(diracgammaR)
  *  @see dirac_ONE */
 clifford::clifford(const ex & b, unsigned char rl) : inherited(b), representation_label(rl), metric(0), commutator_sign(-1)
 {
-       tinfo_key = &clifford::tinfo_static;
 }
 
 /** Construct object with one Lorentz index. This constructor is for internal
@@ -105,17 +103,14 @@ clifford::clifford(const ex & b, unsigned char rl) : inherited(b), representatio
 clifford::clifford(const ex & b, const ex & mu, const ex & metr, unsigned char rl, int comm_sign) : inherited(b, mu), representation_label(rl), metric(metr), commutator_sign(comm_sign)
 {
        GINAC_ASSERT(is_a<varidx>(mu));
-       tinfo_key = &clifford::tinfo_static;
 }
 
 clifford::clifford(unsigned char rl, const ex & metr, int comm_sign, const exvector & v, bool discardable) : inherited(not_symmetric(), v, discardable), representation_label(rl), metric(metr), commutator_sign(comm_sign)
 {
-       tinfo_key = &clifford::tinfo_static;
 }
 
 clifford::clifford(unsigned char rl, const ex & metr, int comm_sign, std::auto_ptr<exvector> vp) : inherited(not_symmetric(), vp), representation_label(rl), metric(metr), commutator_sign(comm_sign)
 {
-       tinfo_key = &clifford::tinfo_static;
 }
 
 return_type_t clifford::return_type_tinfo() const
index 59b49d0fa5a49985e26a4acca7d48ce82593dbbf..6b74a46874df441e0d4ed1f69bae94dd8bf223fd 100644 (file)
@@ -101,10 +101,6 @@ class cliffordunit : public tensor
 {
        GINAC_DECLARE_REGISTERED_CLASS(cliffordunit, tensor)
 
-       // other constructors
-protected:
-       cliffordunit(tinfo_t ti) : inherited(ti) {}
-                                                                                                    
        // functions overriding virtual functions from base classes
 public:
        bool contract_with(exvector::iterator self, exvector::iterator other, exvector & v) const;
index 437686333b9263998942652a79bcaa56e76cf13b..30c38d9fff2656b224dd1e99253c0006a8a235d2 100644 (file)
@@ -61,7 +61,6 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(su3d, tensor,
 
 color::color() : representation_label(0)
 {
-       tinfo_key = &color::tinfo_static;
 }
 
 DEFAULT_CTOR(su3one)
@@ -78,7 +77,6 @@ DEFAULT_CTOR(su3d)
  *  @see color_ONE */
 color::color(const ex & b, unsigned char rl) : inherited(b), representation_label(rl)
 {
-       tinfo_key = &color::tinfo_static;
 }
 
 /** Construct object with one color index. This constructor is for internal
@@ -86,17 +84,14 @@ color::color(const ex & b, unsigned char rl) : inherited(b), representation_labe
  *  @see color_T */
 color::color(const ex & b, const ex & i1, unsigned char rl) : inherited(b, i1), representation_label(rl)
 {
-       tinfo_key = &color::tinfo_static;
 }
 
 color::color(unsigned char rl, const exvector & v, bool discardable) : inherited(not_symmetric(), v, discardable), representation_label(rl)
 {
-       tinfo_key = &color::tinfo_static;
 }
 
 color::color(unsigned char rl, std::auto_ptr<exvector> vp) : inherited(not_symmetric(), vp), representation_label(rl)
 {
-       tinfo_key = &color::tinfo_static;
 }
 
 return_type_t color::return_type_tinfo() const
index b63427fce9eb76914b34bb25ab58aa449503b5fd..9247ac20ac8a6575d314eda01d64ec572f423bf2 100644 (file)
@@ -45,7 +45,7 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(constant, basic,
 
 // public
 
-constant::constant() : basic(&constant::tinfo_static), ef(0), serial(next_serial++), domain(domain::complex)
+constant::constant() : ef(0), serial(next_serial++), domain(domain::complex)
 {
        setflag(status_flags::evaluated | status_flags::expanded);
 }
@@ -57,7 +57,7 @@ constant::constant() : basic(&constant::tinfo_static), ef(0), serial(next_serial
 // public
 
 constant::constant(const std::string & initname, evalffunctype efun, const std::string & texname, unsigned dm)
-  : basic(&constant::tinfo_static), name(initname), ef(efun), serial(next_serial++), domain(dm)
+  : name(initname), ef(efun), serial(next_serial++), domain(dm)
 {
        if (texname.empty())
                TeX_name = "\\mbox{" + name + "}";
@@ -67,7 +67,7 @@ constant::constant(const std::string & initname, evalffunctype efun, const std::
 }
 
 constant::constant(const std::string & initname, const numeric & initnumber, const std::string & texname, unsigned dm)
-  : basic(&constant::tinfo_static), name(initname), ef(0), number(initnumber), serial(next_serial++), domain(dm)
+  : name(initname), ef(0), number(initnumber), serial(next_serial++), domain(dm)
 {
        if (texname.empty())
                TeX_name = "\\mbox{" + name + "}";
index bd21eb91291402c69d90075e1b780db116fb0e9f..7092e3b06405e07d3521e1dc4ff76a06fe12aa0c 100644 (file)
@@ -138,14 +138,13 @@ public:
 
 protected:
        // helpers
-       static tinfo_t get_tinfo() { return NULL; }
        static unsigned get_default_flags() { return 0; }
        static char get_open_delim() { return '('; }
        static char get_close_delim() { return ')'; }
 
        // constructors
 public:
-       container(STLT const & s, bool discardable = false) : inherited(get_tinfo())
+       container(STLT const & s, bool discardable = false)
        {
                setflag(get_default_flags());
 
@@ -155,32 +154,32 @@ public:
                        this->seq = s;
        }
 
-       explicit container(std::auto_ptr<STLT> vp) : inherited(get_tinfo())
+       explicit container(std::auto_ptr<STLT> vp)
        {
                setflag(get_default_flags());
                this->seq.swap(*vp);
        }
 
        container(exvector::const_iterator b, exvector::const_iterator e)
-        : inherited(get_tinfo()), container_storage<C>(b, e)
+        : container_storage<C>(b, e)
        {
                setflag(get_default_flags());
        }
 
        explicit container(const ex & p1)
-        : inherited(get_tinfo()), container_storage<C>(1, p1)
+        : container_storage<C>(1, p1)
        {
                setflag(get_default_flags());
        }
 
-       container(const ex & p1, const ex & p2) : inherited(get_tinfo())
+       container(const ex & p1, const ex & p2)
        {
                setflag(get_default_flags());
                reserve(this->seq, 2);
                this->seq.push_back(p1); this->seq.push_back(p2);
        }
 
-       container(const ex & p1, const ex & p2, const ex & p3) : inherited(get_tinfo())
+       container(const ex & p1, const ex & p2, const ex & p3)
        {
                setflag(get_default_flags());
                reserve(this->seq, 3);
@@ -188,7 +187,7 @@ public:
        }
 
        container(const ex & p1, const ex & p2, const ex & p3,
-                 const ex & p4) : inherited(get_tinfo())
+                 const ex & p4)
        {
                setflag(get_default_flags());
                reserve(this->seq, 4);
@@ -197,7 +196,7 @@ public:
        }
 
        container(const ex & p1, const ex & p2, const ex & p3,
-                 const ex & p4, const ex & p5) : inherited(get_tinfo())
+                 const ex & p4, const ex & p5)
        {
                setflag(get_default_flags());
                reserve(this->seq, 5);
@@ -206,7 +205,7 @@ public:
        }
 
        container(const ex & p1, const ex & p2, const ex & p3,
-                 const ex & p4, const ex & p5, const ex & p6) : inherited(get_tinfo())
+                 const ex & p4, const ex & p5, const ex & p6)
        {
                setflag(get_default_flags());
                reserve(this->seq, 6);
@@ -216,7 +215,7 @@ public:
 
        container(const ex & p1, const ex & p2, const ex & p3,
                  const ex & p4, const ex & p5, const ex & p6,
-                 const ex & p7) : inherited(get_tinfo())
+                 const ex & p7)
        {
                setflag(get_default_flags());
                reserve(this->seq, 7);
@@ -227,7 +226,7 @@ public:
 
        container(const ex & p1, const ex & p2, const ex & p3,
                  const ex & p4, const ex & p5, const ex & p6,
-                 const ex & p7, const ex & p8) : inherited(get_tinfo())
+                 const ex & p7, const ex & p8)
        {
                setflag(get_default_flags());
                reserve(this->seq, 8);
@@ -238,7 +237,7 @@ public:
 
        container(const ex & p1, const ex & p2, const ex & p3,
                  const ex & p4, const ex & p5, const ex & p6,
-                 const ex & p7, const ex & p8, const ex & p9) : inherited(get_tinfo())
+                 const ex & p7, const ex & p8, const ex & p9)
        {
                setflag(get_default_flags());
                reserve(this->seq, 9);
@@ -250,7 +249,7 @@ public:
        container(const ex & p1, const ex & p2, const ex & p3,
                  const ex & p4, const ex & p5, const ex & p6,
                  const ex & p7, const ex & p8, const ex & p9,
-                 const ex & p10) : inherited(get_tinfo())
+                 const ex & p10)
        {
                setflag(get_default_flags());
                reserve(this->seq, 10);
@@ -263,7 +262,7 @@ public:
        container(const ex & p1, const ex & p2, const ex & p3,
                  const ex & p4, const ex & p5, const ex & p6,
                  const ex & p7, const ex & p8, const ex & p9,
-                 const ex & p10, const ex & p11) : inherited(get_tinfo())
+                 const ex & p10, const ex & p11)
        {
                setflag(get_default_flags());
                reserve(this->seq, 11);
@@ -276,7 +275,7 @@ public:
        container(const ex & p1, const ex & p2, const ex & p3,
                  const ex & p4, const ex & p5, const ex & p6,
                  const ex & p7, const ex & p8, const ex & p9,
-                 const ex & p10, const ex & p11, const ex & p12) : inherited(get_tinfo())
+                 const ex & p10, const ex & p11, const ex & p12)
        {
                setflag(get_default_flags());
                reserve(this->seq, 12);
@@ -290,7 +289,7 @@ public:
                  const ex & p4, const ex & p5, const ex & p6,
                  const ex & p7, const ex & p8, const ex & p9,
                  const ex & p10, const ex & p11, const ex & p12,
-                 const ex & p13) : inherited(get_tinfo())
+                 const ex & p13)
        {
                setflag(get_default_flags());
                reserve(this->seq, 13);
@@ -305,7 +304,7 @@ public:
                  const ex & p4, const ex & p5, const ex & p6,
                  const ex & p7, const ex & p8, const ex & p9,
                  const ex & p10, const ex & p11, const ex & p12,
-                 const ex & p13, const ex & p14) : inherited(get_tinfo())
+                 const ex & p13, const ex & p14)
        {
                setflag(get_default_flags());
                reserve(this->seq, 14);
@@ -320,7 +319,7 @@ public:
                  const ex & p4, const ex & p5, const ex & p6,
                  const ex & p7, const ex & p8, const ex & p9,
                  const ex & p10, const ex & p11, const ex & p12,
-                 const ex & p13, const ex & p14, const ex & p15) : inherited(get_tinfo())
+                 const ex & p13, const ex & p14, const ex & p15)
        {
                setflag(get_default_flags());
                reserve(this->seq, 15);
@@ -336,7 +335,7 @@ public:
                  const ex & p7, const ex & p8, const ex & p9,
                  const ex & p10, const ex & p11, const ex & p12,
                  const ex & p13, const ex & p14, const ex & p15,
-                 const ex & p16) : inherited(get_tinfo())
+                 const ex & p16)
        {
                setflag(get_default_flags());
                reserve(this->seq, 16);
@@ -476,7 +475,7 @@ protected:
 
 /** Default constructor */
 template <template <class T, class = std::allocator<T> > class C>
-container<C>::container() : inherited(get_tinfo())
+container<C>::container()
 {
        setflag(get_default_flags());
 }
index 39f7931f585b3e9c43a3d3d407b7664aa0a2e4bc..6057a85ef0c0f14a3303058ae9cbd7d04a24e16c 100644 (file)
@@ -69,9 +69,9 @@ public:
 
 // public
 
-expairseq::expairseq() : inherited(&expairseq::tinfo_static)
+expairseq::expairseq() 
 #if EXPAIRSEQ_USE_HASHTAB
-                                                   , hashtabsize(0)
+       : hashtabsize(0)
 #endif // EXPAIRSEQ_USE_HASHTAB
 {}
 
@@ -108,20 +108,20 @@ void expairseq::copy(const expairseq &other)
 // other constructors
 //////////
 
-expairseq::expairseq(const ex &lh, const ex &rh) : inherited(&expairseq::tinfo_static)
+expairseq::expairseq(const ex &lh, const ex &rh)
 {
        construct_from_2_ex(lh,rh);
        GINAC_ASSERT(is_canonical());
 }
 
-expairseq::expairseq(const exvector &v) : inherited(&expairseq::tinfo_static)
+expairseq::expairseq(const exvector &v)
 {
        construct_from_exvector(v);
        GINAC_ASSERT(is_canonical());
 }
 
 expairseq::expairseq(const epvector &v, const ex &oc, bool do_index_renaming)
-  : inherited(&expairseq::tinfo_static), overall_coeff(oc)
+  :  overall_coeff(oc)
 {
        GINAC_ASSERT(is_a<numeric>(oc));
        construct_from_epvector(v, do_index_renaming);
@@ -129,7 +129,7 @@ expairseq::expairseq(const epvector &v, const ex &oc, bool do_index_renaming)
 }
 
 expairseq::expairseq(std::auto_ptr<epvector> vp, const ex &oc, bool do_index_renaming)
-  : inherited(&expairseq::tinfo_static), overall_coeff(oc)
+  :  overall_coeff(oc)
 {
        GINAC_ASSERT(vp.get()!=0);
        GINAC_ASSERT(is_a<numeric>(oc));
index 8c008e65399808137a1c2728b3ecbd8c6e1f626b..ea26f858241ec1fccb6c09764b585919ffe9728a 100644 (file)
@@ -31,9 +31,6 @@ namespace GiNaC {
 
 typedef container<std::vector> exprseq;
 
-/** Specialization of container::get_tinfo() for exprseq. */
-template<> inline tinfo_t exprseq::get_tinfo() { return &exprseq::tinfo_static; }
-
 // defined in exprseq.cpp
 template<> bool exprseq::info(unsigned inf) const;
 
index 452e07e4399164b04980b3d4d2f7d3c22592b6e6..82a0c8d5c88a4f83c00c9bbe48dea5be26e5b73a 100644 (file)
@@ -40,7 +40,6 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(fderivative, function,
 
 fderivative::fderivative()
 {
-       tinfo_key = &fderivative::tinfo_static;
 }
 
 //////////
@@ -50,17 +49,14 @@ fderivative::fderivative()
 fderivative::fderivative(unsigned ser, unsigned param, const exvector & args) : function(ser, args)
 {
        parameter_set.insert(param);
-       tinfo_key = &fderivative::tinfo_static;
 }
 
 fderivative::fderivative(unsigned ser, const paramset & params, const exvector & args) : function(ser, args), parameter_set(params)
 {
-       tinfo_key = &fderivative::tinfo_static;
 }
 
 fderivative::fderivative(unsigned ser, const paramset & params, std::auto_ptr<exvector> vp) : function(ser, vp), parameter_set(params)
 {
-       tinfo_key = &fderivative::tinfo_static;
 }
 
 //////////
index 88be68d89e129308ce6a5ac18d53eb766f9f2ef6..6c70d2dd52137b26a6cb7b361e786dcc063379e8 100644 (file)
@@ -138,7 +138,6 @@ $constructors_implementation=generate(
 function::function(unsigned ser, ${SEQ1})
        : exprseq(${SEQ2}), serial(ser)
 {
-       tinfo_key = &function::tinfo_static;
 }
 END_OF_CONSTRUCTORS_IMPLEMENTATION
 
@@ -814,7 +813,6 @@ GINAC_IMPLEMENT_REGISTERED_CLASS(function, exprseq)
 
 function::function() : serial(0)
 {
-       tinfo_key = &function::tinfo_static;
 }
 
 //////////
@@ -825,7 +823,6 @@ function::function() : serial(0)
 
 function::function(unsigned ser) : serial(ser)
 {
-       tinfo_key = &function::tinfo_static;
 }
 
 // the following lines have been generated for max. ${maxargs} parameters
@@ -834,7 +831,6 @@ $constructors_implementation
 
 function::function(unsigned ser, const exprseq & es) : exprseq(es), serial(ser)
 {
-       tinfo_key = &function::tinfo_static;
 
        // Force re-evaluation even if the exprseq was already evaluated
        // (the exprseq copy constructor copies the flags)
@@ -844,13 +840,11 @@ function::function(unsigned ser, const exprseq & es) : exprseq(es), serial(ser)
 function::function(unsigned ser, const exvector & v, bool discardable) 
   : exprseq(v,discardable), serial(ser)
 {
-       tinfo_key = &function::tinfo_static;
 }
 
 function::function(unsigned ser, std::auto_ptr<exvector> vp) 
   : exprseq(vp), serial(ser)
 {
-       tinfo_key = &function::tinfo_static;
 }
 
 //////////
index 174f95f0f311af7e096bba61402d0083016c7b0e..427dfe99345f0f724d5d973934a0a82c9177db06 100644 (file)
@@ -54,23 +54,21 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(spinidx, varidx,
 // default constructor
 //////////
 
-idx::idx() : inherited(&idx::tinfo_static) {}
+idx::idx() {}
 
 varidx::varidx() : covariant(false)
 {
-       tinfo_key = &varidx::tinfo_static;
 }
 
 spinidx::spinidx() : dotted(false)
 {
-       tinfo_key = &spinidx::tinfo_static;
 }
 
 //////////
 // other constructors
 //////////
 
-idx::idx(const ex & v, const ex & d) : inherited(&idx::tinfo_static), value(v), dim(d)
+idx::idx(const ex & v, const ex & d) :  value(v), dim(d)
 {
        if (is_dim_numeric())
                if (!dim.info(info_flags::posint))
@@ -79,12 +77,10 @@ idx::idx(const ex & v, const ex & d) : inherited(&idx::tinfo_static), value(v),
 
 varidx::varidx(const ex & v, const ex & d, bool cov) : inherited(v, d), covariant(cov)
 {
-       tinfo_key = &varidx::tinfo_static;
 }
 
 spinidx::spinidx(const ex & v, const ex & d, bool cov, bool dot) : inherited(v, d, cov), dotted(dot)
 {
-       tinfo_key = &spinidx::tinfo_static;
 }
 
 //////////
index df89f12953b0a694c060a092e557fc87c881e494..8c5256aff33a1b88560c53ea9ab2a6fa0126bd5d 100644 (file)
@@ -55,7 +55,6 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(indexed, exprseq,
 
 indexed::indexed() : symtree(not_symmetric())
 {
-       tinfo_key = &indexed::tinfo_static;
 }
 
 //////////
@@ -64,79 +63,66 @@ indexed::indexed() : symtree(not_symmetric())
 
 indexed::indexed(const ex & b) : inherited(b), symtree(not_symmetric())
 {
-       tinfo_key = &indexed::tinfo_static;
        validate();
 }
 
 indexed::indexed(const ex & b, const ex & i1) : inherited(b, i1), symtree(not_symmetric())
 {
-       tinfo_key = &indexed::tinfo_static;
        validate();
 }
 
 indexed::indexed(const ex & b, const ex & i1, const ex & i2) : inherited(b, i1, i2), symtree(not_symmetric())
 {
-       tinfo_key = &indexed::tinfo_static;
        validate();
 }
 
 indexed::indexed(const ex & b, const ex & i1, const ex & i2, const ex & i3) : inherited(b, i1, i2, i3), symtree(not_symmetric())
 {
-       tinfo_key = &indexed::tinfo_static;
        validate();
 }
 
 indexed::indexed(const ex & b, const ex & i1, const ex & i2, const ex & i3, const ex & i4) : inherited(b, i1, i2, i3, i4), symtree(not_symmetric())
 {
-       tinfo_key = &indexed::tinfo_static;
        validate();
 }
 
 indexed::indexed(const ex & b, const symmetry & symm, const ex & i1, const ex & i2) : inherited(b, i1, i2), symtree(symm)
 {
-       tinfo_key = &indexed::tinfo_static;
        validate();
 }
 
 indexed::indexed(const ex & b, const symmetry & symm, const ex & i1, const ex & i2, const ex & i3) : inherited(b, i1, i2, i3), symtree(symm)
 {
-       tinfo_key = &indexed::tinfo_static;
        validate();
 }
 
 indexed::indexed(const ex & b, const symmetry & symm, const ex & i1, const ex & i2, const ex & i3, const ex & i4) : inherited(b, i1, i2, i3, i4), symtree(symm)
 {
-       tinfo_key = &indexed::tinfo_static;
        validate();
 }
 
 indexed::indexed(const ex & b, const exvector & v) : inherited(b), symtree(not_symmetric())
 {
        seq.insert(seq.end(), v.begin(), v.end());
-       tinfo_key = &indexed::tinfo_static;
        validate();
 }
 
 indexed::indexed(const ex & b, const symmetry & symm, const exvector & v) : inherited(b), symtree(symm)
 {
        seq.insert(seq.end(), v.begin(), v.end());
-       tinfo_key = &indexed::tinfo_static;
        validate();
 }
 
 indexed::indexed(const symmetry & symm, const exprseq & es) : inherited(es), symtree(symm)
 {
-       tinfo_key = &indexed::tinfo_static;
 }
 
 indexed::indexed(const symmetry & symm, const exvector & v, bool discardable) : inherited(v, discardable), symtree(symm)
 {
-       tinfo_key = &indexed::tinfo_static;
 }
 
 indexed::indexed(const symmetry & symm, std::auto_ptr<exvector> vp) : inherited(vp), symtree(symm)
 {
-       tinfo_key = &indexed::tinfo_static;
 }
 
 //////////
index 220047568f160f36a9b522bb34dd6bb1f94f1040..74a356da897dad8923368f83b5699b8433d5e346 100644 (file)
@@ -48,7 +48,7 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(integral, basic,
 //////////
 
 integral::integral()
-               : inherited(&integral::tinfo_static),
+               : 
                x((new symbol())->setflag(status_flags::dynallocated))
 {}
 
@@ -59,7 +59,7 @@ integral::integral()
 // public
 
 integral::integral(const ex & x_, const ex & a_, const ex & b_, const ex & f_)
-               : inherited(&integral::tinfo_static), x(x_), a(a_), b(b_), f(f_)
+               :  x(x_), a(a_), b(b_), f(f_)
 {
        if (!is_a<symbol>(x)) {
                throw(std::invalid_argument("first argument of integral must be of type symbol"));
index 332579f566b8bc832b1390a3fd9046f7e0e66fe9..eaea3eaaa751a6f9aa496c24442a8ed84047621f 100644 (file)
@@ -31,9 +31,6 @@ namespace GiNaC {
 
 typedef container<std::list> lst;
 
-/** Specialization of container::get_tinfo() for lst. */
-template<> inline tinfo_t lst::get_tinfo() { return &lst::tinfo_static; }
-
 /** Specialization of container::get_default_flags() for lst. */
 template<> inline unsigned lst::get_default_flags() { return status_flags::not_shareable; }
 
index d108bd4c04be6bb315a3966c3f4a716d77a45504..c92ea3f567dec40d1a7a542dcf061f27d773a724 100644 (file)
@@ -53,7 +53,7 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(matrix, basic,
 //////////
 
 /** Default ctor.  Initializes to 1 x 1-dimensional zero-matrix. */
-matrix::matrix() : inherited(&matrix::tinfo_static), row(1), col(1), m(1, _ex0)
+matrix::matrix() : row(1), col(1), m(1, _ex0)
 {
        setflag(status_flags::not_shareable);
 }
@@ -68,8 +68,7 @@ matrix::matrix() : inherited(&matrix::tinfo_static), row(1), col(1), m(1, _ex0)
  *
  *  @param r number of rows
  *  @param c number of cols */
-matrix::matrix(unsigned r, unsigned c)
-  : inherited(&matrix::tinfo_static), row(r), col(c), m(r*c, _ex0)
+matrix::matrix(unsigned r, unsigned c) : row(r), col(c), m(r*c, _ex0)
 {
        setflag(status_flags::not_shareable);
 }
@@ -78,7 +77,7 @@ matrix::matrix(unsigned r, unsigned c)
 
 /** Ctor from representation, for internal use only. */
 matrix::matrix(unsigned r, unsigned c, const exvector & m2)
-  : inherited(&matrix::tinfo_static), row(r), col(c), m(m2)
+  : row(r), col(c), m(m2)
 {
        setflag(status_flags::not_shareable);
 }
@@ -88,7 +87,7 @@ matrix::matrix(unsigned r, unsigned c, const exvector & m2)
  *  If the list has more elements than the matrix, the excessive elements are
  *  thrown away. */
 matrix::matrix(unsigned r, unsigned c, const lst & l)
-  : inherited(&matrix::tinfo_static), row(r), col(c), m(r*c, _ex0)
+  : row(r), col(c), m(r*c, _ex0)
 {
        setflag(status_flags::not_shareable);
 
index 96b965d1c5d4fd996f54b2ea7d33ed583c163349..ad31139873cee8f2adc91a6b11681d55c75a653d 100644 (file)
@@ -53,7 +53,6 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(mul, expairseq,
 
 mul::mul()
 {
-       tinfo_key = &mul::tinfo_static;
 }
 
 //////////
@@ -64,7 +63,6 @@ mul::mul()
 
 mul::mul(const ex & lh, const ex & rh)
 {
-       tinfo_key = &mul::tinfo_static;
        overall_coeff = _ex1;
        construct_from_2_ex(lh,rh);
        GINAC_ASSERT(is_canonical());
@@ -72,7 +70,6 @@ mul::mul(const ex & lh, const ex & rh)
 
 mul::mul(const exvector & v)
 {
-       tinfo_key = &mul::tinfo_static;
        overall_coeff = _ex1;
        construct_from_exvector(v);
        GINAC_ASSERT(is_canonical());
@@ -80,7 +77,6 @@ mul::mul(const exvector & v)
 
 mul::mul(const epvector & v)
 {
-       tinfo_key = &mul::tinfo_static;
        overall_coeff = _ex1;
        construct_from_epvector(v);
        GINAC_ASSERT(is_canonical());
@@ -88,7 +84,6 @@ mul::mul(const epvector & v)
 
 mul::mul(const epvector & v, const ex & oc, bool do_index_renaming)
 {
-       tinfo_key = &mul::tinfo_static;
        overall_coeff = oc;
        construct_from_epvector(v, do_index_renaming);
        GINAC_ASSERT(is_canonical());
@@ -96,7 +91,6 @@ mul::mul(const epvector & v, const ex & oc, bool do_index_renaming)
 
 mul::mul(std::auto_ptr<epvector> vp, const ex & oc, bool do_index_renaming)
 {
-       tinfo_key = &mul::tinfo_static;
        GINAC_ASSERT(vp.get()!=0);
        overall_coeff = oc;
        construct_from_epvector(*vp, do_index_renaming);
@@ -105,7 +99,6 @@ mul::mul(std::auto_ptr<epvector> vp, const ex & oc, bool do_index_renaming)
 
 mul::mul(const ex & lh, const ex & mh, const ex & rh)
 {
-       tinfo_key = &mul::tinfo_static;
        exvector factors;
        factors.reserve(3);
        factors.push_back(lh);
index e0bc7dee4d12fe95c605b7aeedb4b1c7bd227774..2c0d736536367459a48dc9be689f73d3b895c190 100644 (file)
@@ -49,7 +49,6 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(ncmul, exprseq,
 
 ncmul::ncmul()
 {
-       tinfo_key = &ncmul::tinfo_static;
 }
 
 //////////
@@ -60,40 +59,33 @@ ncmul::ncmul()
 
 ncmul::ncmul(const ex & lh, const ex & rh) : inherited(lh,rh)
 {
-       tinfo_key = &ncmul::tinfo_static;
 }
 
 ncmul::ncmul(const ex & f1, const ex & f2, const ex & f3) : inherited(f1,f2,f3)
 {
-       tinfo_key = &ncmul::tinfo_static;
 }
 
 ncmul::ncmul(const ex & f1, const ex & f2, const ex & f3,
              const ex & f4) : inherited(f1,f2,f3,f4)
 {
-       tinfo_key = &ncmul::tinfo_static;
 }
 
 ncmul::ncmul(const ex & f1, const ex & f2, const ex & f3,
              const ex & f4, const ex & f5) : inherited(f1,f2,f3,f4,f5)
 {
-       tinfo_key = &ncmul::tinfo_static;
 }
 
 ncmul::ncmul(const ex & f1, const ex & f2, const ex & f3,
              const ex & f4, const ex & f5, const ex & f6) : inherited(f1,f2,f3,f4,f5,f6)
 {
-       tinfo_key = &ncmul::tinfo_static;
 }
 
 ncmul::ncmul(const exvector & v, bool discardable) : inherited(v,discardable)
 {
-       tinfo_key = &ncmul::tinfo_static;
 }
 
 ncmul::ncmul(std::auto_ptr<exvector> vp) : inherited(vp)
 {
-       tinfo_key = &ncmul::tinfo_static;
 }
 
 //////////
index 49951470475de6ccf9de61b97b9f76e03a259d88..5649353f308f68a0c26e715034b84977c5702979 100644 (file)
@@ -73,7 +73,7 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(numeric, basic,
 //////////
 
 /** default ctor. Numerically it initializes to an integer zero. */
-numeric::numeric() : basic(&numeric::tinfo_static)
+numeric::numeric()
 {
        value = cln::cl_I(0);
        setflag(status_flags::evaluated | status_flags::expanded);
@@ -85,7 +85,7 @@ numeric::numeric() : basic(&numeric::tinfo_static)
 
 // public
 
-numeric::numeric(int i) : basic(&numeric::tinfo_static)
+numeric::numeric(int i)
 {
        // Not the whole int-range is available if we don't cast to long
        // first.  This is due to the behaviour of the cl_I-ctor, which
@@ -106,7 +106,7 @@ numeric::numeric(int i) : basic(&numeric::tinfo_static)
 }
 
 
-numeric::numeric(unsigned int i) : basic(&numeric::tinfo_static)
+numeric::numeric(unsigned int i)
 {
        // Not the whole uint-range is available if we don't cast to ulong
        // first.  This is due to the behaviour of the cl_I-ctor, which
@@ -127,14 +127,14 @@ numeric::numeric(unsigned int i) : basic(&numeric::tinfo_static)
 }
 
 
-numeric::numeric(long i) : basic(&numeric::tinfo_static)
+numeric::numeric(long i)
 {
        value = cln::cl_I(i);
        setflag(status_flags::evaluated | status_flags::expanded);
 }
 
 
-numeric::numeric(unsigned long i) : basic(&numeric::tinfo_static)
+numeric::numeric(unsigned long i)
 {
        value = cln::cl_I(i);
        setflag(status_flags::evaluated | status_flags::expanded);
@@ -144,7 +144,7 @@ numeric::numeric(unsigned long i) : basic(&numeric::tinfo_static)
 /** Constructor for rational numerics a/b.
  *
  *  @exception overflow_error (division by zero) */
-numeric::numeric(long numer, long denom) : basic(&numeric::tinfo_static)
+numeric::numeric(long numer, long denom)
 {
        if (!denom)
                throw std::overflow_error("division by zero");
@@ -153,7 +153,7 @@ numeric::numeric(long numer, long denom) : basic(&numeric::tinfo_static)
 }
 
 
-numeric::numeric(double d) : basic(&numeric::tinfo_static)
+numeric::numeric(double d)
 {
        // We really want to explicitly use the type cl_LF instead of the
        // more general cl_F, since that would give us a cl_DF only which
@@ -165,7 +165,7 @@ numeric::numeric(double d) : basic(&numeric::tinfo_static)
 
 /** ctor from C-style string.  It also accepts complex numbers in GiNaC
  *  notation like "2+5*I". */
-numeric::numeric(const char *s) : basic(&numeric::tinfo_static)
+numeric::numeric(const char *s)
 {
        cln::cl_N ctorval = 0;
        // parse complex numbers (functional but not completely safe, unfortunately
@@ -244,7 +244,7 @@ numeric::numeric(const char *s) : basic(&numeric::tinfo_static)
 
 /** Ctor from CLN types.  This is for the initiated user or internal use
  *  only. */
-numeric::numeric(const cln::cl_N &z) : basic(&numeric::tinfo_static)
+numeric::numeric(const cln::cl_N &z)
 {
        value = z;
        setflag(status_flags::evaluated | status_flags::expanded);
index ca7fea549f43a9c316b67dd503a761be3eeb4024..ca9600f84b8b16e62fbe169ed982ebd5cde2d02b 100644 (file)
@@ -59,7 +59,7 @@ typedef std::vector<int> intvector;
 // default constructor
 //////////
 
-power::power() : inherited(&power::tinfo_static) { }
+power::power() { }
 
 //////////
 // other constructors
index a13f7fcfd211ba3344639b9e280e2d1084bb1b64..f8d29c0f24af75c51c91b22d09ddd071b2add4e0 100644 (file)
@@ -44,8 +44,8 @@ class power : public basic
        
        // other constructors
 public:
-       power(const ex & lh, const ex & rh) : inherited(&power::tinfo_static), basis(lh), exponent(rh) {}
-       template<typename T> power(const ex & lh, const T & rh) : inherited(&power::tinfo_static), basis(lh), exponent(rh) {}
+       power(const ex & lh, const ex & rh) :  basis(lh), exponent(rh) {}
+       template<typename T> power(const ex & lh, const T & rh) :  basis(lh), exponent(rh) {}
        
        // functions overriding virtual functions from base classes
 public:
index 3188dd2297790c801c9e3c1b219300353919e92b..989fda84afd6d6e61acc0c3d25c7f66cacc788e9 100644 (file)
@@ -52,7 +52,7 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(pseries, basic,
  *  Default constructor
  */
 
-pseries::pseries() : inherited(&pseries::tinfo_static) { }
+pseries::pseries() { }
 
 
 /*
@@ -68,7 +68,7 @@ pseries::pseries() : inherited(&pseries::tinfo_static) { }
  *  @param rel_  expansion variable and point (must hold a relational)
  *  @param ops_  vector of {coefficient, power} pairs (coefficient must not be zero)
  *  @return newly constructed pseries */
-pseries::pseries(const ex &rel_, const epvector &ops_) : basic(&pseries::tinfo_static), seq(ops_)
+pseries::pseries(const ex &rel_, const epvector &ops_) : seq(ops_)
 {
        GINAC_ASSERT(is_a<relational>(rel_));
        GINAC_ASSERT(is_a<symbol>(rel_.lhs()));
index f7790d9ef907d867419c7b9e734d2763b589367f..2bf97a5a48b8314250dee700b5a237365a23c709 100644 (file)
@@ -76,10 +76,6 @@ template<typename T> inline return_type_t make_return_type_t(const unsigned rl =
        return ret;
 }
 
-/** Definitions for the tinfo mechanism. */
-typedef const void * tinfo_t;
-struct tinfo_static_t {};
-
 /** Unarchiving function (static member function of every GiNaC class). */
 typedef ex (*unarch_func)(const archive_node &n, lst &sym_lst);
 
@@ -141,7 +137,6 @@ typedef class_info<registered_class_options> registered_class_info;
 #define GINAC_DECLARE_REGISTERED_CLASS_NO_CTORS(classname, supername) \
 public: \
        typedef supername inherited; \
-    static const GiNaC::tinfo_static_t tinfo_static; \
 private: \
        static GiNaC::registered_class_info reg_info; \
 public: \
@@ -184,20 +179,17 @@ private:
 
 /** Macro for inclusion in the implementation of each registered class. */
 #define GINAC_IMPLEMENT_REGISTERED_CLASS(classname, supername) \
-       GiNaC::registered_class_info classname::reg_info = GiNaC::registered_class_info(GiNaC::registered_class_options(#classname, #supername, typeid(classname), &classname::unarchive)); \
-       const GiNaC::tinfo_static_t classname::tinfo_static = {};
+       GiNaC::registered_class_info classname::reg_info = GiNaC::registered_class_info(GiNaC::registered_class_options(#classname, #supername, typeid(classname), &classname::unarchive)); 
 
 /** Macro for inclusion in the implementation of each registered class.
  *  Additional options can be specified. */
 #define GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(classname, supername, options) \
-       GiNaC::registered_class_info classname::reg_info = GiNaC::registered_class_info(GiNaC::registered_class_options(#classname, #supername, typeid(classname), &classname::unarchive).options); \
-       const GiNaC::tinfo_static_t classname::tinfo_static = {};
+       GiNaC::registered_class_info classname::reg_info = GiNaC::registered_class_info(GiNaC::registered_class_options(#classname, #supername, typeid(classname), &classname::unarchive).options);
 
 /** Macro for inclusion in the implementation of each registered class.
  *  Additional options can be specified. */
 #define GINAC_IMPLEMENT_REGISTERED_CLASS_OPT_T(classname, supername, options) \
-       GiNaC::registered_class_info classname::reg_info = GiNaC::registered_class_info(GiNaC::registered_class_options(#classname, #supername, typeid(classname), &classname::unarchive).options); \
-       template<> const GiNaC::tinfo_static_t classname::tinfo_static = {};
+       GiNaC::registered_class_info classname::reg_info = GiNaC::registered_class_info(GiNaC::registered_class_options(#classname, #supername, typeid(classname), &classname::unarchive).options);
 
 
 /** Find type information key by class name. */
index f3329f98824edc92dd6c3fd6739abb0b83353d0d..b59f7ab37981e662a33a0a18a27e512142268528 100644 (file)
@@ -40,7 +40,7 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(relational, basic,
 // default constructor
 //////////
 
-relational::relational() : basic(&relational::tinfo_static) {}
+relational::relational() }
 
 //////////
 // other constructors
@@ -48,7 +48,8 @@ relational::relational() : basic(&relational::tinfo_static) {}
 
 // public
 
-relational::relational(const ex & lhs, const ex & rhs, operators oper) : basic(&relational::tinfo_static), lh(lhs), rh(rhs), o(oper) {}
+relational::relational(const ex & lhs, const ex & rhs, operators oper) :
+       lh(lhs), rh(rhs), o(oper) { }
 
 //////////
 // archiving
index 6c08618c7c4a7752e4033b0db2dbe65213ec3456..3987d8068577aaf7c75d59c6f3c2ea2f622df09d 100644 (file)
@@ -117,13 +117,12 @@ class structure : public basic, public ComparisonPolicy<T> {
        GINAC_DECLARE_REGISTERED_CLASS(structure, basic)
 
        // helpers
-       static tinfo_t get_tinfo() { return reg_info.options.get_id(); }
        static const char *get_class_name() { return "structure"; }
 
        // constructors
 public:
        /** Construct structure as a copy of a given C++ structure. */
-       structure(const T & t) : inherited(get_tinfo()), obj(t) { }
+       structure(const T & t) : obj(t) { }
 
        // functions overriding virtual functions from base classes
        // All these are just defaults that can be specialized by the user
@@ -231,7 +230,7 @@ private:
 
 /** Default constructor */
 template <class T, template <class> class CP>
-structure<T, CP>::structure() : inherited(get_tinfo()) { }
+structure<T, CP>::structure() { }
 
 /** Construct object from archive_node. */
 template <class T, template <class> class CP>
index 0bdebc0e88a514416b6032b822b4f6392dd89eed..6ef9ade5f9a037b7186323864723091d41954766 100644 (file)
@@ -45,7 +45,7 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(symbol, basic,
 // symbol
 
 symbol::symbol()
- : inherited(&symbol::tinfo_static), serial(next_serial++), name(autoname_prefix() + ToString(serial)), TeX_name(name), domain(domain::complex), ret_type(return_types::commutative), ret_type_tinfo(make_return_type_t<symbol>())
+ :  serial(next_serial++), name(autoname_prefix() + ToString(serial)), TeX_name(name), domain(domain::complex), ret_type(return_types::commutative), ret_type_tinfo(make_return_type_t<symbol>())
 {
        setflag(status_flags::evaluated | status_flags::expanded);
 }
@@ -72,26 +72,32 @@ possymbol::possymbol()
 
 // symbol
 
-symbol::symbol(const std::string & initname, unsigned domain)
- : inherited(&symbol::tinfo_static), serial(next_serial++), name(initname), TeX_name(default_TeX_name()), domain(domain), ret_type(return_types::commutative), ret_type_tinfo(make_return_type_t<symbol>())
+symbol::symbol(const std::string & initname, unsigned domain) :
+       serial(next_serial++), name(initname), TeX_name(default_TeX_name()),
+       domain(domain), ret_type(return_types::commutative),
+       ret_type_tinfo(make_return_type_t<symbol>())
 {
        setflag(status_flags::evaluated | status_flags::expanded);
 }
 
-symbol::symbol(const std::string & initname, unsigned rt, const return_type_t& rtt, unsigned domain)
- : inherited(&symbol::tinfo_static), serial(next_serial++), name(initname), TeX_name(default_TeX_name()), domain(domain), ret_type(rt), ret_type_tinfo(rtt)
+symbol::symbol(const std::string & initname, unsigned rt, const return_type_t& rtt, unsigned domain) :
+       serial(next_serial++), name(initname), TeX_name(default_TeX_name()),
+       domain(domain), ret_type(rt), ret_type_tinfo(rtt)
 {
        setflag(status_flags::evaluated | status_flags::expanded);
 }
 
-symbol::symbol(const std::string & initname, const std::string & texname, unsigned domain)
- : inherited(&symbol::tinfo_static), serial(next_serial++), name(initname), TeX_name(texname), domain(domain), ret_type(return_types::commutative), ret_type_tinfo(make_return_type_t<symbol>())
+symbol::symbol(const std::string & initname, const std::string & texname, unsigned domain) :
+       serial(next_serial++), name(initname), TeX_name(texname), domain(domain),
+       ret_type(return_types::commutative), ret_type_tinfo(make_return_type_t<symbol>())
 {
        setflag(status_flags::evaluated | status_flags::expanded);
 }
 
-symbol::symbol(const std::string & initname, const std::string & texname, unsigned rt, const return_type_t& rtt, unsigned domain)
- : inherited(&symbol::tinfo_static),  serial(next_serial++), name(initname), TeX_name(texname), domain(domain), ret_type(rt), ret_type_tinfo(rtt)
+symbol::symbol(const std::string & initname, const std::string & texname,
+              unsigned rt, const return_type_t& rtt, unsigned domain) : 
+       serial(next_serial++), name(initname), TeX_name(texname),
+       domain(domain), ret_type(rt), ret_type_tinfo(rtt)
 {
        setflag(status_flags::evaluated | status_flags::expanded);
 }
index 9a1589267a09e467ccf313c0aa85b7d2e42a8bd8..dd3029e5b48be96ed682b5432de4513940b1a796 100644 (file)
@@ -56,7 +56,7 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(symmetry, basic,
 // default constructor
 //////////
 
-symmetry::symmetry() : inherited(&symmetry::tinfo_static), type(none)
+symmetry::symmetry() :  type(none)
 {
        setflag(status_flags::evaluated | status_flags::expanded);
 }
@@ -65,13 +65,13 @@ symmetry::symmetry() : inherited(&symmetry::tinfo_static), type(none)
 // other constructors
 //////////
 
-symmetry::symmetry(unsigned i) : inherited(&symmetry::tinfo_static), type(none)
+symmetry::symmetry(unsigned i) :  type(none)
 {
        indices.insert(i);
        setflag(status_flags::evaluated | status_flags::expanded);
 }
 
-symmetry::symmetry(symmetry_type t, const symmetry &c1, const symmetry &c2) : inherited(&symmetry::tinfo_static), type(t)
+symmetry::symmetry(symmetry_type t, const symmetry &c1, const symmetry &c2) :  type(t)
 {
        add(c1); add(c2);
        setflag(status_flags::evaluated | status_flags::expanded);
index 462ba2c7a8b909a61ece0113d779e76d1aed6812..22b3e73040f371c732bc90b1c9ef95e6f24037d3 100644 (file)
@@ -64,7 +64,7 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(tensepsilon, tensor,
 // constructors
 //////////
 
-tensor::tensor() : inherited(&tensor::tinfo_static)
+tensor::tensor()
 {
        setflag(status_flags::evaluated | status_flags::expanded);
 }
@@ -74,27 +74,22 @@ DEFAULT_CTOR(tensmetric)
 
 minkmetric::minkmetric() : pos_sig(false)
 {
-       tinfo_key = &minkmetric::tinfo_static;
 }
 
 spinmetric::spinmetric()
 {
-       tinfo_key = &spinmetric::tinfo_static;
 }
 
 minkmetric::minkmetric(bool ps) : pos_sig(ps)
 {
-       tinfo_key = &minkmetric::tinfo_static;
 }
 
 tensepsilon::tensepsilon() : minkowski(false), pos_sig(false)
 {
-       tinfo_key = &tensepsilon::tinfo_static;
 }
 
 tensepsilon::tensepsilon(bool mink, bool ps) : minkowski(mink), pos_sig(ps)
 {
-       tinfo_key = &tensepsilon::tinfo_static;
 }
 
 //////////
index daf869e67f98140d93665f3258c6640d9bb77c54..37deaa5b968490d6b174465486c35ba7fe11fc62 100644 (file)
@@ -35,10 +35,6 @@ class tensor : public basic
 {
        GINAC_DECLARE_REGISTERED_CLASS(tensor, basic)
 
-       // other constructors
-protected:
-       tensor(tinfo_t ti) : inherited(ti) {}
-
        // functions overriding virtual functions from base classes
 protected:
        unsigned return_type() const { return return_types::noncommutative_composite; }
index 3c293ea8c5e2e3f7b42391e701f780d3e064acdd..c5d7e03d40bee0c9213c02524e0915f11cc0aa78 100644 (file)
@@ -405,7 +405,7 @@ extern const ex _ex120;
 // Helper macros for class implementations (mostly useful for trivial classes)
 
 #define DEFAULT_CTOR(classname) \
-classname::classname() : inherited(&classname::tinfo_static) { setflag(status_flags::evaluated | status_flags::expanded); }
+classname::classname() { setflag(status_flags::evaluated | status_flags::expanded); }
 
 #define DEFAULT_UNARCHIVE(classname) \
 ex classname::unarchive(const archive_node &n, lst &sym_lst) \
index 4a89957bcaaf4cb90b30f6e9acf19b7f42971a92..50eb67b7602035eb1aa3ea199a4bff4f5c8a960b 100644 (file)
@@ -37,7 +37,7 @@ GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(wildcard, basic,
 // default constructor
 //////////
 
-wildcard::wildcard() : inherited(&wildcard::tinfo_static), label(0)
+wildcard::wildcard() : label(0)
 {
        setflag(status_flags::evaluated | status_flags::expanded);
 }
@@ -46,7 +46,7 @@ wildcard::wildcard() : inherited(&wildcard::tinfo_static), label(0)
 // other constructors
 //////////
 
-wildcard::wildcard(unsigned l) : inherited(&wildcard::tinfo_static), label(l)
+wildcard::wildcard(unsigned l) : label(l)
 {
        setflag(status_flags::evaluated | status_flags::expanded);
 }