The use of functors or function objects in the object oriented programming paradigm has proven to be useful in the design of scientific applications that need to tie functions and their execution context. However, a recurrent problem when using functors is their interaction with the callback mechanism of legacy C libraries. We review some of the solutions to this problem and present the design of a generic adapter that associates a C function pointer with function objects. This makes it possible to use an object-oriented style of programming and still interface with C libraries in a straightforward manner. © Springer-Verlag Berlin Heidelberg 2004.
CITATION STYLE
Broeckhove, J., & Vanmechelen, K. (2004). Using C++ functors with legacy C libraries. Lecture Notes in Computer Science (Including Subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), 3046 LNCS(PART 4), 514–523. https://doi.org/10.1007/978-3-540-24768-5_55
Mendeley helps you to discover research relevant for your work.