X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Futils.cpp;h=7291021d50cca6b4c18253b70d7e04ece40f63a4;hp=31aaa5a7dfa4b54ee52ed2adf4407d7cc2c9be56;hb=1c5f50be3b99721e70d51cb3c18f556d71f99861;hpb=27d6204effdef95a00af461fff98024e290dbaa7 diff --git a/ginac/utils.cpp b/ginac/utils.cpp index 31aaa5a7..7291021d 100644 --- a/ginac/utils.cpp +++ b/ginac/utils.cpp @@ -4,7 +4,7 @@ * but not of any interest to the user of the library. */ /* - * GiNaC Copyright (C) 1999-2001 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2003 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -39,7 +39,7 @@ pole_error::pole_error(const std::string& what_arg, int degree) : domain_error(what_arg), deg(degree) { } /** Return the degree of the pole_error exception class. */ -int pole_error::degree(void) const +int pole_error::degree() const { return deg; } @@ -187,6 +187,7 @@ const ex _ex_1_4= _num_1_4; // static numeric 0 const numeric *_num0_p; +const basic *_num0_bp; const numeric &_num0 = *_num0_p; const ex _ex0 = _num0; @@ -340,6 +341,7 @@ library_init::library_init() _num_1_3_p= reinterpret_cast(&((new numeric(-1,3))->setflag(status_flags::dynallocated))); _num_1_4_p= reinterpret_cast(&((new numeric(-1,4))->setflag(status_flags::dynallocated))); _num0_p = reinterpret_cast(&((new numeric(0))->setflag(status_flags::dynallocated))); + _num0_bp = _num0_p; _num1_4_p = reinterpret_cast(&((new numeric(1,4))->setflag(status_flags::dynallocated))); _num1_3_p = reinterpret_cast(&((new numeric(1,3))->setflag(status_flags::dynallocated))); _num1_2_p = reinterpret_cast(&((new numeric(1,2))->setflag(status_flags::dynallocated))); @@ -364,6 +366,21 @@ library_init::library_init() _num48_p = reinterpret_cast(&((new numeric(48))->setflag(status_flags::dynallocated))); _num60_p = reinterpret_cast(&((new numeric(60))->setflag(status_flags::dynallocated))); _num120_p = reinterpret_cast(&((new numeric(120))->setflag(status_flags::dynallocated))); + + // Initialize print context class info (this is not strictly necessary + // but we do it anyway to make print_context_class_info::dump_hierarchy() + // output the whole hierarchy whether or not the classes are actually + // used) + print_context::get_class_info_static(); + print_dflt::get_class_info_static(); + print_latex::get_class_info_static(); + print_python::get_class_info_static(); + print_python_repr::get_class_info_static(); + print_tree::get_class_info_static(); + print_csrc::get_class_info_static(); + print_csrc_float::get_class_info_static(); + print_csrc_double::get_class_info_static(); + print_csrc_cl_N::get_class_info_static(); } } @@ -384,10 +401,10 @@ library_init::~library_init() // member functions - // default ctor, dtor, copy ctor assignment operator and helpers + // default constructor, destructor, copy constructor and assignment operator // none - // other ctors + // other constructors // none // functions overriding virtual functions from base classes @@ -408,14 +425,14 @@ library_init::~library_init() ////////// -// default ctor, dtor, copy ctor assignment operator and helpers +// default constructor, destructor, copy constructor and assignment operator ////////// // public // protected ////////// -// other ctors +// other constructors ////////// // public