* Interface to 'abstract' class structure. */
/*
- * GiNaC Copyright (C) 1999-2000 Johannes Gutenberg University Mainz, Germany
+ * GiNaC Copyright (C) 1999-2001 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
#include "basic.h"
-#ifndef NO_NAMESPACE_GINAC
namespace GiNaC {
-#endif // ndef NO_NAMESPACE_GINAC
struct registered_structure_info {
const char * name;
class structure : public basic
{
-// member functions
-
- // default constructor, destructor, copy constructor assignment operator and helpers
-public:
- structure();
- ~structure();
- structure(const structure & other);
- const structure & operator=(const structure & other);
-protected:
- void copy(const structure & other);
- void destroy(bool call_parent);
-
- // other constructors
- // none
-
+ GINAC_DECLARE_REGISTERED_CLASS(structure, basic)
+
// functions overriding virtual functions from bases classes
public:
- basic * duplicate() const;
void printraw(std::ostream & os) const;
void print(std::ostream & os, unsigned upper_precedence=0) const;
void printtree(std::ostream & os, unsigned indent) const;
void printcsrc(std::ostream & os, unsigned type, unsigned upper_precedence=0) const;
protected:
- int compare_same_type(const basic & other) const;
bool is_equal_same_type(const basic & other) const;
- // new virtual functions which can be overridden by derived classes
- // none
-
// non-virtual functions in this class
protected:
static std::vector<registered_structure_info> & registered_structures(void);
public:
static unsigned register_new(const char * nm);
-
-// member variables
-// none
-
};
-// global constants
-
-extern const structure some_structure;
-extern const type_info & typeid_structure;
-
-#ifndef NO_NAMESPACE_GINAC
} // namespace GiNaC
-#endif // ndef NO_NAMESPACE_GINAC
#endif // ndef __GINAC_STRUCTURE_H__