TwiceAsNice  2019-02-18
Classes | Namespaces | Macros | Typedefs | Functions
NiceApplicationPy.cc File Reference
#include <boost/python.hpp>
#include <boost/numeric/conversion/cast.hpp>
#include <boost/python/suite/indexing/vector_indexing_suite.hpp>
#include <boost/python/operators.hpp>
#include <Nice/Python/SmartpointerWrapper.hh>
#include <Nice/App/Endpoint.h>
#include <Nice/App/ConfigServiceWatchdog.h>
#include <Nice/Application.h>
#include <Nice/Property/CommandFun.hh>
#include <Nice/Property/BridgeMemFn.hh>
#include <Nice/Python/AllowThreadLock.h>
#include <cstdlib>
#include <Nice/App/ConfigClient.h>
Include dependency graph for NiceApplicationPy.cc:

Classes

class  Nice::GILStateGrabber
 
struct  PythonExceptionClearText
 
class  Nice::Python::ApplicationWrapper
 
class  Nice::Python::CompletionPropertyBridgeMemberFunction
 
class  Nice::Python::CompletionBridgeMemberFunctionWrap
 
class  Nice::Python::PropertyBridgeMemberFunction< T >
 
class  Nice::Python::PropertyBridgeMemberFunctionWrap< T >
 
class  Nice::Python::ServiceWatchdogListenerWrap
 

Namespaces

 Nice
 

 
 Nice::Python
 

Macros

#define NICE_APPLICATION_PY_INVOKE_PYTHON(statements)
 
#define defStaticMethod(name, method, ...)
 
#define defStaticMethodWithOverload(name, method, overload, ...)
 
#define exposePBMF(type, name)
 

Typedefs

typedef std::vector< std::string > Nice::Python::SeqString
 
typedef IceUtil::Handle< ServiceWatchdogListenerWrap > Nice::Python::ServiceWatchdogListenerWrapPtr
 
typedef Nice::AppConfigClientPtr(* Nice::Python::ApplicationWrapperConnectType) (const std::string &, const Nice::Endpoint &, bool)
 
typedef Nice::AppConfigClientPtr(* Nice::Python::AppConfigClientCreateType) (const Nice::Endpoint &, Nice::JointPtr, bool)
 

Functions

static PythonExceptionClearText decodePythonException ()
 
static void logPythonException (const PythonExceptionClearText &clearText)
 
void Nice::Python::installCompletionBridgeMemberFunction (const std::string &propertyName, CompletionPropertyBridgeMemberFunction *f)
 
template<typename T >
void Nice::Python::installPropertyBridgeMemberFunction (const std::string &propertyName, PropertyBridgeMemberFunction< T > *f)
 
void Nice::Python::AppConfigServiceInitialize (bool _manualActivation)
 
 Nice::Python::BOOST_PYTHON_FUNCTION_OVERLOADS (ApplicationWrapperConnectOverload, Nice::Python::ApplicationWrapper::connect, 2, 3)
 
 Nice::Python::BOOST_PYTHON_FUNCTION_OVERLOADS (AppConfigClientCreateOverload, Nice::AppConfigClient::create, 2, 3)
 
 Nice::Python::BOOST_PYTHON_FUNCTION_OVERLOADS (ApplicationFileByPathOverload, Nice::Application::fileByPath, 1, 2)
 
void Nice::Python::export_NiceApplicationFactory ()
 

Macro Definition Documentation

◆ defStaticMethod

#define defStaticMethod (   name,
  method,
  ... 
)
Value:
def(name, method) \
.staticmethod(name)
const char &QWidget::show def("pushImage",(void(QImageView::*)(const ImageBase *))&QImageView::pushImage) .def("pushImage"
string name
Definition: simple_monitor_read.py:15

◆ defStaticMethodWithOverload

#define defStaticMethodWithOverload (   name,
  method,
  overload,
  ... 
)
Value:
def(name, method, overload) \
.staticmethod(name)
const char &QWidget::show def("pushImage",(void(QImageView::*)(const ImageBase *))&QImageView::pushImage) .def("pushImage"
string name
Definition: simple_monitor_read.py:15

◆ exposePBMF

#define exposePBMF (   type,
  name 
)
Value:
class_<PropertyBridgeMemberFunctionWrap<type>, \
boost::noncopyable>(#name) \
.def("onUpdate", pure_virtual( \
&PropertyBridgeMemberFunction<type>::onUpdate)) \
; \
def("install" #name, \
&installPropertyBridgeMemberFunction<type>);
const char &QWidget::show def("pushImage",(void(QImageView::*)(const ImageBase *))&QImageView::pushImage) .def("pushImage"
string name
Definition: simple_monitor_read.py:15

◆ NICE_APPLICATION_PY_INVOKE_PYTHON

#define NICE_APPLICATION_PY_INVOKE_PYTHON (   statements)
Value:
GILStateGrabber stateGrabber; \
try \
{ \
statements; \
} \
catch (const boost::python::error_already_set& e) \
{ \
PythonExceptionClearText clearText= \
decodePythonException(); \
logPythonException(clearText); \
E_THROW(clearText.typeMessage + ": " + \
clearText.valueMessage); \
}

Function Documentation

◆ decodePythonException()

static PythonExceptionClearText decodePythonException ( )
static

◆ logPythonException()

static void logPythonException ( const PythonExceptionClearText clearText)
static