Skip to main content

Mixin-Based Programming in C++

  • Conference paper
  • First Online:
Generative and Component-Based Software Engineering (GCSE 2000)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2177))

Abstract

Combinations of C++ features, like inheritance, templates, and class nesting, allow for the expression of powerful component patterns. In particular, research has demonstrated that, using C++ mixin classes, one can express layered component-based designs concisely with efficient implementations. In this paper, we discuss pragmatic issues related to component-based programming using C++ mixins. We explain surprising interactions of C++ features and policies that sometimes complicate mixin implementations, while other times enable additional functionality without extra effort.

We gratefully acknowledge the sponsorship of Microsoft Research, the Defense Advanced Research Projects Agency (Cooperative Agreement F30602-96-2-0226), and the University of Texas at Austin Applied Research Laboratories.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. ANSI / ISO Standard: Programming Languages-C++, ISO/IEC 14882, 1998.

    Google Scholar 

  2. J. Barton and L. R. Nackman, Scientific and Engineering C++: An Introduction with Advanced Techniques and Applications, Addison-Wesley, 1994.

    Google Scholar 

  3. D. Batory, V. Singhal, M. Sirkin, and J. Thomas, “Scalable Software Libraries”, ACM SIGSOFT1993.

    Google Scholar 

  4. D. Batory, R. Cardone, and Y. Smaragdakis, “Object-Oriented Frameworks and Product-Lines”, 1st Software Product-Line Conference, Denver, Colorado, August 1999.

    Google Scholar 

  5. K. Beck and W. Cunningham, “A Laboratory for Teaching Object-Oriented Thinking”, OOPSLA1989, 1–6.

    Google Scholar 

  6. G. Bracha and W. Cook, “Mixin-Based Inheritance”, ECOOP/OOPSLA 90, 303–311.

    Google Scholar 

  7. G. Bracha, M. Odersky, D. Stoutamire and P. Wadler, “Making the future safe for the past: Adding Genericity to the Java Programming Language”, OOPSLA 98.

    Google Scholar 

  8. P. Canning, W. Cook, W. Hill, W. Olthoff, and J. C. Mitchell, “F-bounded Polymorphism for Object-Oriented Programming”, in Proc. Conf. on Functional Programming Languages and Computer Architecture, 1989, 273–280.

    Google Scholar 

  9. J. Coplien, “Curiously Recurring Template Patterns”, C++ Report, 7(2):24–27, Feb. 1995.

    Google Scholar 

  10. K. Czarnecki and U. Eisenecker. Generative Programming: Methods, Tools, and Applications. Addison-Wesley, 2000.

    Google Scholar 

  11. K. Czarnecki and U. Eisenecker, “Synthesizing Objects”, ECOOP1999, 18–42.

    Google Scholar 

  12. U. Eisenecker, “Generative Programming in C++”, in Proc. Joint Modular Languages Conference (JMLC’97), LNCS1204, Springer, 1997, 351–365.

    Google Scholar 

  13. M. A. Ellis and B. Stroustrup, The Annotated C++ Reference Manual, Addison-Wesley, 1990.

    Google Scholar 

  14. E. Gamma, R. Helm, R. Johnson, and J. Vlissides, Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1994.

    Google Scholar 

  15. R. Helm, I. Holland, and D. Gangopadhyay, “Contracts: Specifying Behavioral Compositions in Object-Oriented Systems”. OOPSLA1990, 169–180.

    Google Scholar 

  16. I. Holland, “Specifying Reusable Components Using Contracts”, ECOOP1992, 287–308.

    Google Scholar 

  17. R. Johnson and B. Foote, “Designing Reusable Classes”, J. of Object-Oriented Programming, 1(2): June/July 1988, 22–35.

    Google Scholar 

  18. G. Kiczales, J. des Rivieres, and D. G. Bobrow, The Art of the Metaobject Protocol. MIT Press, 1991.

    Google Scholar 

  19. O. L. Madsen, B. Møller-Pedersen, and K. Nygaard, Object-Oriented Programming in the BETA Programming Language. Addison-Wesley, 1993.

    Google Scholar 

  20. D. A. Moon, “Object-Oriented Programming with Flavors”, OOPSLA1986.

    Google Scholar 

  21. T. Reenskaug, E. Anderson, A. Berre, A. Hurlen, A. Landmark, O. Lehne, E. Nordhagen, E. Ness-Ulseth, G. Oftedal, A. Skaar, and P. Stenslet, “OORASS: Seamless Support for the Creation and Maintenance of Object-Oriented Systems”, J. of Object-Oriented Programming, 5(6): October 1992, 27–41.

    Google Scholar 

  22. Silicon Graphics Computer Systems Inc., STL Programmer’s Guide. See: http://www.sgi.com/Technology/STL/.

  23. V. Singhal, A Programming Language for Writing Domain-Specific Software System Generators, Ph. D. Dissertation, Dep. of Computer Sciences, University of Texas at Austin, August 1996.

    Google Scholar 

  24. Y. Smaragdakis and D. Batory, “Implementing Reusable Object-Oriented Components”. In the 5th Int. Conf. on Software Reuse (ICSR 98).

    Google Scholar 

  25. Y. Smaragdakis and D. Batory, “Implementing Layered Designs with Mixin Layers”. In ECOOP 98.

    Google Scholar 

  26. Y. Smaragdakis, “Implementing Large-Scale Object-Oriented Components”, Ph. D. Dissertation, Department of Computer Sciences, University of Texas at Austin, December 1999.

    Google Scholar 

  27. A. Stepanov and M. Lee, “The Standard Template Library”. Incorporated in ANSI/ISO Committee C++ Standard.

    Google Scholar 

  28. B. Stroustrup, The C++ Programming Language, 3rd Ed., Addison-Wesley, 1997.

    Google Scholar 

  29. M. VanHilst and D. Notkin, “Using C++ Templates to Implement Role-Based Designs”. JSSST International Symposium on Object Technologies for Advanced Software, Springer-Verlag, 1996, 22–37.

    Google Scholar 

  30. M. VanHilst and D. Notkin, “Using Role Components to Implement Collaboration-Based Designs”. OOPSLA1996.

    Google Scholar 

  31. M. VanHilst and D. Notkin, “Decoupling Change From Design”, SIGSOFT 96.

    Google Scholar 

  32. P. Wadler, M. Odersky and Y. Smaragdakis, “Do Parametric Types Beat Virtual Types?”, unpublished manuscript, posted in October 1998 in the Java Genericity mailing list (java-genericity@cs.rice.ed).

    Google Scholar 

  33. K. Weihe, “A Software Engineering Perspective on Algorithmics”, available at http://www.informatik.uni-konstanz.de/Preprints/.

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2001 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Smaragdakis, Y., Batory, D. (2001). Mixin-Based Programming in C++. In: Butler, G., Jarzabek, S. (eds) Generative and Component-Based Software Engineering. GCSE 2000. Lecture Notes in Computer Science, vol 2177. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44815-2_12

Download citation

  • DOI: https://doi.org/10.1007/3-540-44815-2_12

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-42578-6

  • Online ISBN: 978-3-540-44815-0

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics