Fix compile errors in Octave std::map wrappers. Remove li_std_map_runme.oct which looks like Python code
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12018 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
02b31416f6
commit
64641c9750
2 changed files with 4 additions and 65 deletions
|
|
@ -1,61 +0,0 @@
|
|||
li_std_map
|
||||
|
||||
a1 = li_std_map.A(3);
|
||||
a2 = li_std_map.A(7);
|
||||
|
||||
|
||||
p0 = li_std_map.pairii(1,2);
|
||||
p1 = li_std_map.pairA(1,a1.this);
|
||||
m = {};
|
||||
m{1} = a1;
|
||||
m{2} = a2;
|
||||
|
||||
pp1 = li_std_map.p_identa(p1);
|
||||
mm = li_std_map.m_identa(m);
|
||||
|
||||
|
||||
|
||||
m = li_std_map.mapA();
|
||||
m{1} = a1;
|
||||
m{2} = a2;
|
||||
|
||||
|
||||
pm ={};
|
||||
for k in m,
|
||||
pm{k} = m{k};
|
||||
endfor
|
||||
|
||||
for k in m,
|
||||
if (swig_this(pm{k}) != swig_this(m{k}))
|
||||
error
|
||||
endif
|
||||
endfor
|
||||
|
||||
|
||||
|
||||
m = {};
|
||||
m{1} = [1,2];
|
||||
m["foo"] = "hello";
|
||||
|
||||
pm = li_std_map.pymap();
|
||||
|
||||
for k in m,
|
||||
pm{k} = m{k};
|
||||
endfor
|
||||
|
||||
for k in pm,
|
||||
if (pm{k} != m{k})
|
||||
error
|
||||
endif
|
||||
endfor
|
||||
|
||||
mii = li_std_map.IntIntMap();
|
||||
|
||||
mii{1} = 1;
|
||||
mii{1} = 2;
|
||||
|
||||
if (mii[1] != 2)
|
||||
error
|
||||
endif
|
||||
|
||||
|
||||
|
|
@ -92,10 +92,10 @@
|
|||
};
|
||||
|
||||
template<class OutIterator, class FromOper, class ValueType = typename OutIterator::value_type>
|
||||
struct OctMapIterator_T : SwigPyIteratorClosed_T<OutIterator, ValueType, FromOper>
|
||||
struct OctMapIterator_T : OctSwigIteratorClosed_T<OutIterator, ValueType, FromOper>
|
||||
{
|
||||
OctMapIterator_T(OutIterator curr, OutIterator first, OutIterator last, octave_value seq)
|
||||
: SwigPyIteratorClosed_T<OutIterator,ValueType,FromOper>(curr, first, last, seq)
|
||||
: OctSwigIteratorClosed_T<OutIterator,ValueType,FromOper>(curr, first, last, seq)
|
||||
{
|
||||
}
|
||||
};
|
||||
|
|
@ -112,7 +112,7 @@
|
|||
};
|
||||
|
||||
template<typename OutIter>
|
||||
inline SwigPyIterator*
|
||||
inline OctSwigIterator*
|
||||
make_output_key_iterator(const OutIter& current, const OutIter& begin, const OutIter& end, octave_value seq = octave_value())
|
||||
{
|
||||
return new OctMapKeyIterator_T<OutIter>(current, begin, end, seq);
|
||||
|
|
@ -130,7 +130,7 @@
|
|||
|
||||
|
||||
template<typename OutIter>
|
||||
inline SwigPyIterator*
|
||||
inline OctSwigIterator*
|
||||
make_output_value_iterator(const OutIter& current, const OutIter& begin, const OutIter& end, octave_value seq = 0)
|
||||
{
|
||||
return new OctMapValueIterator_T<OutIter>(current, begin, end, seq);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue