#include "utils.h"
#include "debugmsg.h"
-#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_NAMESPACE_GINAC
GINAC_IMPLEMENT_REGISTERED_CLASS(idx, basic)
name=autoname_prefix()+ToString(serial);
}
-idx::~idx()
-{
- debugmsg("idx destructor",LOGLEVEL_DESTRUCT);
- destroy(false);
-}
-
-idx::idx(const idx & other)
-{
- debugmsg("idx copy constructor",LOGLEVEL_CONSTRUCT);
- copy(other);
-}
-
-const idx & idx::operator=(const idx & other)
-{
- debugmsg("idx operator=",LOGLEVEL_ASSIGNMENT);
- if (this != &other) {
- destroy(true);
- copy(other);
- }
- return *this;
-}
-
// protected
void idx::copy(const idx & other)
// public
-basic * idx::duplicate() const
-{
- debugmsg("idx duplicate",LOGLEVEL_DUPLICATE);
- return new idx(*this);
-}
-
void idx::printraw(std::ostream & os) const
{
debugmsg("idx printraw",LOGLEVEL_PRINT);
int idx::compare_same_type(const basic & other) const
{
GINAC_ASSERT(is_of_type(other,idx));
- const idx &o = static_cast<const idx &>(&other);
+ const idx &o = static_cast<const idx &>(other);
if (covariant!=o.covariant) {
// different co/contravariant
return res;
}
-#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_NAMESPACE_GINAC