From: Frank Birbacher (bloodymir.crap_at_[hidden])
Date: 2008-05-16 07:50:07
namespace fs = boost::filesystem;
I'm trying to use the fs::path with ZeroC Ice, a code generator for
remote calls. Ice needs to marshal and unmarshal parameters for remote
calls. Apart from simple built-in types like int, float, string, it
supports "sequences", which for C++ map to vector, deque, or list, and
simple struct-like all-public-attributes classes. All these types can be
used as funtion parameters and return types.
Now I want to use fs::path as a "native" Ice function parameter. The
interface description which is the input to the generator can contain
"metadata" like "cpp:type". According to the documentation the build-in
"string" type can be mapped only to either "std::string" or
"std::wstring". But using such metadata a "sequence<string>" can be
mapped to the C++ types vector<string> and the like. In fact any STL
compatible container could be used.
As fs::path partially looks like an STL container I tried to map a
"sequence<string>" to a "fs::path". No luck. The docs say (
http://www.zeroc.com/doc/Ice-3.2.1/manual/Cpp.7.7.html#99709 ) a
constructor taking the initial size is needed -.- fs::path doesn't have one.
If we could make fs::path a full blown STL container maybe it'll be more
useful in some contexts and I guess it'll be a little easier to use.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk