This wrapper may be distributed under the terms of the General Public License (see COPYING)
See VERSION for version information.
A C++ wrapper for fam from sgi.
fam can be found at http://oss.sgi.com/projects/fam/
fam uses imon to inform it when inodes change, the net effect being that applications can register interest in a file, and have events send to the application when the file changes.
The fam++ wrapper (hopefully) makes fam a little easier to use. It does this by using exceptions instead of return values to indicate error, allow type safe callbacks using functors and compile time checking.
If GDK http://developer.gnome.org/doc/API/gdk/index.html is installed and #included before fam.hh then there is an additional class Fampp_gdk which calls gdk functions to allow gdk to signal the fam++ wrapper which will call your functor when file changes occur.
The GDK subclass hopefully make it nice and easy to use fam++ from a GTK+ application.
At the moment there is no real doco for this wrapper. I will (hopefully) document the API sometime soon.
Also note that automake/conf are not currently used for the examples... they are very simple and I don't know that I will be rushing to add support for auto stuff soon, the only real need is for location of the SGI STL (or any other STL that has hash_map<>). The code does not require hash_map<> but if #include <hash_map.h> has occured before the fam.hh is included then the wrapper does use this collection. if hash_map<> is not available then map<> is used, but it is a waste, the collection does not need to be ordered...
The following are the reasons for my choices
- Rationale
I made FamppRequest copy const and assign operator private so that no model is required for each request. A trade off in code/complexity verses flexability.
- Rationale
I used a FamppRequest* for the monitor methods return type because I didn't want the fam++ wrapper imposing a lifetime on requests.
