X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=blobdiff_plain;f=ginac%2Fstructure.h;h=1f7eaea07e6c89bfaee9eac0f18fdfd9f54118d8;hp=0ec0b6cdf3355627d0d17d4ed7df8ff6340ba802;hb=fbdd5eefb7188778ca9c04b5bee08223609b880f;hpb=383d5eb3b0f0506810d9105a268f939125bfc347 diff --git a/ginac/structure.h b/ginac/structure.h index 0ec0b6cd..1f7eaea0 100644 --- a/ginac/structure.h +++ b/ginac/structure.h @@ -25,9 +25,7 @@ #include "basic.h" -#ifndef NO_NAMESPACE_GINAC namespace GiNaC { -#endif // ndef NO_NAMESPACE_GINAC struct registered_structure_info { const char * name; @@ -41,53 +39,21 @@ struct registered_structure_info { 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 - - // functions overriding virtual functions from bases classes + GINAC_DECLARE_REGISTERED_CLASS(structure, basic) + + // functions overriding virtual functions from base 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; + void print(const print_context & c, unsigned level=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_structures(void); public: static unsigned register_new(const char * nm); - -// member variables -// none - }; -// global constants - -extern const structure some_structure; -extern const std::type_info & typeid_structure; - -#ifndef NO_NAMESPACE_GINAC } // namespace GiNaC -#endif // ndef NO_NAMESPACE_GINAC #endif // ndef __GINAC_STRUCTURE_H__