Title
An adaptor for C++ callbacks with C and Fortran libraries An adaptor for C++ callbacks with C and Fortran libraries
Author
Faculty/Department
Faculty of Sciences. Mathematics and Computer Science
Publication type
article
Publication
Amsterdam ,
Subject
Physics
Computer. Automation
Source (journal)
Computer physics communications. - Amsterdam
Volume/pages
184(2013) :3 , p. 824-832
ISSN
0010-4655
ISI
000315125500038
Carrier
E
Target language
English (eng)
Full text (Publishers DOI)
Affiliation
University of Antwerp
Abstract
Object-oriented programming using C++ is increasingly being adopted in the development of scientific codes. A recurrent issue in this regard is the interaction of newly developed codes with existing legacy libraries written in C or Fortran. Often, one needs to pass raw function pointers to such libraries procedures for callback purposes. This is problematic as it conflicts with one of the cornerstones of object-oriented programming: the association of functions and data through objects. Currently ad hoc approaches are used to deal with this issue, but these are error-prone and lack reusability. We present a generic adaptor that is able to wrap any callable C++ entity and provide a raw function pointer that is compatible with C or Fortran library routines. This allows for an object-oriented style of programming, while interfacing with legacy libraries in a straightforward manner.
E-info
https://repository.uantwerpen.be/docman/iruaauth/6aef9a/10e4efc41f1.pdf
http://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcApp=PARTNER_APP&SrcAuth=LinksAMR&KeyUT=WOS:000315125500038&DestLinkType=RelatedRecords&DestApp=ALL_WOS&UsrCustomerID=ef845e08c439e550330acc77c7d2d848
http://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcApp=PARTNER_APP&SrcAuth=LinksAMR&KeyUT=WOS:000315125500038&DestLinkType=FullRecord&DestApp=ALL_WOS&UsrCustomerID=ef845e08c439e550330acc77c7d2d848
Handle