X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fbasic.h;h=ae8104769fcfc4e043b6848649e6a020c2b65319;hp=a0e3f6ed94021f9012118bd3b248c1bd43c161fe;hb=afdd7fa8c6c0a587f7c80789198551383e8beb7b;hpb=48b41ea321ed9fa6115a1061d1a1d2f8d8ad0400 diff --git a/ginac/basic.h b/ginac/basic.h index a0e3f6ed..ae810476 100644 --- a/ginac/basic.h +++ b/ginac/basic.h @@ -27,11 +27,16 @@ #include #include +// CINT needs to work properly with +#include + #include #include #include +#ifndef NO_GINAC_NAMESPACE namespace GiNaC { +#endif // ndef NO_GINAC_NAMESPACE class basic; class ex; @@ -39,7 +44,8 @@ class symbol; class lst; class numeric; -typedef vector exvector; +//typedef vector exvector; +typedef vector exvector; // CINT does not like vector<...,default_alloc> #define INLINE_BASIC_CONSTRUCTORS @@ -180,6 +186,8 @@ extern int max_recursion_level; // convenience macros +#ifndef NO_GINAC_NAMESPACE + #define is_of_type(OBJ,TYPE) \ (dynamic_cast(const_cast(&OBJ))!=0) @@ -192,6 +200,25 @@ extern int max_recursion_level; #define is_ex_exactly_of_type(OBJ,TYPE) \ ((*(OBJ).bp).tinfo()==GiNaC::TINFO_##TYPE) +#else // ndef NO_GINAC_NAMESPACE + +#define is_of_type(OBJ,TYPE) \ + (dynamic_cast(const_cast(&OBJ))!=0) + +#define is_exactly_of_type(OBJ,TYPE) \ + ((OBJ).tinfo()==TINFO_##TYPE) + +#define is_ex_of_type(OBJ,TYPE) \ + (dynamic_cast(const_cast((OBJ).bp))!=0) + +#define is_ex_exactly_of_type(OBJ,TYPE) \ + ((*(OBJ).bp).tinfo()==TINFO_##TYPE) + +#endif // ndef NO_GINAC_NAMESPACE + +#ifndef NO_GINAC_NAMESPACE } // namespace GiNaC +#endif // ndef NO_GINAC_NAMESPACE #endif // ndef __GINAC_BASIC_H__ +