O'Reilly logo

API Design for C++ by Martin Reddy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 5

Styles

Publisher Summary

This chapter covers the topic of API style. Style in this context means how it is decided to represent the capabilities of API. API may provide access to internal state and routines to perform required functionality. However, there are other styles that one could adopt, and the object-oriented style may not be the best fit all the time. This chapter presents four very different API styles that are flat C APIs, object-oriented C++ APIs, template-based APIs, and data-driven APIs. Throughout the chapter, the examples are used from the FMOD API to illustrate three of the aforementioned styles. FMOD is a commercial library for creating and playing back interactive audio that is used by many games companies, such as ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required