c++ style
This commit is contained in:
parent
56ae40d059
commit
a12b8f1d2f
38 changed files with 88 additions and 88 deletions
|
@ -27,7 +27,7 @@
|
|||
//mapnik
|
||||
#include <mapnik/palette.hpp>
|
||||
|
||||
static boost::shared_ptr<mapnik::rgba_palette> make_palette( const std::string& palette, const std::string& format )
|
||||
static boost::shared_ptr<mapnik::rgba_palette> make_palette( std::string const& palette, std::string const& format )
|
||||
{
|
||||
mapnik::rgba_palette::palette_type type = mapnik::rgba_palette::PALETTE_RGBA;
|
||||
if (format == "rgb")
|
||||
|
|
|
@ -205,8 +205,8 @@ void render6(const mapnik::Map& map, PycairoContext* context)
|
|||
void render_tile_to_file(const mapnik::Map& map,
|
||||
unsigned offset_x, unsigned offset_y,
|
||||
unsigned width, unsigned height,
|
||||
const std::string& file,
|
||||
const std::string& format)
|
||||
std::string const& file,
|
||||
std::string const& format)
|
||||
{
|
||||
mapnik::image_32 image(width,height);
|
||||
render(map,image,1.0,offset_x, offset_y);
|
||||
|
@ -214,8 +214,8 @@ void render_tile_to_file(const mapnik::Map& map,
|
|||
}
|
||||
|
||||
void render_to_file1(const mapnik::Map& map,
|
||||
const std::string& filename,
|
||||
const std::string& format)
|
||||
std::string const& filename,
|
||||
std::string const& format)
|
||||
{
|
||||
if (format == "pdf" || format == "svg" || format =="ps" || format == "ARGB32" || format == "RGB24")
|
||||
{
|
||||
|
@ -233,7 +233,7 @@ void render_to_file1(const mapnik::Map& map,
|
|||
}
|
||||
}
|
||||
|
||||
void render_to_file2(const mapnik::Map& map,const std::string& filename)
|
||||
void render_to_file2(const mapnik::Map& map,std::string const& filename)
|
||||
{
|
||||
std::string format = mapnik::guess_type(filename);
|
||||
if (format == "pdf" || format == "svg" || format =="ps")
|
||||
|
@ -253,8 +253,8 @@ void render_to_file2(const mapnik::Map& map,const std::string& filename)
|
|||
}
|
||||
|
||||
void render_to_file3(const mapnik::Map& map,
|
||||
const std::string& filename,
|
||||
const std::string& format,
|
||||
std::string const& filename,
|
||||
std::string const& format,
|
||||
double scale_factor = 1.0
|
||||
)
|
||||
{
|
||||
|
|
|
@ -87,7 +87,7 @@ public:
|
|||
void re_center(const coord<T,2>& c);
|
||||
void init(T x0,T y0,T x1,T y1);
|
||||
void clip(const box2d_type &other);
|
||||
bool from_string(const std::string& s);
|
||||
bool from_string(std::string const& s);
|
||||
bool valid() const;
|
||||
|
||||
// define some operators
|
||||
|
|
|
@ -49,7 +49,7 @@ private:
|
|||
datasource_cache& operator=(const datasource_cache&);
|
||||
static std::map<std::string,boost::shared_ptr<PluginInfo> > plugins_;
|
||||
static bool registered_;
|
||||
static bool insert(const std::string& name,const lt_dlhandle module);
|
||||
static bool insert(std::string const& name,const lt_dlhandle module);
|
||||
static std::vector<std::string> plugin_directories_;
|
||||
public:
|
||||
static std::vector<std::string> plugin_names();
|
||||
|
|
|
@ -79,7 +79,7 @@ namespace mapnik {
|
|||
}
|
||||
|
||||
// per object security levels
|
||||
static severity_type get_object_severity(const std::string& object_name)
|
||||
static severity_type get_object_severity(std::string const& object_name)
|
||||
{
|
||||
severity_map::iterator it = object_severity_level_.find(object_name);
|
||||
if (object_name.empty() || it == object_severity_level_.end())
|
||||
|
@ -92,7 +92,7 @@ namespace mapnik {
|
|||
}
|
||||
}
|
||||
|
||||
static void set_object_severity(const std::string& object_name,
|
||||
static void set_object_severity(std::string const& object_name,
|
||||
const severity_type& security_level)
|
||||
{
|
||||
#ifdef MAPNIK_THREADSAFE
|
||||
|
@ -119,7 +119,7 @@ namespace mapnik {
|
|||
return format_;
|
||||
}
|
||||
|
||||
static void set_format(const std::string& format)
|
||||
static void set_format(std::string const& format)
|
||||
{
|
||||
#ifdef MAPNIK_THREADSAFE
|
||||
boost::mutex::scoped_lock lock(format_mutex_);
|
||||
|
@ -131,7 +131,7 @@ namespace mapnik {
|
|||
static std::string str();
|
||||
|
||||
// output
|
||||
static void use_file(const std::string& filepath);
|
||||
static void use_file(std::string const& filepath);
|
||||
static void use_console();
|
||||
|
||||
private:
|
||||
|
|
|
@ -76,7 +76,7 @@ public:
|
|||
return map_.erase(key)==1;
|
||||
}
|
||||
|
||||
product_type* create_object(const key_type& key,const std::string& file)
|
||||
product_type* create_object(const key_type& key,std::string const& file)
|
||||
{
|
||||
typename product_map::const_iterator pos=map_.find(key);
|
||||
if (pos!=map_.end())
|
||||
|
|
|
@ -38,7 +38,7 @@ class image_reader_exception : public std::exception
|
|||
private:
|
||||
std::string message_;
|
||||
public:
|
||||
image_reader_exception(const std::string& message)
|
||||
image_reader_exception(std::string const& message)
|
||||
: message_(message) {}
|
||||
|
||||
~image_reader_exception() throw() {}
|
||||
|
@ -57,9 +57,9 @@ struct MAPNIK_DECL image_reader
|
|||
virtual ~image_reader() {}
|
||||
};
|
||||
|
||||
bool register_image_reader(const std::string& type,image_reader* (*)(const std::string&));
|
||||
MAPNIK_DECL image_reader* get_image_reader(const std::string& file,const std::string& type);
|
||||
MAPNIK_DECL image_reader* get_image_reader(const std::string& file);
|
||||
bool register_image_reader(std::string const& type,image_reader* (*)(std::string const&));
|
||||
MAPNIK_DECL image_reader* get_image_reader(std::string const& file,std::string const& type);
|
||||
MAPNIK_DECL image_reader* get_image_reader(std::string const& file);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ class ImageWriterException : public std::exception
|
|||
private:
|
||||
std::string message_;
|
||||
public:
|
||||
ImageWriterException(const std::string& message)
|
||||
ImageWriterException(std::string const& message)
|
||||
: message_(message) {}
|
||||
|
||||
~ImageWriterException() throw() {}
|
||||
|
|
|
@ -159,7 +159,7 @@ public:
|
|||
/*! \brief Remove a style from the map.
|
||||
* @param name The name of the style.
|
||||
*/
|
||||
void remove_style(const std::string& name);
|
||||
void remove_style(std::string const& name);
|
||||
|
||||
/*! \brief Find a style.
|
||||
* @param name The name of the style.
|
||||
|
|
|
@ -40,9 +40,9 @@ private:
|
|||
std::string name_;
|
||||
lt_dlhandle module_;
|
||||
public:
|
||||
PluginInfo (const std::string& name,const lt_dlhandle module);
|
||||
PluginInfo (std::string const& name,const lt_dlhandle module);
|
||||
~PluginInfo();
|
||||
const std::string& name() const;
|
||||
std::string const& name() const;
|
||||
lt_dlhandle handle() const;
|
||||
};
|
||||
}
|
||||
|
|
|
@ -193,7 +193,7 @@ public:
|
|||
else_filter_(false),
|
||||
also_filter_(false) {}
|
||||
|
||||
rule(const std::string& name,
|
||||
rule(std::string const& name,
|
||||
double min_scale_denominator=0,
|
||||
double max_scale_denominator=std::numeric_limits<double>::infinity())
|
||||
: name_(name),
|
||||
|
|
|
@ -29,21 +29,21 @@
|
|||
|
||||
namespace mapnik { namespace sql_utils {
|
||||
|
||||
inline std::string unquote_double(const std::string& sql)
|
||||
inline std::string unquote_double(std::string const& sql)
|
||||
{
|
||||
std::string table_name = sql;
|
||||
boost::algorithm::trim_if(table_name,boost::algorithm::is_any_of("\""));
|
||||
return table_name;
|
||||
}
|
||||
|
||||
inline std::string unquote(const std::string& sql)
|
||||
inline std::string unquote(std::string const& sql)
|
||||
{
|
||||
std::string table_name = sql;
|
||||
boost::algorithm::trim_if(table_name,boost::algorithm::is_any_of("\"\'"));
|
||||
return table_name;
|
||||
}
|
||||
|
||||
inline void quote_attr(std::ostringstream& s, const std::string& field)
|
||||
inline void quote_attr(std::ostringstream& s, std::string const& field)
|
||||
{
|
||||
if (boost::algorithm::icontains(field,".")) {
|
||||
std::vector<std::string> parts;
|
||||
|
@ -56,7 +56,7 @@ namespace mapnik { namespace sql_utils {
|
|||
}
|
||||
}
|
||||
|
||||
inline std::string table_from_sql(const std::string& sql)
|
||||
inline std::string table_from_sql(std::string const& sql)
|
||||
{
|
||||
std::string table_name = sql;
|
||||
boost::algorithm::replace_all(table_name,"\n"," ");
|
||||
|
|
|
@ -49,9 +49,9 @@ using mapnik::feature_factory;
|
|||
geos_featureset::geos_featureset(GEOSGeometry* geometry,
|
||||
GEOSGeometry* extent,
|
||||
int identifier,
|
||||
const std::string& field,
|
||||
const std::string& field_name,
|
||||
const std::string& encoding)
|
||||
std::string const& field,
|
||||
std::string const& field_name,
|
||||
std::string const& encoding)
|
||||
: geometry_(geometry),
|
||||
tr_(new transcoder(encoding)),
|
||||
extent_(extent),
|
||||
|
|
|
@ -42,9 +42,9 @@ public:
|
|||
geos_featureset(GEOSGeometry* geometry,
|
||||
GEOSGeometry* extent,
|
||||
int identifier,
|
||||
const std::string& field,
|
||||
const std::string& field_name,
|
||||
const std::string& encoding);
|
||||
std::string const& field,
|
||||
std::string const& field_name,
|
||||
std::string const& encoding);
|
||||
virtual ~geos_featureset();
|
||||
mapnik::feature_ptr next();
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ featureset_ptr kismet_datasource::features_at_point(coord2d const& pt) const
|
|||
return featureset_ptr();
|
||||
}
|
||||
|
||||
void kismet_datasource::run(const std::string& ip_host, const unsigned int port)
|
||||
void kismet_datasource::run(std::string const& ip_host, const unsigned int port)
|
||||
{
|
||||
MAPNIK_LOG_DEBUG(kismet) << "kismet_datasource: Enter run";
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ public:
|
|||
void bind() const;
|
||||
|
||||
private:
|
||||
void run (const std::string& host, const unsigned int port);
|
||||
void run (std::string const& host, const unsigned int port);
|
||||
|
||||
mapnik::box2d<double> extent_;
|
||||
bool extent_initialized_;
|
||||
|
|
|
@ -76,12 +76,12 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
const std::string& ssid() const
|
||||
std::string const& ssid() const
|
||||
{
|
||||
return ssid_;
|
||||
}
|
||||
|
||||
const std::string& bssid() const
|
||||
std::string const& bssid() const
|
||||
{
|
||||
return bssid_;
|
||||
}
|
||||
|
|
|
@ -156,7 +156,7 @@ public:
|
|||
owns_connection_ = owns_connection;
|
||||
}
|
||||
|
||||
oracle::occi::ResultSet* execute_query(const std::string& s, const unsigned prefetch = 0)
|
||||
oracle::occi::ResultSet* execute_query(std::string const& s, const unsigned prefetch = 0)
|
||||
{
|
||||
close_query(false);
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ public:
|
|||
}
|
||||
|
||||
void layer_by_name(OGRDataSource* const datasource,
|
||||
const std::string& layer_name)
|
||||
std::string const& layer_name)
|
||||
{
|
||||
free_layer();
|
||||
|
||||
|
@ -113,7 +113,7 @@ public:
|
|||
}
|
||||
|
||||
void layer_by_sql(OGRDataSource* const datasource,
|
||||
const std::string& layer_sql)
|
||||
std::string const& layer_sql)
|
||||
{
|
||||
free_layer();
|
||||
|
||||
|
@ -146,7 +146,7 @@ public:
|
|||
#endif
|
||||
}
|
||||
|
||||
const std::string& layer_name() const
|
||||
std::string const& layer_name() const
|
||||
{
|
||||
return layer_name_;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
polygon_types osm_way::ptypes;
|
||||
|
||||
bool osm_dataset::load(const char* filename,const std::string& parser)
|
||||
bool osm_dataset::load(const char* filename,std::string const& parser)
|
||||
{
|
||||
if (parser == "libxml2")
|
||||
{
|
||||
|
@ -43,9 +43,9 @@ bool osm_dataset::load(const char* filename,const std::string& parser)
|
|||
return false;
|
||||
}
|
||||
|
||||
bool osm_dataset::load_from_url(const std::string& url,
|
||||
const std::string& bbox,
|
||||
const std::string& parser)
|
||||
bool osm_dataset::load_from_url(std::string const& url,
|
||||
std::string const& bbox,
|
||||
std::string const& parser)
|
||||
{
|
||||
if (parser == "libxml2")
|
||||
{
|
||||
|
|
|
@ -102,10 +102,10 @@ public:
|
|||
|
||||
~osm_dataset();
|
||||
|
||||
bool load(const char* name, const std::string& parser = "libxml2");
|
||||
bool load_from_url(const std::string&,
|
||||
const std::string&,
|
||||
const std::string& parser = "libxml2");
|
||||
bool load(const char* name, std::string const& parser = "libxml2");
|
||||
bool load_from_url(std::string const&,
|
||||
std::string const&,
|
||||
std::string const& parser = "libxml2");
|
||||
void clear();
|
||||
void add_node(osm_node* n) { nodes.push_back(n); }
|
||||
void add_way(osm_way* w) { ways.push_back(w); }
|
||||
|
|
|
@ -87,7 +87,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
bool execute(const std::string& sql) const
|
||||
bool execute(std::string const& sql) const
|
||||
{
|
||||
#ifdef MAPNIK_STATS
|
||||
mapnik::progress_timer __stats__(std::clog, std::string("postgis_connection::execute ") + sql);
|
||||
|
@ -99,7 +99,7 @@ public:
|
|||
return ok;
|
||||
}
|
||||
|
||||
boost::shared_ptr<ResultSet> executeQuery(const std::string& sql, int type = 0) const
|
||||
boost::shared_ptr<ResultSet> executeQuery(std::string const& sql, int type = 0) const
|
||||
{
|
||||
#ifdef MAPNIK_STATS
|
||||
mapnik::progress_timer __stats__(std::clog, std::string("postgis_connection::execute_query ") + sql);
|
||||
|
|
|
@ -485,7 +485,7 @@ std::string postgis_datasource::sql_bbox(box2d<double> const& env) const
|
|||
return b.str();
|
||||
}
|
||||
|
||||
std::string postgis_datasource::populate_tokens(const std::string& sql) const
|
||||
std::string postgis_datasource::populate_tokens(std::string const& sql) const
|
||||
{
|
||||
std::string populated_sql = sql;
|
||||
|
||||
|
@ -520,7 +520,7 @@ std::string postgis_datasource::populate_tokens(const std::string& sql) const
|
|||
return populated_sql;
|
||||
}
|
||||
|
||||
std::string postgis_datasource::populate_tokens(const std::string& sql, double scale_denom, box2d<double> const& env, double pixel_width, double pixel_height) const
|
||||
std::string postgis_datasource::populate_tokens(std::string const& sql, double scale_denom, box2d<double> const& env, double pixel_width, double pixel_height) const
|
||||
{
|
||||
std::string populated_sql = sql;
|
||||
std::string box = sql_bbox(env);
|
||||
|
|
|
@ -71,9 +71,9 @@ public:
|
|||
|
||||
private:
|
||||
std::string sql_bbox(box2d<double> const& env) const;
|
||||
std::string populate_tokens(const std::string& sql, double scale_denom, box2d<double> const& env, double pixel_width, double pixel_height) const;
|
||||
std::string populate_tokens(const std::string& sql) const;
|
||||
static std::string unquote(const std::string& sql);
|
||||
std::string populate_tokens(std::string const& sql, double scale_denom, box2d<double> const& env, double pixel_width, double pixel_height) const;
|
||||
std::string populate_tokens(std::string const& sql) const;
|
||||
static std::string unquote(std::string const& sql);
|
||||
boost::shared_ptr<IResultSet> get_resultset(boost::shared_ptr<Connection> const &conn, std::string const& sql) const;
|
||||
|
||||
static const std::string GEOMETRY_COLUMNS;
|
||||
|
|
|
@ -33,8 +33,8 @@ using mapnik::box2d;
|
|||
class raster_info
|
||||
{
|
||||
public:
|
||||
raster_info(const std::string& file,
|
||||
const std::string& format,
|
||||
raster_info(std::string const& file,
|
||||
std::string const& format,
|
||||
const box2d<double>& extent,
|
||||
unsigned width,
|
||||
unsigned height);
|
||||
|
|
|
@ -63,7 +63,7 @@ private:
|
|||
char* record_;
|
||||
public:
|
||||
dbf_file();
|
||||
dbf_file(const std::string& file_name);
|
||||
dbf_file(std::string const& file_name);
|
||||
~dbf_file();
|
||||
bool is_open();
|
||||
int num_records() const;
|
||||
|
|
|
@ -37,7 +37,7 @@ const std::string shape_io::SHP = ".shp";
|
|||
const std::string shape_io::DBF = ".dbf";
|
||||
const std::string shape_io::INDEX = ".index";
|
||||
|
||||
shape_io::shape_io(const std::string& shape_name, bool open_index)
|
||||
shape_io::shape_io(std::string const& shape_name, bool open_index)
|
||||
: type_(shape_null),
|
||||
shp_(shape_name + SHP),
|
||||
dbf_(shape_name + DBF),
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
shape_multipatch = 31
|
||||
};
|
||||
|
||||
shape_io(const std::string& shape_name, bool open_index=true);
|
||||
shape_io(std::string const& shape_name, bool open_index=true);
|
||||
~shape_io();
|
||||
|
||||
shape_file& shp();
|
||||
|
|
|
@ -51,7 +51,7 @@ class sqlite_connection
|
|||
{
|
||||
public:
|
||||
|
||||
sqlite_connection (const std::string& file)
|
||||
sqlite_connection (std::string const& file)
|
||||
: db_(0),
|
||||
file_(file)
|
||||
{
|
||||
|
@ -77,7 +77,7 @@ public:
|
|||
sqlite3_busy_timeout(db_,5000);
|
||||
}
|
||||
|
||||
sqlite_connection (const std::string& file, int flags)
|
||||
sqlite_connection (std::string const& file, int flags)
|
||||
: db_(0),
|
||||
file_(file)
|
||||
{
|
||||
|
@ -104,7 +104,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
void throw_sqlite_error(const std::string& sql)
|
||||
void throw_sqlite_error(std::string const& sql)
|
||||
{
|
||||
std::ostringstream s;
|
||||
s << "Sqlite Plugin: ";
|
||||
|
@ -119,7 +119,7 @@ public:
|
|||
throw mapnik::datasource_exception (s.str());
|
||||
}
|
||||
|
||||
boost::shared_ptr<sqlite_resultset> execute_query(const std::string& sql)
|
||||
boost::shared_ptr<sqlite_resultset> execute_query(std::string const& sql)
|
||||
{
|
||||
#ifdef MAPNIK_STATS
|
||||
mapnik::progress_timer __stats__(std::clog, std::string("sqlite_resultset::execute_query ") + sql);
|
||||
|
@ -135,7 +135,7 @@ public:
|
|||
return boost::make_shared<sqlite_resultset>(stmt);
|
||||
}
|
||||
|
||||
void execute(const std::string& sql)
|
||||
void execute(std::string const& sql)
|
||||
{
|
||||
#ifdef MAPNIK_STATS
|
||||
mapnik::progress_timer __stats__(std::clog, std::string("sqlite_resultset::execute ") + sql);
|
||||
|
@ -148,7 +148,7 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
int execute_with_code(const std::string& sql)
|
||||
int execute_with_code(std::string const& sql)
|
||||
{
|
||||
#ifdef MAPNIK_STATS
|
||||
mapnik::progress_timer __stats__(std::clog, std::string("sqlite_resultset::execute_with_code ") + sql);
|
||||
|
|
|
@ -375,7 +375,7 @@ void sqlite_datasource::bind() const
|
|||
is_bound_ = true;
|
||||
}
|
||||
|
||||
std::string sqlite_datasource::populate_tokens(const std::string& sql) const
|
||||
std::string sqlite_datasource::populate_tokens(std::string const& sql) const
|
||||
{
|
||||
std::string populated_sql = sql;
|
||||
if (boost::algorithm::ifind_first(populated_sql, intersects_token_))
|
||||
|
|
|
@ -63,7 +63,7 @@ private:
|
|||
// Fill init_statements with any statements
|
||||
// needed to attach auxillary databases
|
||||
void parse_attachdb(std::string const& attachdb) const;
|
||||
std::string populate_tokens(const std::string& sql) const;
|
||||
std::string populate_tokens(std::string const& sql) const;
|
||||
|
||||
// FIXME: remove mutable qualifier from data members
|
||||
// by factoring out bind() logic out from
|
||||
|
|
|
@ -349,7 +349,7 @@ template <typename T>
|
|||
#if !defined(__SUNPRO_CC)
|
||||
inline
|
||||
#endif
|
||||
bool box2d<T>::from_string(const std::string& s)
|
||||
bool box2d<T>::from_string(std::string const& s)
|
||||
{
|
||||
unsigned i = 0;
|
||||
double d[4];
|
||||
|
|
|
@ -114,7 +114,7 @@ std::ofstream logger::file_output_;
|
|||
std::string logger::file_name_;
|
||||
std::streambuf* logger::saved_buf_ = 0;
|
||||
|
||||
void logger::use_file(const std::string& filepath)
|
||||
void logger::use_file(std::string const& filepath)
|
||||
{
|
||||
// save clog rdbuf
|
||||
if (saved_buf_ == 0)
|
||||
|
|
|
@ -28,20 +28,20 @@
|
|||
namespace mapnik
|
||||
{
|
||||
typedef factory<image_reader,std::string,
|
||||
image_reader* (*)(const std::string&)> ImageReaderFactory;
|
||||
image_reader* (*)(std::string const&)> ImageReaderFactory;
|
||||
|
||||
|
||||
bool register_image_reader(const std::string& type,image_reader* (* fun)(const std::string&))
|
||||
bool register_image_reader(std::string const& type,image_reader* (* fun)(std::string const&))
|
||||
{
|
||||
return ImageReaderFactory::instance()->register_product(type,fun);
|
||||
}
|
||||
|
||||
image_reader* get_image_reader(const std::string& filename,const std::string& type)
|
||||
image_reader* get_image_reader(std::string const& filename,std::string const& type)
|
||||
{
|
||||
return ImageReaderFactory::instance()->create_object(type,filename);
|
||||
}
|
||||
|
||||
image_reader* get_image_reader(const std::string& filename)
|
||||
image_reader* get_image_reader(std::string const& filename)
|
||||
{
|
||||
boost::optional<std::string> type = type_from_filename(filename);
|
||||
if (type)
|
||||
|
|
|
@ -46,7 +46,7 @@ private:
|
|||
unsigned width_;
|
||||
unsigned height_;
|
||||
public:
|
||||
explicit JpegReader(const std::string& fileName);
|
||||
explicit JpegReader(std::string const& fileName);
|
||||
~JpegReader();
|
||||
unsigned width() const;
|
||||
unsigned height() const;
|
||||
|
@ -57,14 +57,14 @@ private:
|
|||
|
||||
namespace
|
||||
{
|
||||
image_reader* createJpegReader(const std::string& file)
|
||||
image_reader* createJpegReader(std::string const& file)
|
||||
{
|
||||
return new JpegReader(file);
|
||||
}
|
||||
const bool registered = register_image_reader("jpeg",createJpegReader);
|
||||
}
|
||||
|
||||
JpegReader::JpegReader(const std::string& fileName)
|
||||
JpegReader::JpegReader(std::string const& fileName)
|
||||
: fileName_(fileName),
|
||||
width_(0),
|
||||
height_(0)
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
namespace mapnik
|
||||
{
|
||||
|
||||
PluginInfo::PluginInfo (const std::string& name,const lt_dlhandle module)
|
||||
PluginInfo::PluginInfo (std::string const& name,const lt_dlhandle module)
|
||||
:name_(name),module_(module) {}
|
||||
|
||||
PluginInfo::~PluginInfo()
|
||||
|
@ -37,7 +37,7 @@ PluginInfo::~PluginInfo()
|
|||
}
|
||||
}
|
||||
|
||||
const std::string& PluginInfo::name() const
|
||||
std::string const& PluginInfo::name() const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ private:
|
|||
int bit_depth_;
|
||||
int color_type_;
|
||||
public:
|
||||
explicit png_reader(const std::string& fileName);
|
||||
explicit png_reader(std::string const& fileName);
|
||||
~png_reader();
|
||||
unsigned width() const;
|
||||
unsigned height() const;
|
||||
|
@ -53,14 +53,14 @@ private:
|
|||
|
||||
namespace
|
||||
{
|
||||
image_reader* create_png_reader(const std::string& file)
|
||||
image_reader* create_png_reader(std::string const& file)
|
||||
{
|
||||
return new png_reader(file);
|
||||
}
|
||||
const bool registered = register_image_reader("png",create_png_reader);
|
||||
}
|
||||
|
||||
png_reader::png_reader(const std::string& fileName)
|
||||
png_reader::png_reader(std::string const& fileName)
|
||||
: fileName_(fileName),
|
||||
width_(0),
|
||||
height_(0),
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
stripped,
|
||||
tiled
|
||||
};
|
||||
explicit tiff_reader(const std::string& file_name);
|
||||
explicit tiff_reader(std::string const& file_name);
|
||||
virtual ~tiff_reader();
|
||||
unsigned width() const;
|
||||
unsigned height() const;
|
||||
|
@ -67,12 +67,12 @@ private:
|
|||
void read_generic(unsigned x,unsigned y,image_data_32& image);
|
||||
void read_stripped(unsigned x,unsigned y,image_data_32& image);
|
||||
void read_tiled(unsigned x,unsigned y,image_data_32& image);
|
||||
TIFF* load_if_exists(const std::string& filename);
|
||||
TIFF* load_if_exists(std::string const& filename);
|
||||
};
|
||||
|
||||
namespace
|
||||
{
|
||||
image_reader* create_tiff_reader(const std::string& file)
|
||||
image_reader* create_tiff_reader(std::string const& file)
|
||||
{
|
||||
return new tiff_reader(file);
|
||||
}
|
||||
|
@ -80,7 +80,7 @@ image_reader* create_tiff_reader(const std::string& file)
|
|||
const bool registered = register_image_reader("tiff",create_tiff_reader);
|
||||
}
|
||||
|
||||
tiff_reader::tiff_reader(const std::string& file_name)
|
||||
tiff_reader::tiff_reader(std::string const& file_name)
|
||||
: file_name_(file_name),
|
||||
read_method_(generic),
|
||||
width_(0),
|
||||
|
|
Loading…
Add table
Reference in a new issue