Adaptable component frameworks: Using vector from the C++ standard library as an example
Research output: Chapter in Book/Report/Conference proceeding › Article in proceedings › Research › peer-review
Standard
Adaptable component frameworks : Using vector from the C++ standard library as an example. / Katajainen, Jyrki; Simonsen, Bo.
Proceedings of the 2009 ACM SIGPLAN Workshop on Generic Programming. Association for Computing Machinery, 2009. p. 13-24.Research output: Chapter in Book/Report/Conference proceeding › Article in proceedings › Research › peer-review
Harvard
APA
Vancouver
Author
Bibtex
}
RIS
TY - GEN
T1 - Adaptable component frameworks
AU - Katajainen, Jyrki
AU - Simonsen, Bo
PY - 2009
Y1 - 2009
N2 - The CPH STL is a special edition of the STL, the containers and algorithms part of the C++ standard library. The specification of the generic components of the STL is given in the C++ standard. Any implementation of the STL, e.g. the one that ships with your standard-compliant C++ compiler, should provide at least one realization for each container that has the specified characteristics with respect to performance and safety. In the CPH STL project, our goal is to provide several alternative realizations for each STL container. For example, for associative containers we can provide almost any kind of balanced search tree. Also, we do provide safe and compact versions of each container. To ease the maintenance of this large collection of implementations, we have developed component frameworks for the STL containers. In this paper, we describe the design and implementation of a component framework for vector, which is undoubtedly the most used container of the C++ standard library. In particular, we specify the details of a vector implementation that is safe with respect to referential integrity and strong exception safety. Additionally, we report the experiences and lessons learnt from the development of component frameworks which we hope to be of benefit to persons engaged in the design and implementation of generic software libraries.
AB - The CPH STL is a special edition of the STL, the containers and algorithms part of the C++ standard library. The specification of the generic components of the STL is given in the C++ standard. Any implementation of the STL, e.g. the one that ships with your standard-compliant C++ compiler, should provide at least one realization for each container that has the specified characteristics with respect to performance and safety. In the CPH STL project, our goal is to provide several alternative realizations for each STL container. For example, for associative containers we can provide almost any kind of balanced search tree. Also, we do provide safe and compact versions of each container. To ease the maintenance of this large collection of implementations, we have developed component frameworks for the STL containers. In this paper, we describe the design and implementation of a component framework for vector, which is undoubtedly the most used container of the C++ standard library. In particular, we specify the details of a vector implementation that is safe with respect to referential integrity and strong exception safety. Additionally, we report the experiences and lessons learnt from the development of component frameworks which we hope to be of benefit to persons engaged in the design and implementation of generic software libraries.
U2 - 10.1145/1596614.1596618
DO - 10.1145/1596614.1596618
M3 - Article in proceedings
SN - 978-1-60558-510-9
SP - 13
EP - 24
BT - Proceedings of the 2009 ACM SIGPLAN Workshop on Generic Programming
PB - Association for Computing Machinery
Y2 - 30 August 2009 through 30 August 2009
ER -
ID: 12867164