using 2-level caching as suggested by @wsfulton
This commit is contained in:
parent
4eb7fb8123
commit
be92482e27
2 changed files with 40 additions and 20 deletions
|
|
@ -2,17 +2,22 @@
|
|||
|
||||
%import "amodel.i"
|
||||
|
||||
%{ // C++ code to make this compilable
|
||||
%inline %{
|
||||
namespace d {
|
||||
template< typename T > class d {};
|
||||
}
|
||||
namespace ns__a {
|
||||
namespace iface1 {
|
||||
class Model {};
|
||||
typedef d::d<Model> ModelPtr;
|
||||
}
|
||||
using iface1::ModelPtr;
|
||||
%}
|
||||
|
||||
%ignore ns__a::iface1::Model;
|
||||
|
||||
%inline %{
|
||||
namespace ns__a {
|
||||
namespace iface1 {
|
||||
class Model {};
|
||||
typedef d::d<Model> ModelPtr;
|
||||
}
|
||||
using iface1::ModelPtr;
|
||||
}
|
||||
%}
|
||||
|
||||
%inline %{
|
||||
|
|
@ -23,6 +28,10 @@ namespace ns__b {
|
|||
ns__a::ModelPtr foo() { return ns__a::ModelPtr(); };
|
||||
};
|
||||
typedef d::d<Model> ModelPtr;
|
||||
ns__a::ModelPtr get_mp_a() { return ns__a::ModelPtr(); }
|
||||
ModelPtr get_mp_b() { return ModelPtr(); }
|
||||
}
|
||||
}
|
||||
%}
|
||||
%template(AModelPtr) d::d<ns__a::iface1::Model>;
|
||||
%template(BModelPtr) d::d<ns__b::iface1::Model>;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue