I have an enum in my c++ library. In fact I have a crap load of them.
169 to be exact.
I need them to be pickle-able. The enum_ object does not have a
.def_pickle function, so I cannot use the pickle suite. I tried to just
up and pickle it but that does not work either.
enum box {cardboa
Mihail Konstantinov wrote:
Roman Yakovenko wrote:
It is not a good idea. Python string is immutable. May be you should
consider custom converter.
http://www.boost.org/doc/libs/1_37_0/libs/python/doc/v2/faq.html#custom_string
I don't see why it is not a good idea. I am nowhere ac
On Tue, Dec 2, 2008 at 9:20 PM, Mihail Konstantinov
<[EMAIL PROTECTED]> wrote:
>> Roman Yakovenko wrote:
>> It is not a good idea. Python string is immutable. May be you should
>> consider custom converter.
>> http://www.boost.org/doc/libs/1_37_0/libs/python/doc/v2/faq.html#custom_string
>
> I don'
> >implicitly_convertible();
> >implicitly_convertible();
> >}
> I see that an int can be implicitly converted to X. But how can an X be
> converted to an int? I can't believe that boost.python searches all
> implemented
> functions to find that make_x is capable of converting an int to
> Roman Yakovenko wrote:
>
> It is not a good idea. Python string is immutable. May be you should
> consider custom converter.
> http://www.boost.org/doc/libs/1_37_0/libs/python/doc/v2/faq.html#custom_string
I don't see why it is not a good idea. I am nowhere accessing any string
derived classe
On Tue, Dec 2, 2008 at 7:04 PM, Mihail Konstantinov
<[EMAIL PROTECTED]> wrote:
> Dear all,
> thanks a lot for your immediate responses that lead to a fast solution for my
> previous problem.
>
> Here comes the next one.
>
> In the example below both classes A and B are derived from std::string.
I
2008/12/2 Mathieu Malaterre <[EMAIL PROTECTED]>
> 2008/12/2 Gustavo Carneiro <[EMAIL PROTECTED]>:
> >
> >
> > 2008/12/2 Mathieu Malaterre <[EMAIL PROTECTED]>
> >>
> >> 2008/12/2 Gustavo Carneiro <[EMAIL PROTECTED]>:
> >> > 2008/12/2 Alan Baljeu <[EMAIL PROTECTED]>
> >> >>
> >> >> I would make a co
2008/12/2 Gustavo Carneiro <[EMAIL PROTECTED]>:
>
>
> 2008/12/2 Mathieu Malaterre <[EMAIL PROTECTED]>
>>
>> 2008/12/2 Gustavo Carneiro <[EMAIL PROTECTED]>:
>> > 2008/12/2 Alan Baljeu <[EMAIL PROTECTED]>
>> >>
>> >> I would make a contribution to some projects. GCC-XML is not one of
>> >> them,
>>
2008/12/2 Mathieu Malaterre <[EMAIL PROTECTED]>
> 2008/12/2 Gustavo Carneiro <[EMAIL PROTECTED]>:
> > 2008/12/2 Alan Baljeu <[EMAIL PROTECTED]>
> >>
> >> I would make a contribution to some projects. GCC-XML is not one of
> them,
> >> seeing how it's not even worth my effort to try to install and
2008/12/2 Gustavo Carneiro <[EMAIL PROTECTED]>:
> 2008/12/2 Alan Baljeu <[EMAIL PROTECTED]>
>>
>> I would make a contribution to some projects. GCC-XML is not one of them,
>> seeing how it's not even worth my effort to try to install and configure
>> this stuff. If I were involved with these pack
Dear all,
thanks a lot for your immediate responses that lead to a fast solution for my
previous problem.
Here comes the next one.
In the example below both classes A and B are derived from std::string. Class B
can be implicitly converted to A by means of 'B::operator const A()'. So the
functi
2008/12/2 Alan Baljeu <[EMAIL PROTECTED]>
> I would make a contribution to some projects. GCC-XML is not one of them,
> seeing how it's not even worth my effort to try to install and configure
> this stuff. If I were involved with these packages, I would make it easy
> for others to get involved
I would make a contribution to some projects. GCC-XML is not one of them,
seeing how it's not even worth my effort to try to install and configure this
stuff. If I were involved with these packages, I would make it easy for others
to get involved. As it isn't easy I'm going to look elsewhere.
On Tue, Dec 2, 2008 at 5:26 PM, Alan Baljeu <[EMAIL PROTECTED]> wrote:
> This is getting out of hand :-(
>
> All I wanted to do was parse some simple C++ function declarations to
> generate a corresponding py-callable wrapper. To do this I need to get
> pygccxml. Then I need gccxml to use pygcc
Alan Baljeu wrote:
This is getting out of hand :-(
I think I'd rather just do my own thing, except that C++ is so warty it's
difficult to come up with anything reasonable that will serve the purpose.
How many functions and objects do you want to export, anyway ? I have so
far always
This is getting out of hand :-(
All I wanted to do was parse some simple C++ function declarations to generate
a corresponding py-callable wrapper. To do this I need to get pygccxml. Then
I need gccxml to use pygccxml. To get that I need WinCVS or some equivalent
(which version, and learn ho
Mihail Konstantinov wrote:
One more question about the syntax. You cited
http://www.boost.org/doc/libs/1_37_0/libs/python/doc/v2/class.html#class_-spec
which specifies the syntax as "class_"
so that I thought I have to include all 4 template arguments. But when
I used instead of the above (wor
> try use boost::noncopyable to B or implemente a copy constructor in B
> without call A copy contructor.
Thank you. This works:
BOOST_PYTHON_MODULE(boost_ext)
{
class_ a("A",init<>());
class_, boost::noncopyable >("B",init<>());
}
One more question about the syntax. You cited
http://ww
Mihail Konstantinov wrote:
gcc.compile.c++ bin/gcc-4.1.2/debug/boost.o
boost.cpp: In copy constructor ‘B::B(const B&)’:
As this error message suggests: as B derives from A, it is (by default)
non-copyable, too. That you have to tell python, too, thus:
class_ a("A", init<>);
class_, nonco
On Tue, Dec 2, 2008 at 4:11 PM, Renato Araujo <[EMAIL PROTECTED]> wrote:
> try use boost::noncopyable to B or implemente a copy constructor in B
> without call A copy contructor.
He is right. The following code was generated by Py++:
#include "boost/python.hpp"
namespace bp = boost::python;
BOO
Mihail Konstantinov wrote:
Stefan Seefeld wrote:
In this case you want to tell Python that your object is non-copyable:
I followed your suggestion and still get the same error message:
[snip]
/home/mihail/temporary/boost_1_37_0/boost/python/object/value_holder.hpp: In constructor
‘boost
Marcus Lindblom wrote:
(I don't think the gccxml-call happens because of the call to the
ModuleBuilder at line 813, although I might be wrong?)
Waitaminute. When I'm rerunning it now, the order makes more sense, and
the cache-calls come up after the calls to ModuleBuilder. Probably the
log-f
try use boost::noncopyable to B or implemente a copy constructor in B
without call A copy contructor.
BR
On Tue, Dec 2, 2008 at 11:03 AM, Mihail Konstantinov
<[EMAIL PROTECTED]> wrote:
>> Stefan Seefeld wrote:
>
>>
>> In this case you want to tell Python that your object is non-copyable:
>
> I
> Stefan Seefeld wrote:
>
> In this case you want to tell Python that your object is non-copyable:
I followed your suggestion and still get the same error message:
boost.cpp:6: error: ‘A::A(const A&)’ is private
(full bjam output is appended to this email)
Could you check this modified code? bo
Roman Yakovenko wrote:
On Tue, Dec 2, 2008 at 3:15 PM, Marcus Lindblom <[EMAIL PROTECTED]> wrote:
Ok. It came right back at me:
pyopensg/src> ** the above **
Could not determine compiler setting.
Could not determine GCCXML_FLAGS setting.
pyopensg/src>
So, I changed it to run my compiled gccxml
Mihail Konstantinov wrote:
Hello,
I am still in the early process of learning boost.python.
I have reduced my problem to the following code:
#include
using namespace boost::python;
class A{
private:
A(const A&){}; //no public copy constructor
};
class B: public A{
public:
B(){};
};
BOOST_PY
Sorry, the public A::A() constructor was missing. The corrected class A, which
caused the described problem, is:
class A{
private:
A(const A&){}; //no public copy constructor
public:
A(){};
};
___
Cplusplus-sig mailing list
Cplusplus-sig@
On Tue, Dec 2, 2008 at 3:15 PM, Marcus Lindblom <[EMAIL PROTECTED]> wrote:
> Ok. It came right back at me:
>
> pyopensg/src> ** the above **
> Could not determine compiler setting.
> Could not determine GCCXML_FLAGS setting.
> pyopensg/src>
>
> So, I changed it to run my compiled gccxml (pretty rec
Hello,
I am still in the early process of learning boost.python.
I have reduced my problem to the following code:
#include
using namespace boost::python;
class A{
private:
A(const A&){}; //no public copy constructor
};
class B: public A{
public:
B(){};
};
BOOST_PYTHON_MODULE(boost_ext)
{
Roman Yakovenko wrote:
2008/12/2 Marcus Lindblom <[EMAIL PROTECTED]>:
Hi all,
I'm trying to get OpenSG's python-bindings to work on Windows (and
contruibuting that back to the project), and trying to track down an
exception that get's thrown when running it's gen_bindings.py. (see attached
log.
2008/12/2 Marcus Lindblom <[EMAIL PROTECTED]>:
> Hi all,
>
> I'm trying to get OpenSG's python-bindings to work on Windows (and
> contruibuting that back to the project), and trying to track down an
> exception that get's thrown when running it's gen_bindings.py. (see attached
> log.txt for output)
Hi all,
I'm trying to get OpenSG's python-bindings to work on Windows (and
contruibuting that back to the project), and trying to track down an
exception that get's thrown when running it's gen_bindings.py. (see
attached log.txt for output)
The source for gen_bindings.py is here, for referen
32 matches
Mail list logo