|
Boost : |
From: Alexander Nasonov (alnsn-mycop_at_[hidden])
Date: 2003-05-06 10:04:23
In few words, it's an example of a wrapper for prefix-based input/output.
It's extremely simple to use. You only have to register prefixes for I/O
types and then you can read/write values wrapped into io_any.
If you know the type of a value you've just read you can extract that type
from the value. Though, you don't need to because there is a visitor
support for io_any!
Here is a code:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cpp-experiment/dynamic_any/libs/dynamic_any/example/io_any.cpp?rev=1.3&content-type=text/vnd.viewcvs-markup
Comments are minimal but I think the code is clear.
Build instruction for those who wish to take a look at the implementation:
$ cvs -d:pserver:anonymous_at_[hidden]:/cvsroot/cpp-experiment login
$ cvs -z3 -d:pserver:anonymous_at_[hidden]:/cvsroot/cpp-experiment
co dynamic_any
$ export BOOST_ROOT=/path_to_your_boost_directory
$ cd dynamic_any/libs/dynamic_any/example
$ make io_any
$ ./io_any
-- Alexander Nasonov Remove minus and all between minus and at from my e-mail for timely response
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk