Add namespace around all files

This commit is contained in:
Patrick Niklaus
2016-01-05 16:51:13 +01:00
parent efc9007cbf
commit 6b18e4f7e9
194 changed files with 2648 additions and 1245 deletions
+10 -2
View File
@@ -32,10 +32,13 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <string>
#include <type_traits>
namespace
namespace osrm
{
constexpr static const double COORDINATE_PRECISION = 1000000.0;
}
namespace util
{
struct FixedPointCoordinate
{
@@ -61,5 +64,10 @@ struct FixedPointCoordinate
};
std::ostream &operator<<(std::ostream &out, const FixedPointCoordinate &coordinate);
}
using util::FixedPointCoordinate;
}
#endif /* COORDINATE_HPP_ */
+11
View File
@@ -40,6 +40,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
namespace osrm
{
namespace util
{
namespace json
{
@@ -92,5 +96,12 @@ struct Array
};
} // namespace JSON
} // namespace util
namespace json {
using namespace osrm::util::json;
}
} // namespace osrm
#endif // JSON_CONTAINER_HPP
+5
View File
@@ -33,6 +33,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <unordered_map>
#include <string>
namespace osrm
{
struct LibOSRMConfig
{
std::unordered_map<std::string, boost::filesystem::path> server_paths;
@@ -43,4 +46,6 @@ struct LibOSRMConfig
bool use_shared_memory = true;
};
}
#endif // SERVER_CONFIG_HPP
+13 -4
View File
@@ -30,17 +30,21 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <memory>
struct LibOSRMConfig;
struct RouteParameters;
namespace osrm
{
struct LibOSRMConfig;
namespace util
{
namespace json
{
struct Object;
}
}
namespace engine {
struct RouteParameters;
class OSRM
{
private:
@@ -50,7 +54,12 @@ class OSRM
public:
OSRM(LibOSRMConfig &lib_config);
~OSRM(); // needed because we need to define it with the implementation of OSRM_impl
int RunQuery(const RouteParameters &route_parameters, osrm::json::Object &json_result);
int RunQuery(const RouteParameters &route_parameters, util::json::Object &json_result);
};
}
using engine::OSRM;
}
#endif // OSRM_HPP
+11
View File
@@ -36,6 +36,11 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <string>
#include <vector>
namespace osrm
{
namespace engine
{
struct RouteParameters
{
RouteParameters();
@@ -115,4 +120,10 @@ struct RouteParameters
std::vector<bool> is_source;
};
}
using engine::RouteParameters;
}
#endif // ROUTE_PARAMETERS_HPP
+5
View File
@@ -31,6 +31,9 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <type_traits>
#include <functional>
namespace osrm
{
/* Creates strongly typed wrappers around scalar types.
* Useful for stopping accidental assignment of lats to lons,
* etc. Also clarifies what this random "int" value is
@@ -66,4 +69,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
}; \
}
}
#endif // OSRM_STRONG_TYPEDEF_HPP