params.py (10019:a14f92150d3f) | params.py (10181:6270235e0585) |
---|---|
1# Copyright (c) 2012-2013 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 285 unchanged lines hidden (view full) --- 294 self.ptype.swig_predecls(code) 295 code() 296 code('%include "std_vector.i"') 297 code() 298 299 ptype = self.ptype_str 300 cxx_type = self.ptype.cxx_type 301 | 1# Copyright (c) 2012-2013 ARM Limited 2# All rights reserved. 3# 4# The license below extends only to copyright in the software and shall 5# not be construed as granting a license to any other intellectual 6# property including but not limited to intellectual property relating 7# to a hardware implementation of the functionality of the software 8# licensed hereunder. You may use the software subject to the license --- 285 unchanged lines hidden (view full) --- 294 self.ptype.swig_predecls(code) 295 code() 296 code('%include "std_vector.i"') 297 code() 298 299 ptype = self.ptype_str 300 cxx_type = self.ptype.cxx_type 301 |
302 code('''\ 303%typemap(in) std::vector< $cxx_type >::value_type { 304 if (SWIG_ConvertPtr($$input, (void **)&$$1, $$1_descriptor, 0) == -1) { 305 if (SWIG_ConvertPtr($$input, (void **)&$$1, 306 $$descriptor($cxx_type), 0) == -1) { 307 return NULL; 308 } 309 } 310} 311 312%typemap(in) std::vector< $cxx_type >::value_type * { 313 if (SWIG_ConvertPtr($$input, (void **)&$$1, $$1_descriptor, 0) == -1) { 314 if (SWIG_ConvertPtr($$input, (void **)&$$1, 315 $$descriptor($cxx_type *), 0) == -1) { 316 return NULL; 317 } 318 } 319} 320''') 321 | |
322 code('%template(vector_$ptype) std::vector< $cxx_type >;') 323 324 def cxx_predecls(self, code): 325 code('#include <vector>') 326 self.ptype.cxx_predecls(code) 327 328 def cxx_decl(self, code): 329 code('std::vector< ${{self.ptype.cxx_type}} > ${{self.name}};') --- 1337 unchanged lines hidden --- | 302 code('%template(vector_$ptype) std::vector< $cxx_type >;') 303 304 def cxx_predecls(self, code): 305 code('#include <vector>') 306 self.ptype.cxx_predecls(code) 307 308 def cxx_decl(self, code): 309 code('std::vector< ${{self.ptype.cxx_type}} > ${{self.name}};') --- 1337 unchanged lines hidden --- |