The Wiselib is an algorithm library for sensor networks. It contains various algorithm classes (for instance, localization or routing) that can be compiled for several sensor network platforms such as iSense or Contiki, or the sensor network simulator Shawn. It is completely written in C++, and uses templates in the same way as Boost and CGAL. This makes it possible to write generic and platform independent code that is very efficiently compiled for the various platforms.
Documentation, source code and Wiki at http://www.wiselib.org