RAPP Platform  v0.6.0
RAPP Platform is a collection of ROS nodes and back-end processes that aim to deliver ready-to-use generic services to robots
 All Classes Namespaces Files Functions Variables Macros
knowrob_wrapper.cpp File Reference
#include <knowrob_wrapper/knowrob_wrapper.h>
#include <sys/stat.h>
#include <unistd.h>
#include <sstream>
#include <ros/package.h>
#include <fstream>
Include dependency graph for knowrob_wrapper.cpp:

Go to the source code of this file.

Functions

bool checkIfFileExists (const char *fileName)
 Checks if path exists. More...
 
bool checkIfStringContainsString (std::string a, std::string b)
 Checks if the second string is contained within the first string. More...
 
bool checkIfStringVectorContainsString (std::vector< std::string > vec, std::string a)
 Check if a string is contained in a vector string. More...
 
std::string intToString (int a)
 Converts integer to string. More...
 
std::vector< std::string > split (std::string str, std::string sep)
 Splits string by delimiter. More...
 
std::string SplitFilename (const std::string &str)
 Keeps only the final folder or file from a path. More...
 

Function Documentation

bool checkIfFileExists ( const char *  fileName)

Checks if path exists.

Parameters
fileName[char*] The input path
Returns
out [bool] True if file exists

Definition at line 103 of file knowrob_wrapper.cpp.

bool checkIfStringContainsString ( std::string  a,
std::string  b 
)

Checks if the second string is contained within the first string.

Parameters
a[string] The first string
Returns
b [string] The second String

Definition at line 68 of file knowrob_wrapper.cpp.

bool checkIfStringVectorContainsString ( std::vector< std::string >  vec,
std::string  a 
)

Check if a string is contained in a vector string.

Parameters
vec[vector<string>] The vector containing strings
Returns
a [string] The string to check if it is contained

Definition at line 52 of file knowrob_wrapper.cpp.

std::string intToString ( int  a)

Converts integer to string.

Parameters
a[int] The input integer
Returns
out [string] The output string

Definition at line 81 of file knowrob_wrapper.cpp.

std::vector<std::string> split ( std::string  str,
std::string  sep 
)

Splits string by delimiter.

Parameters
str[string] The input string
sep[string] The delimiter
Returns
arr [vector<string>] A vector with the string parts as splitted by the delimiter

Definition at line 114 of file knowrob_wrapper.cpp.

std::string SplitFilename ( const std::string &  str)

Keeps only the final folder or file from a path.

Parameters
str[string&] The input path
Returns
out [string] The output filename

Definition at line 92 of file knowrob_wrapper.cpp.