VTL

View Template Library



Site map

Home
Documentation
Download
Performance
Links


This is the project page of the View Template Library (VTL) written by Gary Powell and Martin Weiser. VTL is a thin yet flexible adaptor layer on top of the Standard Template Library (STL) for C++. Software, documentation and web site are currently in pre-alpha state, though slowly approaching alpha state. Development snapshots are available in the download section.

About Views

A view is a container adaptor, that provides a container interface to

  • parts of the data or
  • a rearrangement of the data or
  • transformed data or
  • a suitable combination of the data sets

of the underlying container(s). Since views themselves provide the container interface, they can be easily combined and stacked. Because of template trickery, views can adapt their interface to the underlying container(s). More sophisticated template trickery makes this powerful feature easy to use.

Compared with smart iterators, views are just smart iterator factories.

There are some rather close semantic connections to relational algebra.

Supported compilers: Currently the VTL is known to work at least with GCC 2.95. Since it uses partial specialization, template template parameters and default template parameters a lot, several compilers may not be able to handle it (e.g. Visual C++ and Sun CC seem to fail). We would be glad to hear from users of different compilers.

The VTL was heavily inspired by the Views library by Jon Seymour. His library should work with Visual C++, too.

A note for CUJ readers: The documentation in the powell.zip archive on the CUJ ftp server contains stl: prefixes in several links. This way the documentation can be linked to an SGI STL documentation at an arbitrary location by running the shell script localize.sh with the STL documentation URL to substitute the stl: prefixes with the given URL. Unfortunately this handy script didn't make it into the archive. You can get it here.

Publications

G. Powell, M. Weiser: Views, A New Form of Container Adaptors. C/C++ Users Journal, April 2000

Erratum: On page 42 we use a function pointer as a transformation for transform_view. Since transform_view relies on the result_type typedef in a unary function class, this is plain wrong. We should have used std::ptr_fun() around the function pointer to supply the typedef.
(Thanks to B. Gustafsson)

M. Weiser, G. Powell: The View Template Library. Proceedings of the First Workshop on C++ Template Programming, Erfurt, Germany, 2000.

License

Copyright (c) 1999, 2000 Gary Powell
Copyright (c) 1999, 2000 Konrad Zuse Zentrum für Informationstechnik Berlin

This material is provided "as is", with absolutely no warranty expressed or implied. Any use is at your own risk.

Permission to use or copy this software for any purpose is hereby granted without fee, provided the above notices are retained on all copies. Permission to modify the code and to distribute modified code is granted, provided the above notices are retained, and a notice that the code was modified is included with the above copyright notice.

Last update: 2000-11-29

Pageviews: 3395

Copyright © 2000 by Gary Powell and Konrad-Zuse-Zentrum für Informationstechnik Berlin