|
Bugzilla – Full Text Bug Listing |
| Summary: | bindings for classes without explicit copy constructors | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Tom Henderson <tomh> |
| Component: | python bindings | Assignee: | Gustavo J. A. M. Carneiro <gjcarneiro> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | ns-bugs |
| Priority: | P5 | ||
| Version: | pre-release | ||
| Hardware: | PC | ||
| OS: | Linux | ||
|
Description
Tom Henderson
2014-09-26 12:17:20 UTC
Rev 885 also fails to compile. The C++ api is this:
uan-transducer.h (abstract base class):
virtual const ArrivalList &GetArrivalList (void) const = 0;
uan-transducer-hd.h:
virtual const ArrivalList &GetArrivalList (void) const;
where 'ArrivalList' is a std::list<UanPacketArrival>
The bindings are:
module.add_container('std::list< ns3::UanPacketArrival >', 'ns3::UanPacketArrival', container_type=u'list')
## uan-transducer.h (module 'uan'): std::list<ns3::UanPacketArrival, std::allocator<ns3::UanPacketArrival> > const & ns3::UanTransducer::GetArrivalList() const [member function]
cls.add_method('GetArrivalList',
'std::list< ns3::UanPacketArrival > const &',
[],
is_pure_virtual=True, is_const=True, is_virtual=True)
## uan-transducer-hd.h (module 'uan'): std::list<ns3::UanPacketArrival, std::allocator<ns3::UanPacketArrival> > const & ns3::UanTransducerHd::GetArrivalList() const [member function]
cls.add_method('GetArrivalList',
'std::list< ns3::UanPacketArrival > const &',
[],
is_const=True, is_virtual=True)
which looks OK, but then the compilation error is as follows:
In file included from src/uan/bindings/ns3module.cc:1:0:
src/uan/bindings/ns3module.h:3862:48: error: conflicting return type specified for ‘virtual std::list<ns3::UanPacketArrival> PyNs3UanTransducer__PythonHelper::GetArrivalList() const’
virtual std::list< ns3::UanPacketArrival > GetArrivalList() const;
^
In file included from ./ns3/uan-phy.h:30:0,
from ./ns3/uan-mac-cw.h:27,
from ./ns3/uan-module.h:18,
from src/uan/bindings/ns3module.h:78,
from src/uan/bindings/ns3module.cc:1:
./ns3/uan-transducer.h:183:30: error: overriding ‘virtual const ArrivalList& ns3::UanTransducer::GetArrivalList() const’
virtual const ArrivalList &GetArrivalList (void) const = 0;
Apologies. I guess I should have rebuilt ns-3-dev from scratch before declaring victory. I'll fix it (again) tonight. I think this is fixed now. I tried rebuilding from scratch, and it builds for me. |