Static Public Member Functions | Static Private Member Functions
ros_uri Class Reference

#include <ros_uri.hpp>

List of all members.

Static Public Member Functions

static std::string absolute_path (std::string uriString)
static std::string file_uri (fs::path path)
static std::string package_uri (std::string pathStr, std::string packageName=std::string())

Static Private Member Functions

static const std::string getFilePrefix ()
static const std::string getPackagePrefix ()

Detailed Description

Copyright (c) 2016, Schleicher Ralf All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. The ros_uri class delivers functionality equally to resource_finder.

With one exception. It doesn't load the resource into memory but just delivers the uri path to a given file or a file path for a given uri.

They should have done it in resource_finder. They didn't, so I did.

Author:
Ralf Schleicher

Definition at line 39 of file ros_uri.hpp.


Member Function Documentation

static std::string ros_uri::absolute_path ( std::string  uriString) [inline, static]

Converts a protocol uri to an absolute path.

Parameters:
uriString- string containing the uri
Returns:
a string containing the path to the referenced uri.

Definition at line 60 of file ros_uri.hpp.

static std::string ros_uri::file_uri ( fs::path  path) [inline, static]

simply prefixes the path with the file-protocol prefix.

Definition at line 124 of file ros_uri.hpp.

static const std::string ros_uri::getFilePrefix ( ) [inline, static, private]
Returns:
the prefix for the file protocol

Definition at line 51 of file ros_uri.hpp.

static const std::string ros_uri::getPackagePrefix ( ) [inline, static, private]
Returns:
the prefix for the package protocol

Definition at line 44 of file ros_uri.hpp.

static std::string ros_uri::package_uri ( std::string  pathStr,
std::string  packageName = std::string() 
) [inline, static]

Converts a path to a package-protocol uri.

Parameters:
pathStr- the absolute path
packageName(optional, default: "") - the name of the package the path lies into.
Returns:
a string in valid uri format prefixed with package-protocl name

Definition at line 79 of file ros_uri.hpp.


The documentation for this class was generated from the following file:


asr_ros_uri
Author(s): Schleicher Ralf
autogenerated on Sat Jun 8 2019 20:46:59