swig syntax error when using explicit constructor with default arguments

View: New views
1 Messages — Rating Filter:   Alert me  

swig syntax error when using explicit constructor with default arguments

by Dwarak123 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I know swig supports explicit constructor with default arguments. But I'm having problem when I use explicit constructor where I have default arguments as follows:

class IpcAbstraction {
    public:
        explicit IpcAbstraction(IpcStreamVector* pInVct  = new IpcStreamVector, IpcStreamVector* pOutVct  = new IpcStreamVector);
        virtual ~IpcAbstraction();
        .............
        .............

};

Here in my IpcAbstraction class , IpcStreamVector* pInVct = new IpcStreamVector and IpcStreamVector* pOutVct  = new IpcStreamVector
where
IpcStreamVector  is a class defined in the same file.....


When I try to create java wrapper for this class, I get the following error:

platform/ipc/IpcAbstraction.h:82: Error: Syntax error in input(3)  where line no. 82 is the explicit constructor declaration...

Can anyone please tell me what I'm doing wrong here. Can we not initialize the arguments in a constructor with an instance of different class using "new" dynamic allocation operator? I'm sure it is allowed in C++ ... not sure why I get syntax error when creating the java wrapper using swig..

Thanks
Dwarak



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Swig-user mailing list
Swig-user@...
https://lists.sourceforge.net/lists/listinfo/swig-user
LightInTheBox - Buy quality products at wholesale price