plugin code formatting based on emacs format in utils/format_source_files
This commit is contained in:
parent
3fd56f82f5
commit
ce9e44b5f2
88 changed files with 1873 additions and 1873 deletions
|
@ -68,7 +68,7 @@ const std::string occi_datasource::METADATA_TABLE = "USER_SDO_GEOM_METADATA";
|
|||
DATASOURCE_PLUGIN(occi_datasource)
|
||||
|
||||
occi_datasource::occi_datasource(parameters const& params, bool bind)
|
||||
: datasource (params),
|
||||
: datasource (params),
|
||||
type_(datasource::Vector),
|
||||
fields_(*params_.get<std::string>("fields", "*")),
|
||||
geometry_field_(*params_.get<std::string>("geometry_field", "")),
|
||||
|
|
|
@ -35,9 +35,9 @@
|
|||
|
||||
// check for oracle support
|
||||
#if OCCI_MAJOR_VERSION >= 10 && OCCI_MINOR_VERSION >= 1
|
||||
// We have at least ORACLE 10g >= 10.2.0.X
|
||||
// We have at least ORACLE 10g >= 10.2.0.X
|
||||
#else
|
||||
#error Only ORACLE 10g >= 10.2.0.X is supported !
|
||||
#error Only ORACLE 10g >= 10.2.0.X is supported !
|
||||
#endif
|
||||
|
||||
// geometry types definitions
|
||||
|
|
|
@ -110,12 +110,12 @@ feature_ptr ogr_index_featureset<filterT>::next()
|
|||
{
|
||||
ogr_converter::convert_geometry (geom, feature, multiple_geometries_);
|
||||
}
|
||||
#ifdef MAPNIK_DEBUG
|
||||
#ifdef MAPNIK_DEBUG
|
||||
else
|
||||
{
|
||||
std::clog << "### Warning: feature with null geometry: " << (*feat)->GetFID() << "\n";
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
int fld_count = layerdef_->GetFieldCount();
|
||||
for (int i = 0; i < fld_count; i++)
|
||||
|
@ -151,17 +151,17 @@ feature_ptr ogr_index_featureset<filterT>::next()
|
|||
case OFTStringList:
|
||||
case OFTWideStringList: // deprecated !
|
||||
{
|
||||
#ifdef MAPNIK_DEBUG
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::clog << "OGR Plugin: unhandled type_oid=" << type_oid << std::endl;
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
case OFTBinary:
|
||||
{
|
||||
#ifdef MAPNIK_DEBUG
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::clog << "OGR Plugin: unhandled type_oid=" << type_oid << std::endl;
|
||||
#endif
|
||||
#endif
|
||||
//boost::put(*feature,name,feat->GetFieldAsBinary (i, size));
|
||||
break;
|
||||
}
|
||||
|
@ -170,17 +170,17 @@ feature_ptr ogr_index_featureset<filterT>::next()
|
|||
case OFTTime:
|
||||
case OFTDateTime: // unhandled !
|
||||
{
|
||||
#ifdef MAPNIK_DEBUG
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::clog << "OGR Plugin: unhandled type_oid=" << type_oid << std::endl;
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
default: // unknown
|
||||
{
|
||||
#ifdef MAPNIK_DEBUG
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::clog << "OGR Plugin: unknown type_oid=" << type_oid << std::endl;
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,7 +50,7 @@ using mapnik::attribute_descriptor;
|
|||
DATASOURCE_PLUGIN(osm_datasource)
|
||||
|
||||
osm_datasource::osm_datasource(const parameters& params, bool bind)
|
||||
: datasource (params),
|
||||
: datasource (params),
|
||||
type_(datasource::Vector),
|
||||
desc_(*params_.get<std::string>("type"), *params_.get<std::string>("encoding", "utf-8"))
|
||||
{
|
||||
|
|
|
@ -9,12 +9,12 @@ using std::cerr;
|
|||
using std::endl;
|
||||
|
||||
|
||||
osm_item* osmparser::cur_item=NULL;
|
||||
long osmparser::curID=0;
|
||||
bool osmparser::in_node=false, osmparser::in_way=false;
|
||||
osm_dataset* osmparser::components=NULL;
|
||||
std::string osmparser::error="";
|
||||
std::map<long,osm_node*> osmparser::tmp_node_store=std::map<long,osm_node*>();
|
||||
osm_item* osmparser::cur_item=NULL;
|
||||
long osmparser::curID=0;
|
||||
bool osmparser::in_node=false, osmparser::in_way=false;
|
||||
osm_dataset* osmparser::components=NULL;
|
||||
std::string osmparser::error="";
|
||||
std::map<long,osm_node*> osmparser::tmp_node_store=std::map<long,osm_node*>();
|
||||
|
||||
void osmparser::processNode(xmlTextReaderPtr reader)
|
||||
{
|
||||
|
|
|
@ -27,18 +27,18 @@
|
|||
#include <boost/make_shared.hpp>
|
||||
|
||||
extern "C" {
|
||||
#include "libpq-fe.h"
|
||||
#include "libpq-fe.h"
|
||||
}
|
||||
|
||||
#include "resultset.hpp"
|
||||
|
||||
class Connection
|
||||
{
|
||||
private:
|
||||
private:
|
||||
PGconn *conn_;
|
||||
int cursorId;
|
||||
bool closed_;
|
||||
public:
|
||||
public:
|
||||
Connection(std::string const& connection_str)
|
||||
:cursorId(0),
|
||||
closed_(false)
|
||||
|
|
|
@ -303,7 +303,7 @@ void postgis_datasource::bind() const
|
|||
desc_.add_descriptor(attribute_descriptor(fld_name,mapnik::String));
|
||||
break;
|
||||
default: // should not get here
|
||||
#ifdef MAPNIK_DEBUG
|
||||
#ifdef MAPNIK_DEBUG
|
||||
s.str("");
|
||||
s << "SELECT oid, typname FROM pg_type WHERE oid = " << type_oid;
|
||||
|
||||
|
@ -325,7 +325,7 @@ void postgis_datasource::bind() const
|
|||
std::clog << "Postgis Plugin: unknown oid type =" << type_oid << std::endl;
|
||||
}
|
||||
rs_oid->close();
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,7 +80,7 @@ class postgis_datasource : public datasource
|
|||
int intersect_min_scale_;
|
||||
int intersect_max_scale_;
|
||||
//bool show_queries_;
|
||||
public:
|
||||
public:
|
||||
static std::string name();
|
||||
int type() const;
|
||||
featureset_ptr features(const query& q) const;
|
||||
|
@ -90,7 +90,7 @@ class postgis_datasource : public datasource
|
|||
postgis_datasource(const parameters ¶ms, bool bind=true);
|
||||
~postgis_datasource();
|
||||
void bind() const;
|
||||
private:
|
||||
private:
|
||||
std::string sql_bbox(box2d<double> const& env) const;
|
||||
std::string populate_tokens(const std::string& sql, double const& scale_denom, box2d<double> const& env) const;
|
||||
std::string populate_tokens(const std::string& sql) const;
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#define RESULTSET_HPP
|
||||
|
||||
extern "C" {
|
||||
#include "libpq-fe.h"
|
||||
#include "libpq-fe.h"
|
||||
}
|
||||
|
||||
class IResultSet
|
||||
|
|
|
@ -46,7 +46,7 @@ using mapnik::image_reader;
|
|||
DATASOURCE_PLUGIN(raster_datasource)
|
||||
|
||||
raster_datasource::raster_datasource(const parameters& params, bool bind)
|
||||
: datasource(params),
|
||||
: datasource(params),
|
||||
desc_(*params.get<std::string>("type"), "utf-8"),
|
||||
extent_initialized_(false)
|
||||
{
|
||||
|
|
|
@ -24,8 +24,8 @@
|
|||
#define RASTERLITE_INCLUDE_HPP
|
||||
|
||||
extern "C" {
|
||||
#include <sqlite3.h>
|
||||
#include <rasterlite.h>
|
||||
#include <sqlite3.h>
|
||||
#include <rasterlite.h>
|
||||
}
|
||||
|
||||
#endif // RASTERLITE_INCLUDE_HPP
|
||||
|
|
|
@ -52,7 +52,7 @@ class shape_featureset : public Featureset
|
|||
mutable int count_;
|
||||
const int row_limit_;
|
||||
|
||||
public:
|
||||
public:
|
||||
shape_featureset(const filterT& filter,
|
||||
const std::string& shape_file,
|
||||
const std::set<std::string>& attribute_names,
|
||||
|
@ -62,7 +62,7 @@ class shape_featureset : public Featureset
|
|||
virtual ~shape_featureset();
|
||||
feature_ptr next();
|
||||
|
||||
private:
|
||||
private:
|
||||
shape_featureset(const shape_featureset&);
|
||||
const shape_featureset& operator=(const shape_featureset&);
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
// sqlite
|
||||
extern "C" {
|
||||
#include <sqlite3.h>
|
||||
#include <sqlite3.h>
|
||||
}
|
||||
|
||||
#include "sqlite_resultset.hpp"
|
||||
|
@ -56,13 +56,13 @@ public:
|
|||
{
|
||||
#if SQLITE_VERSION_NUMBER >= 3005000
|
||||
int mode = SQLITE_OPEN_READWRITE;
|
||||
#if SQLITE_VERSION_NUMBER >= 3006018
|
||||
#if SQLITE_VERSION_NUMBER >= 3006018
|
||||
// shared cache flag not available until >= 3.6.18
|
||||
mode |= SQLITE_OPEN_NOMUTEX | SQLITE_OPEN_SHAREDCACHE;
|
||||
#endif
|
||||
#endif
|
||||
const int rc = sqlite3_open_v2 (file_.c_str(), &db_, mode, 0);
|
||||
#else
|
||||
#warning "Mapnik's sqlite plugin is compiling against a version of sqlite older than 3.5.x which may make rendering slow..."
|
||||
#warning "Mapnik's sqlite plugin is compiling against a version of sqlite older than 3.5.x which may make rendering slow..."
|
||||
const int rc = sqlite3_open (file_.c_str(), &db_);
|
||||
#endif
|
||||
if (rc != SQLITE_OK)
|
||||
|
@ -83,7 +83,7 @@ public:
|
|||
#if SQLITE_VERSION_NUMBER >= 3005000
|
||||
const int rc = sqlite3_open_v2 (file_.c_str(), &db_, flags, 0);
|
||||
#else
|
||||
#warning "Mapnik's sqlite plugin is compiling against a version of sqlite older than 3.5.x which may make rendering slow..."
|
||||
#warning "Mapnik's sqlite plugin is compiling against a version of sqlite older than 3.5.x which may make rendering slow..."
|
||||
const int rc = sqlite3_open (file_.c_str(), &db_);
|
||||
#endif
|
||||
if (rc != SQLITE_OK)
|
||||
|
|
|
@ -49,7 +49,7 @@ using mapnik::parameters;
|
|||
DATASOURCE_PLUGIN(sqlite_datasource)
|
||||
|
||||
sqlite_datasource::sqlite_datasource(parameters const& params, bool bind)
|
||||
: datasource(params),
|
||||
: datasource(params),
|
||||
extent_(),
|
||||
extent_initialized_(false),
|
||||
type_(datasource::Vector),
|
||||
|
@ -312,8 +312,8 @@ sqlite_datasource::~sqlite_datasource()
|
|||
#if (BOOST_FILESYSTEM_VERSION <= 2)
|
||||
namespace boost {
|
||||
namespace filesystem {
|
||||
path read_symlink(const path& p)
|
||||
{
|
||||
path read_symlink(const path& p)
|
||||
{
|
||||
path symlink_path;
|
||||
|
||||
#ifdef BOOST_POSIX_API
|
||||
|
@ -336,7 +336,7 @@ namespace filesystem {
|
|||
}
|
||||
#endif
|
||||
return symlink_path;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
@ -379,11 +379,11 @@ void sqlite_datasource::parse_attachdb(std::string const& attachdb) const
|
|||
absolute_path = boost::filesystem::read_symlink(absolute_path);
|
||||
}
|
||||
|
||||
#if (BOOST_FILESYSTEM_VERSION == 3)
|
||||
#if (BOOST_FILESYSTEM_VERSION == 3)
|
||||
filename = boost::filesystem::absolute(absolute_path.parent_path() / filename).string();
|
||||
#else
|
||||
#else
|
||||
filename = boost::filesystem::complete(absolute_path.branch_path() / filename).normalize().string();
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -126,10 +126,10 @@ feature_ptr sqlite_featureset::next()
|
|||
break;
|
||||
|
||||
default:
|
||||
#ifdef MAPNIK_DEBUG
|
||||
#ifdef MAPNIK_DEBUG
|
||||
std::clog << "Sqlite Plugin: field " << fld_name_str
|
||||
<< " unhandled type_oid=" << type_oid << std::endl;
|
||||
#endif
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
// sqlite
|
||||
extern "C" {
|
||||
#include <sqlite3.h>
|
||||
#include <sqlite3.h>
|
||||
}
|
||||
|
||||
class prepared_index_statement : boost::noncopyable
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
// sqlite
|
||||
extern "C" {
|
||||
#include <sqlite3.h>
|
||||
#include <sqlite3.h>
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
// sqlite
|
||||
extern "C" {
|
||||
#include <sqlite3.h>
|
||||
#include <sqlite3.h>
|
||||
}
|
||||
|
||||
#include "sqlite_resultset.hpp"
|
||||
|
@ -531,7 +531,7 @@ public:
|
|||
desc.add_descriptor(mapnik::attribute_descriptor(fld_name, mapnik::String));
|
||||
}
|
||||
}
|
||||
#ifdef MAPNIK_DEBUG
|
||||
#ifdef MAPNIK_DEBUG
|
||||
else
|
||||
{
|
||||
// "Column Affinity" says default to "Numeric" but for now we pass..
|
||||
|
@ -544,7 +544,7 @@ public:
|
|||
<< "' unhandled due to unknown type: "
|
||||
<< fld_type << std::endl;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@ using mapnik::parameters;
|
|||
DATASOURCE_PLUGIN(hello_datasource)
|
||||
|
||||
hello_datasource::hello_datasource(parameters const& params, bool bind)
|
||||
: datasource(params),
|
||||
: datasource(params),
|
||||
type_(datasource::Vector),
|
||||
desc_(*params_.get<std::string>("type"), *params_.get<std::string>("encoding","utf-8")),
|
||||
extent_()
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
class hello_datasource : public mapnik::datasource
|
||||
{
|
||||
public:
|
||||
public:
|
||||
// constructor
|
||||
// arguments must not change
|
||||
hello_datasource(mapnik::parameters const& params, bool bind=true);
|
||||
|
@ -38,7 +38,7 @@ class hello_datasource : public mapnik::datasource
|
|||
// mandatory: will bind the datasource given params
|
||||
void bind() const;
|
||||
|
||||
private:
|
||||
private:
|
||||
// recommended naming convention of datasource members:
|
||||
// name_, type_, extent_, and desc_
|
||||
static const std::string name_;
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
// extend the mapnik::Featureset defined in include/mapnik/datasource.hpp
|
||||
class hello_featureset : public mapnik::Featureset
|
||||
{
|
||||
public:
|
||||
public:
|
||||
// this constructor can have any arguments you need
|
||||
hello_featureset(mapnik::box2d<double> const& box, std::string const& encoding);
|
||||
|
||||
|
@ -20,7 +20,7 @@ class hello_featureset : public mapnik::Featureset
|
|||
// mandatory: you must expose a next() method, called when rendering
|
||||
mapnik::feature_ptr next();
|
||||
|
||||
private:
|
||||
private:
|
||||
// members are up to you, but these are recommended
|
||||
mapnik::box2d<double> const& box_;
|
||||
mutable int feature_id_;
|
||||
|
|
Loading…
Reference in a new issue