Hi all,
Hopefully this is the correct way to post a question, If not I apologize as I
haven't used mailing lists before.
Anyways, here is my problem:
I have some class functions that takes in parameters by pointer. However, when
I expose and override this class/these functions in boost::pytho
/pointer to
> python overriden class functions
>
> On 05/25/2011 02:26 PM, Jay Riley wrote:
> > I have some class functions that takes in parameters by pointer.
> > However, when I expose and override this class/these functions in
> > boost::python, any changes I make to the p
I've been trying to figure out how to expose a property in my class that is a
boost::tuple. The tuple is defined as follows:
typedef boost::shared_ptr action_ptr;
typedef boost::tuple ActionTargetTuple;
It's contained with a class defined as follows:
class Action : public Cloneable
I'm trying to implement a Cloning function for one of my classes I want to
extend to Python. Extending the classes in C++ is easy as I can just override
the Clone function, but it's definitely not working like that for Python.
Here's the code, with unimportant detail ommitted.
template
I'm having a really weird issue in boost python. I'm focusing on a particular
property/method to simplify the example. Here's the situation:
In my program, I have a class called Attack. With the following layout
(simplified for example)
class Attack : public Action
{
public:
member of the base class anyways?
> Date: Thu, 25 Aug 2011 13:18:04 -0700
> From: tallji...@gmail.com
> To: cplusplus-sig@python.org
> CC: super24bitso...@hotmail.com
> Subject: Re: [C++-sig] Boost Python loss of values
>
> On 08/25/2011 04:17 AM, Jay Riley wrote:
>
> >
Self is indeed a PyObject*
this is a bit confusing
> Date: Fri, 26 Aug 2011 13:00:11 -0700
> From: tallji...@gmail.com
> To: cplusplus-sig@python.org
> Subject: Re: [C++-sig] Boost Python loss of values
>
> On 08/26/2011 08:27 AM, Jay Riley wrote:
> > Hi Jim,
> >
I'm trying to pass an object from python to C++. I want C++ to take control of
the object.
The object I'm trying to change ownership on is defined in it's module as
follows (superfluous code removed):
BOOST_PYTHON_MODULE(ComponentModule){
class_ >("Component"
Sorry just as a quick append, UseComponentWrap inherits from UseComponent to
allow overriding of a few virtual methods
On 2011-11-08, at 1:13 AM, "Jay Riley" wrote:
> I'm trying to pass an object from python to C++. I want C++ to take control
> of the object.
>
&g
e_policy())
.def("__copy__", &generic__copy__)
.def("__deepcopy__", &generic__deepcopy__)
;
I really don't see how this can get turned into an Item, Any ideas?
Thanks for the he
I'm doing some testing on my C++ wrappers, and I'm hitting a point where python
just freezes. The debugger stops, no exception is thrown and my program stops
responding. I'm not entirely sure what code to show, so if it's not enough, let
me know. Here's the python code:
class HealingComponent(U
[C++-sig] Python freezing
>
>
> on Thu Nov 10 2011, Jay Riley wrote:
>
> > so it seems as though string isn't in the registry? and the error
> > gets digested silently. This is really weird and I don't quite
> > understand why returning a string causing
I was wondering if it's possible to hook python functions as slots into
boost::signal or boost::signal2 signals? I found an old thread that said it
wasn't directly possible, but it was from 2004.
___
Cplusplus-
I've been looking around and I can find tons of information about how to wrap
shallow inheritance hierarchys with virtual/pure virtual functions, but none of
them show how to do multi level inheritance. I'm unsure if I'm supposed to
inherit from the wrapper or the base class for the virtual fun
I'm trying to wrap a C++ class into python. I need to pass an enum value by
reference through a virtual function. I'm doing it like so (non relevant code
omitted):
class BasicRMLScreenWrap : public BasicRMLScreen{
public:bool HandleKeyPress
I'm having a problem with some python objects derived in python. I have a Clone
method that's supposed to make a full copy of these python inherited objects,
but it isn't working. The problem is my wrapper class' PyObject* self isn't
getting copied, so when I use call_method<>(self, "method nam
non clone prints out the python side
code.
> Date: Thu, 7 Jun 2012 17:13:55 -0400
> From: jbo...@astro.princeton.edu
> To: super24bitso...@hotmail.com
> Subject: Re: [C++-sig] Properly copying wrapped classes
>
> On 06/05/2012 12:41 AM, Jay Riley wrote:
> > That got rid of the co
>
>
> (btw, apologies to the rest of the list - I accidentally replied without
> including the list a few emails back, but all you've missed are a number
> of ideas that don't work)
>
>
> Jim
>
>
>
>
>
> On 06/08/2012 0
I've come across two problems with some python exporting Im trying to do.
First problems is as follows. I have the following piece of python code:
inv = ActiveGame.GetPlayerParty().GetInventory().GetItems()
print str(len(inv))print type(inv)inv["Th
19 matches
Mail list logo