Boost logo

Boost Users :

Subject: Re: [Boost-users] Search and replace in text files with Boost.Xpressive
From: Jeff Flinn (TriumphSprint2000_at_[hidden])
Date: 2011-04-02 11:35:22


Júlio Hoffimann wrote:
> Hi Eric,
>
> Thank you for the perfect answer! Could you please guide me with some
> classes/methods names in libraries you told?
>
> For memory-map the file with Boost.Interprocess, what is the class you
> have in mind? I found basic_managed_mapped_file but how can i use it
> with Boost.Xpressive regex_replace() function?
>
> http://www.boost.org/doc/libs/1_46_1/doc/html/interprocess/managed_memory_segments.html#interprocess.managed_memory_segments.managed_mapped_files

You need a boost::interprocess::file_mapping and a
boost::interprocess::mapped_region. The example at your link above
should be enough to get you going.

I've found boost::iostreams::mapped_file[_source/_sink] to be a little
more straightforward, and it directly supports using
boost::filesystem::paths. See:

http://www.boost.org/doc/libs/1_45_0/libs/iostreams/doc/classes/mapped_file.html

Jeff


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net