Abstract
Families of independent classes, where each class represents a separate, orthogonal concern are highly attractive for implementing collaboration-based design. However, required subtype relationship between such families cannot be expressed in many programming languages. This paper presents a framework to handle collaborating groups of classes using template metaprogramming based on standard C++ features in the style of Loki::Typelist. Our solution provides tailor-made implicit conversion rules between appropriate groups, inclusion polymorphism and a tool for dynamic binding.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
Alexandrescu, A.: Modern C++ Design: Generic Programming and Design Patterns Applied. Addison-Wesley, Reading (2001)
Bergmans, L., Aksit, M.: Composing Crosscutting Concerns Using Composition Filters. Communications of the ACM 44(10), 51–57 (2001)
Bruce, K.B.: Foundations of Object-Oriented Languages. The MIT Press, Cambridge (2002)
Cardelli, L.: Structural Subtyping and the Notion of Power Type. In: Conference Record of the 15th Annual ACM Symposium on Principles of Programming Languages, San Diego, California, January 1988, pp. 70–79 (1988)
Eclipse. The aspectj project, http://www.eclipse.org/aspectj/
Czarnecki, K., Eisenecker, U.W.: Generative Programming: Methods, Tools and Applications. Addison-Wesley, Reading (2000)
Eisenecker, U.W., Blinn, F., Czarnecki, K.: A Solution to the Constructor-Problem of Mixin-Based Programming in C++. Presented at the GCSE2000 Workshop on C++ Template Programming
Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C.V., Loingtier, J.-M., Irwin, J.: Aspect-Oriented Programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)
Meyers, S.: Effective STL, pp. 33–35. Addison-Wesley, Reading (2001)
Patrick, A., Muckelbauer, V.F.: Russo. Lingua Franca: An IDL for Structural Subtyping Distributed Object Systems. USENIX Conference on Object-Oriented Technologies (COOTS), http://www.usenix.org/publications/library/proceedings/coots95/
Ossher, H., Tarr, P.: Multi-Dimensional Separation of Concerns and The Hyperspace Approach. IBM Research Report 21452, IBM T.J. Watson Research Center (April 1999), http://www.research.ibm.com/hyperspace/Papers/tr21452.ps
Smaragdakis, Y., Batory, D.: Mixin-Based Programming in C++. In: Proceedings of Net Object Days, pp. 464–478 (2000)
Spinczyk, O., Gal, A., Schröder-Preikschat, W.: AspectC++: An Aspect-Oriented Extension to C++. In: Proceedings of the 40th International Conference on Technology of Object-Oriented Languages and Systems (TOOLS Pacific 2002), Sydney, Australia, February 18-21 (2002), http://www.aspectc.org/download/tools2002.ps.gz
Stroustrup, B.: The C++ Programming Language Special Edition. Addison-Wesley, Reading (2000)
Ossher, H., Tarr, P.: Multi-Dimensional Separation of Concerns and The Hyperspace Approach. IBM Research Report 21452, IBM T.J. Watson Research Center (April 1999), http://www.research.ibm.com/hyperspace/Papers/tr21452.ps
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Zólyomi, I., Porkoláb, Z., Kozsik, T. (2003). An Extension to the Subtype Relationship in C++ Implemented with Template Metaprogramming. In: Pfenning, F., Smaragdakis, Y. (eds) Generative Programming and Component Engineering. GPCE 2003. Lecture Notes in Computer Science, vol 2830. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-39815-8_13
Download citation
DOI: https://doi.org/10.1007/978-3-540-39815-8_13
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-20102-1
Online ISBN: 978-3-540-39815-8
eBook Packages: Springer Book Archive