[C++-sig] How to add new constructor in a class

2010-06-18 Thread vishal bayskar
In the below example I need to add a constructor A(). How to do that? class A{ public: A(int); int getA(); private: int a; }; I have tried add_declaration_code and add_registration_code but it seems that these will not work for the case of contructor. Does these work a

[C++-sig] find out dependency from public part only

2010-06-01 Thread vishal bayskar
Is there any function available in pyplusplus to findout the dependencies of some declaration from public part only? I searched but I didn't find any such functionality For example in below file (afile.h) if I find out dependency for class A it should not give class C as it is in the private part

Re: [C++-sig] How to search constructors with namespace

2010-06-01 Thread vishal bayskar
>how do I search for the constructor >parent::child::A::A(parent::child::B const & arg0) [constructor] >What arg_types should I provide ? >I have tried with and without namespaces like >cons = mb.constructors('A', arg_types=['parent::child::B const &']) >cons = mb.constructors('A', arg_types=[

[C++-sig] How to search constructors with namespace

2010-06-01 Thread vishal bayskar
a.h === #ifndef _INEX_A__ #define _INEX_A__ #include "b.h" namespace parent{ namespace child{ class A{ public: A(int const &); A(int, int); A(B const &); int getA(int); }; }; }; #endif b.h === #ifndef _INEX_B__ #define _INEX_B__ namespace parent{ namespace chi

Re: [C++-sig] The declaration is unexposed

2010-05-27 Thread vishal bayskar
>This is the reason why declaration "b" is unexposed. In this case, >declarations "b" was declared in a header file, which was not "asked" >to be exposed. Thanks again Roman for your prompt response. Actually my doubt was like pyplusplus exposes declaration from all included file that are in cur

[C++-sig] The declaration is unexposed

2010-05-27 Thread vishal bayskar
aration is unexposed, but there are other > declarations, which refer to it. This could > cause "no to_python converter found" run time error. Declarations: > someClassA::someClassA(someClassB const & arg0) > [constructor] Thanks Vishal Bayskar -- View this message in con

Re: [C++-sig] No to_python (by-value) converter found for C++ type

2010-05-24 Thread vishal bayskar
>It seems, that py++ was wrong :-(. Can you specify gccxml version, OS >and your compiler? Do you mind to submit a small test case that >reproduce the problem? gccxml: gccxml-0.9 OS: x86_64-redhat-linux Compiler: gcc version 4.1.2 20080704 (Red Hat 4.1.2-44) You can use the code attached below

Re: [C++-sig] No to_python (by-value) converter found for C++ type

2010-05-24 Thread vishal bayskar
>Did you try to remove "noncopyable" from the generated code? If so >what happened? Thanks, yes it works when "noncopyable" is removed. >If you think, that py++ wrong, you can always override its decision: >mb = module_builder_t( ... ) >mb.class_(...).noncopyable = False Thanks again it is he

Re: [C++-sig] No to_python (by-value) converter found for C++ type

2010-05-24 Thread vishal bayskar
>I suspect it would do so if you don't have a public copy constructor defined available, even if you didn't use boost::noncopyable to get rid of it. Thanks Jim, I have defined public copy constructor explicitly now it is working. ___ Cplusplus-sig

Re: [C++-sig] No to_python (by-value) converter found for C++ type

2010-05-24 Thread vishal bayskar
>I didn't see anything attached to your email, and my tar doesn't like >what's at the link above. I'm not sure whatever binding generator >you're using (Py++?) uses to determine whether to thrown noncopyable in, >there, but I suspect it would do so if you don't have a public copy >constructo

[C++-sig] No to_python (by-value) converter found for C++ type

2010-05-24 Thread vishal bayskar
I am facing a problem while creating python binding for some code in my application. I have created a sample program for that and attached the same to this mail. Here after the generation of python bindings when I try to use that it fails with error No to_python (by-value) converter found for C+

Re: [C++-sig] How to use functionality of list.

2010-05-10 Thread vishal bayskar
>Roman can you tell me how could I get pyplusplus version 1.1. I have tried using "svn co" but the >latest version that is checking out it only 1.0.0 >I tried with below cvs command >svn co https://pygccxml.svn.sourceforge.net/svnroot/pygccxml pygccxml >and >svn co http://pygccxml.svn.sourceforg

Re: [C++-sig] How to use functionality of list.

2010-05-10 Thread vishal bayskar
I don't understand why do you struggle. The "exposed via an indexing suite" method allows you to modify and iterate over the list using the well defined and documented protocol. If you need to use: Thanks Roman, Now I am able to use the functionality of list (although not all like pop() but I use

Re: [C++-sig] How to use functionality of list.

2010-05-06 Thread vishal bayskar
Actually I need to extract the item present in the list, so I am trying to use methonds of list (just for an example I tried push_back in the below example). vishal bayskar wrote: > >>Both indexing suites provides interface very similar to Python >>containers. So the user w

Re: [C++-sig] How to use functionality of list.

2010-05-05 Thread vishal bayskar
>Both indexing suites provides interface very similar to Python >containers. So the user will not have to learn new API, but if you >insists, you can rename/introduce new method from Python >AList.push_back = AList.append But object Alist is not treated as a list and giving the below error. >>>

Re: [C++-sig] How to use functionality of list.

2010-05-05 Thread vishal bayskar
>There is no need to expose std containers directly. Instead, expose >declarations that are using them and Py++ will do the rest. >mb.free_function( 'getDummyAlist' ).include() >This topic is covered in the following document: >http://language-binding.net/pyplusplus/documentation/containers.html

[C++-sig] How to use functionality of list.

2010-05-05 Thread vishal bayskar
Actually I am able create wrapper code for list . All the functions of list are exposed. But when I try to compile it (try to create shared library) it showing below error --- testModule.cpp:11: error: _Alloc was not declared in this scope testModule.cpp:18: error: _Tp was not declared in

Re: [C++-sig] How to make use of -> (dereferncing) operator in pyplusplus

2010-04-14 Thread vishal bayskar
>http://language-binding.net/_downloads/smart_ptrs.zip contains a >working example. You can download it and study. Thanks Roman for your guidance, I have studied the example and also succesfully used it in python script. My next doubt is how did you generate the binding.cpp, becouse I also tried

Re: [C++-sig] How to make use of -> (dereferncing) operator in pyplusplus

2010-04-14 Thread vishal bayskar
>You should not export export "SmartPtr" class as is. You can "teach" >Boost.Python to understand that an object is the instance of SmartPtr >class and it will handle for you and your users "operator*" and >"operator->". >The following example ( >http://language-binding.net/pyplusplus/troublesho

[C++-sig] How to make use of -> (dereferncing) operator in pyplusplus

2010-04-14 Thread vishal bayskar
Hi I have a requirement of using dereferencing pointer, like in the below code checkSmartPtr.h #include #include"test.h" using namespace std; template class SmartPtr { public: SmartPtr(T *ptr):pointee(ptr) { } T *operator->() {

[C++-sig] "operator++" is not supported

2010-04-09 Thread vishal bayskar
Hi, Actually I am generating a python binding for my source code, in which there were a extensive use of operator like operator++(), "operator*", "operator->". As python does not support for these operators. and pyplusplus is failing to generate wrapper code for these operator. Are there any wor