forward declare mapped_region in mapped_memory_cache.hpp and other shared memory fixups
This commit is contained in:
parent
d2000b465b
commit
134cbc3eec
6 changed files with 10 additions and 6 deletions
|
@ -30,16 +30,14 @@
|
|||
|
||||
// boost
|
||||
#include <boost/unordered_map.hpp>
|
||||
#include <boost/interprocess/mapped_region.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/interprocess/interprocess_fwd.hpp>
|
||||
|
||||
namespace mapnik
|
||||
{
|
||||
|
||||
using namespace boost::interprocess;
|
||||
|
||||
typedef boost::shared_ptr<mapped_region> mapped_region_ptr;
|
||||
typedef boost::shared_ptr<boost::interprocess::mapped_region> mapped_region_ptr;
|
||||
|
||||
class MAPNIK_DECL mapped_memory_cache :
|
||||
public singleton<mapped_memory_cache, CreateStatic>,
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <mapnik/feature_factory.hpp>
|
||||
|
||||
// boost
|
||||
#include <boost/interprocess/mapped_region.hpp>
|
||||
#include <boost/interprocess/streams/bufferstream.hpp>
|
||||
|
||||
// ogr
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include <boost/spirit/include/qi.hpp>
|
||||
#include <boost/cstdint.hpp> // for int16_t and int32_t
|
||||
#ifdef SHAPE_MEMORY_MAPPED_FILE
|
||||
#include <boost/interprocess/mapped_region.hpp>
|
||||
#include <mapnik/mapped_memory_cache.hpp>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -29,7 +29,9 @@
|
|||
|
||||
// boost
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#ifdef SHAPE_MEMORY_MAPPED_FILE
|
||||
#include <boost/interprocess/streams/bufferstream.hpp>
|
||||
#endif
|
||||
#include <boost/make_shared.hpp>
|
||||
|
||||
#include "shape_index_featureset.hpp"
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
#include <mapnik/utils.hpp>
|
||||
#include <mapnik/box2d.hpp>
|
||||
#ifdef SHAPE_MEMORY_MAPPED_FILE
|
||||
#include <boost/interprocess/mapped_region.hpp>
|
||||
#include <mapnik/mapped_memory_cache.hpp>
|
||||
#endif
|
||||
#include <mapnik/noncopyable.hpp>
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
// boost
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/interprocess/mapped_region.hpp>
|
||||
#include <boost/interprocess/file_mapping.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
|
||||
|
@ -67,8 +68,8 @@ boost::optional<mapped_region_ptr> mapped_memory_cache::find(std::string const&
|
|||
{
|
||||
try
|
||||
{
|
||||
file_mapping mapping(uri.c_str(),read_only);
|
||||
mapped_region_ptr region(boost::make_shared<mapped_region>(mapping,read_only));
|
||||
boost::interprocess::file_mapping mapping(uri.c_str(),boost::interprocess::read_only);
|
||||
mapped_region_ptr region(boost::make_shared<boost::interprocess::mapped_region>(mapping,boost::interprocess::read_only));
|
||||
|
||||
result.reset(region);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue