Knowledge (XXG)

Wrapper function

Source đź“ť

117:
once the wrapper is written. A test driver is a kind of wrapper function that exercises a code module, typically calling it repeatedly, with different settings or parameters, in order to rigorously pursue each possible path. It is not deliverable code, but it is not throwaway code either, being typically retained for use in
116:
routines for pre-existing system functions without increasing the length of a code by a large amount by repeating the same error check for each call to the function. All calls to the original function can be replaced with calls to the wrapper, allowing the programmer to forget about error checking
85:
library demonstrate this. They are useful in the development of applications that use third-party library functions. A wrapper can be written for each of the third party functions and used in the native application. In case the third party functions change or are updated, only the wrappers in the
121:. An interface adaptor is a kind of wrapper function that simplifies, tailors, or amplifies the interface to a code module, with the intent of making it more intelligible or relevant to the user. It may rename parameters, combine parameters, set defaults for parameters, and the like. 255:
by assigning descriptive names and allowing for the reuse of the computations. Although not all wrappers are helper functions, all helper functions are wrappers, and a notable use of helper functions—grouping frequently utilized operations—is in
243:
This may lead to incorrectly using the terms "system call" and "syscall" to refer to higher-level library calls rather than the similarly named system calls, which they wrap.
57:
with little or no additional computation. Wrapper functions simplify writing computer programs by abstracting the details of a subroutine's implementation.
306: 515: 470: 499: 397: 359: 86:
native application need to be modified as opposed to changing all instances of third party functions in the native application.
466: 38: 206: 142: 269: 104:
an existing class or object to have a different interface. This is especially useful when using existing library code.
138: 301: 66: 374: 230: 261: 202: 437: 537: 134: 130: 328: 46: 20: 257: 198: 118: 462: 137:
of base classes, wrapper functions can be used to simulate it. Below is an example of part of a
511: 393: 355: 296: 27: 503: 311: 194: 50: 323: 291: 281: 101: 95: 413: 286: 531: 265: 493: 387: 349: 252: 210: 54: 26:"Wrapper method" redirects here. For wrapper methods in feature selection, see 507: 226: 19:
This article is about programming structure. For wrapping in graphics, see
113: 82: 77:
Wrapper functions simplify writing computer programs. For example, the
236: 222: 317: 386:
Stevens, Richard; Fenner, Bill; Rudoff; Andrew M. (2003).
348:
Reselman, Bob; Peasley, Richard; Pruchniak, Wayne (1998).
141:
class that "inherits" from LinkedList and HashSet. See
53:
whose main purpose is to call a second subroutine or a
498:. CC: Compiler Construction. New York, United States: 495:
Helper function inlining in dynamic binary translation
251:
A helper function is a function which groups parts of
16:
Function whose job is only to call another subroutine
8: 260:, in which helper functions of a particular 69:and can be used for a number of purposes. 307:Forwarding (object-oriented programming) 177://contains data members and data methods 340: 112:Wrapper functions can be used to write 28:Feature selection § Wrapper method 7: 392:. Addison-Wesley. pp. 5–6, 29. 225:are examples of this. They call the 145:for further implementation details. 500:Association for Computing Machinery 438:"System Calls (The GNU C Library)" 189:Library functions and system calls 14: 414:"syscalls(2) - Linux manual page" 197:functions, such as those in the 100:Wrapper functions can be used to 65:Wrapper functions are a means of 90:Adapting class/object interfaces 473:from the original on 7 May 2021 467:Worcester Polytechnic Institute 1: 492:Wang, Wenwen (3 March 2021). 240:system calls, respectively. 463:"CS 1101: Helper functions" 320:automatic wrapper generator 314:wrapper to another language 264:are used in translation of 81:and similar classes in the 554: 258:dynamic binary translation 93: 25: 18: 389:UNIX Network Programming 302:Delegation (programming) 147: 508:10.1145/3446804.3446851 73:Programming convenience 461:Fisler, Kathi (2005). 133:that does not support 354:. Que. p. 446. 351:Using Visual Basic 6 135:multiple inheritance 131:programming language 125:Multiple inheritance 41:(another word for a 329:Partial application 21:Wrapping (graphics) 375:The Java Tutorials 199:C Standard Library 180://covariant return 119:regression testing 517:978-1-4503-8325-7 297:Decorator pattern 545: 522: 521: 489: 483: 482: 480: 478: 458: 452: 451: 449: 448: 434: 428: 427: 425: 424: 410: 404: 403: 383: 377: 372: 366: 365: 345: 312:Language binding 184: 181: 178: 175: 172: 169: 166: 163: 160: 157: 154: 151: 80: 51:computer program 47:software library 35:wrapper function 553: 552: 548: 547: 546: 544: 543: 542: 528: 527: 526: 525: 518: 502:. p. 107. 491: 490: 486: 476: 474: 460: 459: 455: 446: 444: 436: 435: 431: 422: 420: 412: 411: 407: 400: 385: 384: 380: 373: 369: 362: 347: 346: 342: 337: 324:Nested function 292:Adapter pattern 282:Wrapper library 278: 270:instruction set 249: 247:Helper function 191: 186: 185: 182: 179: 176: 173: 170: 167: 164: 161: 158: 155: 152: 149: 127: 110: 98: 96:Adapter pattern 92: 78: 75: 63: 31: 24: 17: 12: 11: 5: 551: 549: 541: 540: 530: 529: 524: 523: 516: 484: 453: 429: 405: 398: 378: 367: 360: 339: 338: 336: 333: 332: 331: 326: 321: 315: 309: 304: 299: 294: 289: 287:Driver wrapper 284: 277: 274: 272:into another. 248: 245: 190: 187: 148: 126: 123: 114:error checking 109: 106: 94:Main article: 91: 88: 74: 71: 62: 59: 15: 13: 10: 9: 6: 4: 3: 2: 550: 539: 536: 535: 533: 519: 513: 509: 505: 501: 497: 496: 488: 485: 472: 468: 464: 457: 454: 443: 439: 433: 430: 419: 415: 409: 406: 401: 399:9780131411555 395: 391: 390: 382: 379: 376: 371: 368: 363: 361:9780789716330 357: 353: 352: 344: 341: 334: 330: 327: 325: 322: 319: 316: 313: 310: 308: 305: 303: 300: 298: 295: 293: 290: 288: 285: 283: 280: 279: 275: 273: 271: 267: 263: 259: 254: 246: 244: 241: 239: 238: 233: 232: 228: 224: 221:functions in 220: 216: 212: 208: 204: 200: 196: 188: 146: 144: 140: 136: 132: 124: 122: 120: 115: 107: 105: 103: 97: 89: 87: 84: 72: 70: 68: 60: 58: 56: 52: 48: 44: 40: 36: 29: 22: 494: 487: 475:. Retrieved 456: 445:. Retrieved 441: 432: 421:. Retrieved 417: 408: 388: 381: 370: 350: 343: 266:instructions 262:architecture 250: 242: 235: 229: 218: 214: 211:system calls 192: 128: 111: 108:Code testing 99: 79:MouseAdapter 76: 64: 42: 34: 32: 538:Subroutines 477:17 November 442:www.gnu.org 253:computation 227:lower-level 207:abstraction 55:system call 447:2020-04-25 423:2020-04-25 335:References 203:interfaces 162:LinkedList 159:implements 67:delegation 43:subroutine 268:from one 201:, act as 174:@Override 532:Category 471:Archived 418:man7.org 276:See also 83:Java AWT 39:function 195:library 168:HashSet 61:Purpose 45:) in a 514:  396:  358:  237:execve 219:execve 213:. The 150:public 143:Method 223:glibc 193:Many 153:class 129:In a 102:adapt 49:or a 37:is a 512:ISBN 479:2021 394:ISBN 356:ISBN 318:SWIG 234:and 231:fork 217:and 215:fork 205:for 156:Test 139:Java 504:doi 209:of 534:: 510:. 469:. 465:. 440:. 416:. 33:A 520:. 506:: 481:. 450:. 426:. 402:. 364:. 183:} 171:{ 165:, 30:. 23:.

Index

Wrapping (graphics)
Feature selection § Wrapper method
function
software library
computer program
system call
delegation
Java AWT
Adapter pattern
adapt
error checking
regression testing
programming language
multiple inheritance
Java
Method
library
C Standard Library
interfaces
abstraction
system calls
glibc
lower-level
fork
execve
computation
dynamic binary translation
architecture
instructions
instruction set

Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.

↑