GiNaC 1.8.7
Classes | Namespaces | Macros | Typedefs | Functions
print.h File Reference

Definition of helper classes for expression output. More...

#include "class_info.h"
#include <iosfwd>
#include <memory>
#include <string>

Go to the source code of this file.

Classes

class  GiNaC::print_context_options
 This class stores information about a registered print_context class. More...
 
class  GiNaC::print_options
 Flags to control the behavior of a print_context. More...
 
class  GiNaC::print_context
 Base class for print_contexts. More...
 
class  GiNaC::print_dflt
 Context for default (ginsh-parsable) output. More...
 
class  GiNaC::print_latex
 Context for latex-parsable output. More...
 
class  GiNaC::print_python
 Context for python pretty-print output. More...
 
class  GiNaC::print_python_repr
 Context for python-parsable output. More...
 
class  GiNaC::print_tree
 Context for tree-like output for debugging. More...
 
class  GiNaC::print_csrc
 Base context for C source output. More...
 
class  GiNaC::print_csrc_float
 Context for C source output using float precision. More...
 
class  GiNaC::print_csrc_double
 Context for C source output using double precision. More...
 
class  GiNaC::print_csrc_cl_N
 Context for C source output using CLN numbers. More...
 
class  GiNaC::print_functor_impl
 Base class for print_functor handlers. More...
 
class  GiNaC::print_ptrfun_handler< T, C >
 print_functor handler for pointer-to-functions of class T, context type C More...
 
class  GiNaC::print_memfun_handler< T, C >
 print_functor handler for member functions of class T, context type C More...
 
class  GiNaC::print_functor
 This class represents a print method for a certain algebraic class and print_context type. More...
 

Namespaces

namespace  GiNaC
 

Macros

#define GINAC_DECLARE_PRINT_CONTEXT_COMMON(classname)
 Common part of GINAC_DECLARE_PRINT_CONTEXT_BASE and GINAC_DECLARE_PRINT_CONTEXT_DERIVED. More...
 
#define GINAC_DECLARE_PRINT_CONTEXT_BASE(classname)
 
#define GINAC_DECLARE_PRINT_CONTEXT(classname, supername)
 Macro for inclusion in the declaration of a print_context class. More...
 
#define GINAC_IMPLEMENT_PRINT_CONTEXT(classname, supername)
 Macro for inclusion in the implementation of each print_context class. More...
 

Typedefs

typedef class_info< print_context_options > GiNaC::print_context_class_info
 

Functions

template<class T >
bool GiNaC::is_a (const print_context &obj)
 Check if obj is a T, including base classes. More...
 

Detailed Description

Definition of helper classes for expression output.

Definition in file print.h.

Macro Definition Documentation

◆ GINAC_DECLARE_PRINT_CONTEXT_COMMON

#define GINAC_DECLARE_PRINT_CONTEXT_COMMON (   classname)
Value:
public: \
friend class function_options; \
friend class registered_class_options; \
static const GiNaC::print_context_class_info &get_class_info_static(); \
classname();

Common part of GINAC_DECLARE_PRINT_CONTEXT_BASE and GINAC_DECLARE_PRINT_CONTEXT_DERIVED.

Definition at line 63 of file print.h.

◆ GINAC_DECLARE_PRINT_CONTEXT_BASE

#define GINAC_DECLARE_PRINT_CONTEXT_BASE (   classname)
Value:
virtual const GiNaC::print_context_class_info &get_class_info() const { return classname::get_class_info_static(); } \
virtual const char *class_name() const { return classname::get_class_info_static().options.get_name(); } \
virtual classname * duplicate() const { return new classname(*this); } \
private:
#define GINAC_DECLARE_PRINT_CONTEXT_COMMON(classname)
Common part of GINAC_DECLARE_PRINT_CONTEXT_BASE and GINAC_DECLARE_PRINT_CONTEXT_DERIVED.
Definition: print.h:63

Definition at line 70 of file print.h.

◆ GINAC_DECLARE_PRINT_CONTEXT

#define GINAC_DECLARE_PRINT_CONTEXT (   classname,
  supername 
)
Value:
typedef supername inherited; \
const GiNaC::print_context_class_info &get_class_info() const override { return classname::get_class_info_static(); } \
const char *class_name() const override { return classname::get_class_info_static().options.get_name(); } \
classname * duplicate() const override { return new classname(*this); } \
private:

Macro for inclusion in the declaration of a print_context class.

It declares some functions that are common to all classes derived from 'print_context' as well as all required stuff for the GiNaC registry.

Definition at line 81 of file print.h.

◆ GINAC_IMPLEMENT_PRINT_CONTEXT

#define GINAC_IMPLEMENT_PRINT_CONTEXT (   classname,
  supername 
)
Value:
const GiNaC::print_context_class_info &classname::get_class_info_static() \
{ \
return reg_info; \
}
This class stores information about a registered print_context class.
Definition: print.h:35
unsigned next_print_context_id
Next free ID for print_context types.
Definition: print.cpp:30
class_info< print_context_options > print_context_class_info
Definition: print.h:50

Macro for inclusion in the implementation of each print_context class.

Definition at line 90 of file print.h.


This page is part of the GiNaC developer's reference. It was generated automatically by doxygen. For an introduction, see the tutorial.