Cadabra
Computer algebra system for field theory problems
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
ServerWrapper Class Reference

Description

A class which enables access to a Python-side defined Server object with ProgressMonitor interface.

It forwards calls on the group/progress members via Boost.Python to the Python defined Server object, thereby allowing the ProgressMonitor functionality to be exposed to Cadabra algorithms through a a single C++ interface, independent of whether it is implemented in the C++ Server object or in the Python one.

#include <ServerWrapper.hh>

Inheritance diagram for ServerWrapper:
ProgressMonitor

Public Member Functions

 ServerWrapper ()
 
virtual void group (std::string name="") override
 
virtual void progress (int n, int total) override
 
- Public Member Functions inherited from ProgressMonitor
 ProgressMonitor ()
 
virtual ~ProgressMonitor ()
 
void print () const
 
std::vector< Totaltotals () const
 

Private Attributes

boost::python::object server
 
boost::python::object python_group
 
boost::python::object python_progress
 

Constructor & Destructor Documentation

ServerWrapper::ServerWrapper ( )

Member Function Documentation

void ServerWrapper::group ( std::string  name = "")
overridevirtual

Reimplemented from ProgressMonitor.

void ServerWrapper::progress ( int  n,
int  total 
)
overridevirtual

Reimplemented from ProgressMonitor.

Member Data Documentation

boost::python::object ServerWrapper::python_group
private
boost::python::object ServerWrapper::python_progress
private
boost::python::object ServerWrapper::server
private

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