X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fmul.h;h=19dad491c701eb65bd68ebd6ec77e910cdfb2da0;hp=ee1993764e421598b5dc75f02ceb3a4f1c979d92;hb=0a68f1165c65a61d6f6ab6ef47485c9c8193b560;hpb=a8507b8af1c08d9b27d98d57f95c7ca1a8671e27 diff --git a/ginac/mul.h b/ginac/mul.h index ee199376..19dad491 100644 --- a/ginac/mul.h +++ b/ginac/mul.h @@ -1,7 +1,8 @@ /** @file mul.h * - * Interface to GiNaC's products of expressions. - * + * Interface to GiNaC's products of expressions. */ + +/* * GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany * * This program is free software; you can redistribute it and/or modify @@ -22,7 +23,9 @@ #ifndef __GINAC_MUL_H__ #define __GINAC_MUL_H__ -class mul; +#include + +namespace GiNaC { /** Product of expressions. */ class mul : public expairseq @@ -79,8 +82,6 @@ protected: unsigned return_type_tinfo(void) const; ex thisexpairseq(epvector const & v, ex const & oc) const; ex thisexpairseq(epvector * vp, ex const & oc) const; - void printpair(ostream & os, expair const & p, - unsigned upper_precedence) const; expair split_ex_to_pair(ex const & e) const; expair combine_ex_with_coeff_to_pair(ex const & e, ex const & c) const; @@ -112,7 +113,12 @@ protected: extern const mul some_mul; extern type_info const & typeid_mul; -#define ex_to_mul(X) static_cast(*(X).bp) +// utility functions +inline const mul &ex_to_mul(const ex &e) +{ + return static_cast(*e.bp); +} -#endif // ndef __GINAC_MUL_H__ +} // namespace GiNaC +#endif // ndef __GINAC_MUL_H__