ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  C pointer from Python chart
Posted by Joe on Sep-20-2012 04:40
Given a PyObject * containing a reference to a python chart, how would I get a pointer to the C++ BaseChart type? Thanks

  Re: C pointer from Python chart
Posted by Peter Kwan on Sep-20-2012 22:29
Hi Joe,

You cannot get an object to a C++ BaseChart type, because the C++ BaseChart type (as defined ChartDirector for C++) does not exist inside ChartDirector.

When you use ChartDirector for C++, the BaseChart is created by your C++ compiler based on the header file "chartdir.h". The BaseChart created by your compiler will call the internal methods of the ChartDirector DLL or shared object to perform its functions.

When you use ChartDirector for Python, the BaseChart is created by Python based on the Python include file "pychartdir.py". The BaseChart created by your Python interpreter will call the internal methods of the ChartDirector DLL or shared object to perform its functions.

In other words, both C++ and Python are wrappers to the actual ChartDirector DLL or shared object. The C++ and Python are not wrappers of each others. So there is no C++ BaseChart in Python or vice versa.

Regards
Peter Kwan