Frog
Classes | Functions
Frog-util.h File Reference
#include <set>
#include <ostream>
#include <string>
#include "ticcutils/Timer.h"
Include dependency graph for Frog-util.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  TimerBlock
 

Functions

std::string prefix (const std::string &path, const std::string &fn)
 
std::set< std::string > getFileNames (const std::string &dirName, const std::string &ext)
 
std::string check_server (const std::string &host, const std::string &port, const std::string &name="")
 

Function Documentation

◆ check_server()

std::string check_server ( const std::string &  host,
const std::string &  port,
const std::string &  name = "" 
)

check if a certain host:port is available for us

Parameters
hostthe host we check
portthe port we want to access
nameextra information (used in diagnostics only)
Returns
"" on succes or an error message on failure

◆ getFileNames()

std::set<std::string> getFileNames ( const std::string &  dirName,
const std::string &  ext 
)

extract a (sorted) list of file-names matching an extension pattern

Parameters
dirNamethe search directory
extthe file extension we search
Returns
a sorted list og file-names

◆ prefix()

std::string prefix ( const std::string &  path,
const std::string &  fn 
)

add a full path to the filename fn

Parameters
paththe path to add
fnthe filename to be prefixed
Returns
a new path If fn already contains (relative) path information, it is left unchanged.