|
GiNaC
1.6.2
|
GiNaC's class registrar (for class basic and all classes derived from it). More...
#include "class_info.h"#include "print.h"#include <list>#include <string>#include <typeinfo>#include <vector>Go to the source code of this file.
Classes | |
| struct | GiNaC::return_type_t |
| To distinguish between different kinds of non-commutative objects. More... | |
| class | GiNaC::registered_class_options |
| This class stores information about a registered GiNaC class. More... | |
Namespaces | |
| namespace | GiNaC |
CRC32 hash function. | |
Defines | |
| #define | GINAC_DECLARE_REGISTERED_CLASS_NO_CTORS(classname, supername) |
| Primary macro for inclusion in the declaration of each registered class. | |
| #define | GINAC_DECLARE_REGISTERED_CLASS(classname, supername) |
| Macro for inclusion in the declaration of each registered class. | |
| #define | GINAC_IMPLEMENT_REGISTERED_CLASS(classname, supername) GiNaC::registered_class_info classname::reg_info = GiNaC::registered_class_info(GiNaC::registered_class_options(#classname, #supername, typeid(classname))); |
| Macro for inclusion in the implementation of each registered class. | |
| #define | GINAC_IMPLEMENT_REGISTERED_CLASS_OPT(classname, supername, options) GiNaC::registered_class_info classname::reg_info = GiNaC::registered_class_info(GiNaC::registered_class_options(#classname, #supername, typeid(classname)).options); |
| Macro for inclusion in the implementation of each registered class. | |
| #define | GINAC_IMPLEMENT_REGISTERED_CLASS_OPT_T(classname, supername, options) GiNaC::registered_class_info classname::reg_info = GiNaC::registered_class_info(GiNaC::registered_class_options(#classname, #supername, typeid(classname)).options); |
| Macro for inclusion in the implementation of each registered class. | |
Typedefs | |
| typedef class_info < registered_class_options > | GiNaC::registered_class_info |
Functions | |
| template<typename T > | |
| return_type_t | GiNaC::make_return_type_t (const unsigned rl=0) |
| template<class Alg , class Ctx , class T , class C > | |
| void | GiNaC::set_print_func (void f(const T &, const C &c, unsigned)) |
| Add or replace a print method. | |
| template<class Alg , class Ctx , class T , class C > | |
| void | GiNaC::set_print_func (void(T::*f)(const C &, unsigned)) |
| Add or replace a print method. | |
GiNaC's class registrar (for class basic and all classes derived from it).
Definition in file registrar.h.
| #define GINAC_DECLARE_REGISTERED_CLASS_NO_CTORS | ( | classname, | |
| supername | |||
| ) |
public: \ typedef supername inherited; \ private: \ static GiNaC::registered_class_info reg_info; \ public: \ static GiNaC::registered_class_info &get_class_info_static() { return reg_info; } \ virtual const GiNaC::registered_class_info &get_class_info() const { return classname::get_class_info_static(); } \ virtual GiNaC::registered_class_info &get_class_info() { return classname::get_class_info_static(); } \ virtual const char *class_name() const { return classname::get_class_info_static().options.get_name(); } \ class visitor { \ public: \ virtual void visit(const classname &) = 0; \ virtual ~visitor() {}; \ };
Primary macro for inclusion in the declaration of each registered class.
Definition at line 130 of file registrar.h.
| #define GINAC_DECLARE_REGISTERED_CLASS | ( | classname, | |
| supername | |||
| ) |
GINAC_DECLARE_REGISTERED_CLASS_NO_CTORS(classname, supername) \ public: \ classname(); \ virtual classname * duplicate() const { return new classname(*this); } \ \ virtual void accept(GiNaC::visitor & v) const \ { \ if (visitor *p = dynamic_cast<visitor *>(&v)) \ p->visit(*this); \ else \ inherited::accept(v); \ } \ protected: \ virtual int compare_same_type(const GiNaC::basic & other) const; \ private:
Macro for inclusion in the declaration of each registered class.
It declares some functions that are common to all classes derived from 'basic' as well as all required stuff for the GiNaC class registry (mainly needed for archiving).
Definition at line 150 of file registrar.h.
| #define GINAC_IMPLEMENT_REGISTERED_CLASS | ( | classname, | |
| supername | |||
| ) | GiNaC::registered_class_info classname::reg_info = GiNaC::registered_class_info(GiNaC::registered_class_options(#classname, #supername, typeid(classname))); |
Macro for inclusion in the implementation of each registered class.
Definition at line 169 of file registrar.h.
| #define GINAC_IMPLEMENT_REGISTERED_CLASS_OPT | ( | classname, | |
| supername, | |||
| options | |||
| ) | GiNaC::registered_class_info classname::reg_info = GiNaC::registered_class_info(GiNaC::registered_class_options(#classname, #supername, typeid(classname)).options); |
Macro for inclusion in the implementation of each registered class.
Additional options can be specified.
Definition at line 174 of file registrar.h.
| #define GINAC_IMPLEMENT_REGISTERED_CLASS_OPT_T | ( | classname, | |
| supername, | |||
| options | |||
| ) | GiNaC::registered_class_info classname::reg_info = GiNaC::registered_class_info(GiNaC::registered_class_options(#classname, #supername, typeid(classname)).options); |
Macro for inclusion in the implementation of each registered class.
Additional options can be specified.
Definition at line 179 of file registrar.h.