frepple::utils::PythonFunction Class Reference

This call is a wrapper around a Python function that can be called from the C++ code. More...

#include <utils.h>

Inheritance diagram for frepple::utils::PythonFunction:

List of all members.

Public Member Functions

PythonObject call () const
PythonObject call (const PyObject *) const
PythonObject call (const PyObject *, const PyObject *) const
 operator bool () const
 operator const PyObject * () const
 operator string () const
PythonFunctionoperator= (const PythonFunction &o)
 PythonFunction ()
 PythonFunction (const string &)
 PythonFunction (PyObject *)
 PythonFunction (const PythonFunction &o)
 ~PythonFunction ()
- Public Member Functions inherited from frepple::utils::PythonObject
bool check (const MetaClass *c) const
bool check (const PythonType &c) const
bool getBool () const
Date getDate () const
double getDouble () const
int getInt () const
long getLong () const
string getString () const
TimePeriod getTimeperiod () const
unsigned long getUnsignedLong () const
 operator PyObject * () const
PythonObjectoperator= (const PythonObject &o)
 PythonObject ()
 PythonObject (const PyObject *o)
 PythonObject (Object *p)
 PythonObject (const string &val)
 PythonObject (const double val)
 PythonObject (const int val)
 PythonObject (const long val)
 PythonObject (const unsigned long val)
 PythonObject (const bool val)
 PythonObject (const TimePeriod val)
 PythonObject (const Date &val)
- Public Member Functions inherited from frepple::utils::DataElement
void operator>> (unsigned long int &val) const
void operator>> (long &val) const
void operator>> (TimePeriod &val) const
void operator>> (bool &v) const
void operator>> (int &val) const
void operator>> (double &val) const
void operator>> (Date &val) const
void operator>> (string &val) const
virtual ~DataElement ()

Detailed Description

This call is a wrapper around a Python function that can be called from the C++ code.

Definition at line 2967 of file utils.h.


Constructor & Destructor Documentation

frepple::utils::PythonFunction::PythonFunction ( )
inline

Default constructor.

Definition at line 2971 of file utils.h.

frepple::utils::PythonFunction::PythonFunction ( const string &  n)

Constructor.

Definition at line 591 of file pythonutils.cpp.

frepple::utils::PythonFunction::PythonFunction ( PyObject *  p)

Constructor.

Definition at line 621 of file pythonutils.cpp.

frepple::utils::PythonFunction::PythonFunction ( const PythonFunction o)
inline

Copy constructor.

Definition at line 2980 of file utils.h.

frepple::utils::PythonFunction::~PythonFunction ( )
inline

Destructor.

Definition at line 2995 of file utils.h.


Member Function Documentation

PythonObject frepple::utils::PythonFunction::call ( ) const

Call the Python function without arguments.

Definition at line 657 of file pythonutils.cpp.

PythonObject frepple::utils::PythonFunction::call ( const PyObject *  p) const

Call the Python function with one argument.

Definition at line 673 of file pythonutils.cpp.

PythonObject frepple::utils::PythonFunction::call ( const PyObject *  p,
const PyObject *  q 
) const

Call the Python function with two arguments.

Definition at line 689 of file pythonutils.cpp.

frepple::utils::PythonFunction::operator bool ( ) const
inlinevirtual

Conversion operator to bool.

Reimplemented from frepple::utils::PythonObject.

Definition at line 3004 of file utils.h.

frepple::utils::PythonFunction::operator const PyObject * ( ) const
inline

Conversion operator to a Python pointer.

Definition at line 2998 of file utils.h.

frepple::utils::PythonFunction::operator string ( ) const
inline

Conversion operator to a string.

Definition at line 3001 of file utils.h.

PythonFunction& frepple::utils::PythonFunction::operator= ( const PythonFunction o)
inline

Assignment operator.

Definition at line 2986 of file utils.h.


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