From: Borden, D. <db...@kn...> - 2011-02-22 16:11:05
|
Hello, I'm a new SWIG user and am faced with the following problem. I have a number of C++ libraries which I'd like to expose (via SWIG) to 3 other languages: Perl, Python & Java. The C++ libraries all conform to a particular protocol for input and output: all constructor inputs, public function inputs and public function return types are either booleans, ints, doubles, or STL containers (mostly vectors and maps). Using the various std_*.i interface files I've been able to wrap nearly all of my functions and classes, but I've run into a roadblock in the use of std::map in perl. When I return a c++ map to perl, I expect something that should act like a reference to a hash, but the object I get does not seem to support iteration, or even a method for reporting its keys. Without knowing the valid keys for the map, the "get" method is mostly useless. Any help would be greatly appreciated. Regards, DLB DISCLAIMER: This e-mail, and any attachments thereto, is intended only for use by the addressee(s)named herein and may contain legally privileged and/or confidential information. If you are not the intended recipient of this e-mail, you are hereby notified that any dissemination, distribution or copying of this e-mail and any attachments thereto, is strictly prohibited. If you have received this in error, please immediately notify me and permanently delete the original and any printout thereof. E-mail transmission cannot be guaranteed to be secure or error-free. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. NOTICE REGARDING PRIVACY AND CONFIDENTIALITY Knight Capital Group may, at its discretion, monitor and review the content of all e-mail communications. http://www.knight.com<http://www.knight.com/> |