GiNaC 1.8.7
Public Member Functions | Private Attributes | List of all members
GiNaC::print_functor Class Reference

This class represents a print method for a certain algebraic class and print_context type. More...

#include <print.h>

Public Member Functions

 print_functor ()
 
 print_functor (const print_functor &other)
 
 print_functor (std::unique_ptr< print_functor_impl > impl_)
 
template<class T , class C >
 print_functor (void f(const T &, const C &, unsigned))
 
template<class T , class C >
 print_functor (void(T::*f)(const C &, unsigned) const)
 
print_functoroperator= (const print_functor &other)
 
void operator() (const basic &obj, const print_context &c, unsigned level) const
 
bool is_valid () const
 

Private Attributes

std::unique_ptr< print_functor_implimpl
 

Detailed Description

This class represents a print method for a certain algebraic class and print_context type.

Its main purpose is to hide the difference between member functions and nonmember functions behind one unified operator() interface. print_functor has value semantics and acts as a smart pointer (with deep copy) to a class derived from print_functor_impl which implements the actual function call.

Definition at line 248 of file print.h.

Constructor & Destructor Documentation

◆ print_functor() [1/5]

GiNaC::print_functor::print_functor ( )
inline

Definition at line 250 of file print.h.

◆ print_functor() [2/5]

GiNaC::print_functor::print_functor ( const print_functor other)
inline

Definition at line 251 of file print.h.

◆ print_functor() [3/5]

GiNaC::print_functor::print_functor ( std::unique_ptr< print_functor_impl impl_)
inline

Definition at line 252 of file print.h.

◆ print_functor() [4/5]

template<class T , class C >
GiNaC::print_functor::print_functor ( void   fconst T &, const C &, unsigned)
inline

Definition at line 255 of file print.h.

◆ print_functor() [5/5]

template<class T , class C >
GiNaC::print_functor::print_functor ( void(T::*)(const C &, unsigned) const  f)
inline

Definition at line 258 of file print.h.

Member Function Documentation

◆ operator=()

print_functor & GiNaC::print_functor::operator= ( const print_functor other)
inline

Definition at line 260 of file print.h.

References impl.

◆ operator()()

void GiNaC::print_functor::operator() ( const basic obj,
const print_context c,
unsigned  level 
) const
inline

Definition at line 269 of file print.h.

References c.

◆ is_valid()

bool GiNaC::print_functor::is_valid ( ) const
inline

Definition at line 274 of file print.h.

References impl.

Member Data Documentation

◆ impl

std::unique_ptr<print_functor_impl> GiNaC::print_functor::impl
private

Definition at line 277 of file print.h.

Referenced by is_valid(), and operator=().


The documentation for this class was generated from the following file:

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