X-Git-Url: https://ginac.de/ginac.git//ginac.git?a=blobdiff_plain;ds=inline;f=ginac%2Florentzidx.h;h=8ff27764728ac7dae1fe666876087fef2cce4753;hb=55d35dcf72dc411c8265628fcad2bd67d320a8c9;hp=260296efe7883c5cc19de06249239bbf6b88ce06;hpb=afdd7fa8c6c0a587f7c80789198551383e8beb7b;p=ginac.git diff --git a/ginac/lorentzidx.h b/ginac/lorentzidx.h index 260296ef..8ff27764 100644 --- a/ginac/lorentzidx.h +++ b/ginac/lorentzidx.h @@ -3,7 +3,7 @@ * Interface to GiNaC's lorentz indices. */ /* - * GiNaC Copyright (C) 1999 Johannes Gutenberg University Mainz, Germany + * GiNaC Copyright (C) 1999-2000 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 @@ -25,14 +25,16 @@ #include #include -#include +#include "idx.h" -#ifndef NO_GINAC_NAMESPACE +#ifndef NO_NAMESPACE_GINAC namespace GiNaC { -#endif // ndef NO_GINAC_NAMESPACE +#endif // ndef NO_NAMESPACE_GINAC class lorentzidx : public idx { + GINAC_DECLARE_REGISTERED_CLASS(lorentzidx, idx) + friend class simp_lor; friend class scalar_products; @@ -42,27 +44,27 @@ class lorentzidx : public idx public: lorentzidx(); ~lorentzidx(); - lorentzidx (lorentzidx const & other); - lorentzidx const & operator=(lorentzidx const & other); + lorentzidx (const lorentzidx & other); + const lorentzidx & operator=(const lorentzidx & other); protected: - void copy(lorentzidx const & other); + void copy(const lorentzidx & other); void destroy(bool call_parent); // other constructors public: explicit lorentzidx(bool cov, bool oonly=false, unsigned dimp=0); - explicit lorentzidx(string const & n, bool cov=false, + explicit lorentzidx(const std::string & n, bool cov=false, bool oonly=false, unsigned dimp=0); - explicit lorentzidx(char const * n, bool cov=false, + explicit lorentzidx(const char * n, bool cov=false, bool oonly=false, unsigned dimp=0); - explicit lorentzidx(unsigned const v, bool cov=false); + explicit lorentzidx(unsigned v, bool cov=false); // functions overriding virtual functions from bases classes public: basic * duplicate() const; - void printraw(ostream & os) const; - void printtree(ostream & os, unsigned indent) const; - void print(ostream & os, unsigned upper_precedence=0) const; + void printraw(std::ostream & os) const; + void printtree(std::ostream & os, unsigned indent) const; + void print(std::ostream & os, unsigned upper_precedence=0) const; bool info(unsigned inf) const; // new virtual functions which can be overridden by derived classes @@ -83,7 +85,7 @@ protected: // global constants extern const lorentzidx some_lorentzidx; -extern type_info const & typeid_lorentzidx; +extern const type_info & typeid_lorentzidx; // utility functions inline const lorentzidx &ex_to_lorentzidx(const ex &e) @@ -91,8 +93,8 @@ inline const lorentzidx &ex_to_lorentzidx(const ex &e) return static_cast(*e.bp); } -#ifndef NO_GINAC_NAMESPACE +#ifndef NO_NAMESPACE_GINAC } // namespace GiNaC -#endif // ndef NO_GINAC_NAMESPACE +#endif // ndef NO_NAMESPACE_GINAC #endif // ndef __GINAC_LORENTZIDX_H__