Namespaces | Files | Defines | Functions
Utils
Collaboration diagram for Utils:

Namespaces

namespace  g2o
 

Executes code, only if secs are gone since last exec.


Files

file  misc.h
 

some general case utility functions


file  timeutil.h
 

utility functions for handling time related stuff


Defines

#define MEASURE_FUNCTION_TIME   g2o::ScopeTime scopeTime(__PRETTY_FUNCTION__)

Functions

template<typename T >
void g2o::convertString (const std::string &s, T &x, bool failIfLeftoverChars=true)
std::string g2o::formatString (const char *fmt,...)
template<typename OutputIterator >
OutputIterator g2o::readFloats (const char *str, OutputIterator out)
template<typename OutputIterator >
OutputIterator g2o::readInts (const char *str, OutputIterator out)
int g2o::readLine (std::istream &is, std::stringstream &currentLine)
bool g2o::strEndsWith (const std::string &s, const std::string &end)
std::string g2o::strExpandFilename (const std::string &filename)
template<typename T >
T g2o::stringToType (const std::string &s, bool failIfLeftoverChars=true)
int g2o::strPrintf (std::string &str, const char *fmt,...)
std::vector< std::string > g2o::strSplit (const std::string &str, const std::string &delimiters)
bool g2o::strStartsWith (const std::string &s, const std::string &start)
std::string g2o::strToLower (const std::string &s)
std::string g2o::strToUpper (const std::string &s)
std::string g2o::trim (const std::string &s)
std::string g2o::trimLeft (const std::string &s)
std::string g2o::trimRight (const std::string &s)

Define Documentation

Definition at line 104 of file timeutil.h.


Function Documentation

template<typename T >
void g2o::convertString ( const std::string &  s,
T x,
bool  failIfLeftoverChars = true 
)

convert a string into an other type.

Definition at line 113 of file string_tools.h.

std::string g2o::formatString ( const char *  fmt,
  ... 
)

format a string and return a std::string. Format is just like printf, see man 3 printf

Definition at line 85 of file string_tools.cpp.

template<typename OutputIterator >
OutputIterator g2o::readFloats ( const char *  str,
OutputIterator  out 
)

read float values (seperated by spaces) from a string and store them in the given OutputIterator.

Definition at line 84 of file string_tools.h.

template<typename OutputIterator >
OutputIterator g2o::readInts ( const char *  str,
OutputIterator  out 
)

read integer values (seperated by spaces) from a string and store them in the given OutputIterator.

Definition at line 65 of file string_tools.h.

int g2o::readLine ( std::istream &  is,
std::stringstream &  currentLine 
)

read a line from is into currentLine.

Returns:
the number of characters read into currentLine (excluding newline), -1 on eof()

Definition at line 165 of file string_tools.cpp.

bool g2o::strEndsWith ( const std::string &  str,
const std::string &  substr 
)

return true, if str ends with substr

Definition at line 158 of file string_tools.cpp.

std::string g2o::strExpandFilename ( const std::string &  filename)

expand the given filename like a posix shell, e.g., ~ $CARMEN_HOME and other will get expanded. Also command substitution, e.g. `pwd` will give the current directory.

Definition at line 113 of file string_tools.cpp.

template<typename T >
T g2o::stringToType ( const std::string &  s,
bool  failIfLeftoverChars = true 
)

convert a string into an other type. Return the converted value. Throw error if parsing is wrong.

Definition at line 126 of file string_tools.h.

int g2o::strPrintf ( std::string &  str,
const char *  fmt,
  ... 
)

replacement function for sprintf which fills a std::string instead of a char*

Definition at line 101 of file string_tools.cpp.

std::vector< std::string > g2o::strSplit ( const std::string &  s,
const std::string &  delim 
)

split a string into token based on the characters given in delim

Definition at line 136 of file string_tools.cpp.

bool g2o::strStartsWith ( const std::string &  str,
const std::string &  substr 
)

return true, if str starts with substr

Definition at line 151 of file string_tools.cpp.

std::string g2o::strToLower ( const std::string &  s)

convert the string to lower case

Definition at line 71 of file string_tools.cpp.

std::string g2o::strToUpper ( const std::string &  s)

convert a string to upper case

Definition at line 78 of file string_tools.cpp.

std::string g2o::trim ( const std::string &  s)

remove whitespaces from the start/end of a string

Definition at line 38 of file string_tools.cpp.

std::string g2o::trimLeft ( const std::string &  s)

remove whitespaces from the left side of the string

Definition at line 49 of file string_tools.cpp.

std::string g2o::trimRight ( const std::string &  s)

remove whitespaced from the right side of the string

Definition at line 60 of file string_tools.cpp.



re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:33:51