cfl_helper.h File Reference

Helper functions. More...

#include "cfl_definitions.h"
#include "cfl_platform.h"
#include "cfl_exception.h"

Go to the source code of this file.

Classes

class  faudes::ConsoleOut
 Console Out. More...
class  faudes::ObjectCount
 Debugging counter. More...

Namespaces

namespace  faudes
 libFAUDES resides within the namespace faudes.

Macros

#define FAUDES_TEST_DUMP(mes, dat)
 Test protocol record macro ("mangle" filename for platform independance)
#define FAUDES_TEST_DIFF()
 Test protocol diff macro.

Functions

std::string faudes::ToStringInteger (Int number)
 integer to string
std::string faudes::ToStringInteger16 (Int number)
 integer to string base 16
std::string faudes::ToStringFloat (Float number)
 float to string
std::string faudes::ExpandString (const std::string &rString, unsigned int len)
 Fill string with spaces up to a given length if length of the string is smaller than given length parameter.
std::string faudes::CollapsString (const std::string &rString, unsigned int len=FD_MAXCONTAINERNAME)
 Limit length of string, return head and tail of string.
Idx faudes::ToIdx (const std::string &rString)
 Convert a string to Idx.
std::string faudes::StringSubstitute (const std::string &rString, const std::string &rFrom, const std::string &rTo)
 Substitute in string.
std::string faudes::VersionString ()
 Return FAUDES_VERSION as std::string.
std::string faudes::PluginsString ()
 Return FAUDES_PLUGINS as std::string.
std::string faudes::ContributorsString ()
 Return contributors as std::string.
void faudes::ProcessDot (const std::string &rDotFile, const std::string &rOutFile, const std::string &rOutFormat="", const std::string &rDotExec="dot")
 Convenience function: process dot file to graphics output.
std::string faudes::CreateTempFile (void)
 Create a temp file, length 0.
bool faudes::RemoveFile (const std::string &rFileName)
 Delete a file.
FAUDES_API const std::string & faudes::PathSeparator (void)
 Std dir-separator.
std::string faudes::ExtractDirectory (const std::string &rFullPath)
 Extract directory from full path.
std::string faudes::ExtractFilename (const std::string &rFullName)
 Extract file name from full path.
std::string faudes::ExtractBasename (const std::string &rFullName)
 Extract file name from full path.
std::string faudes::ExtractExtension (const std::string &rFullName)
 Extract file name from full path.
std::string faudes::PrependDirectory (const std::string &rDirectory, const std::string &rFileName)
 Construct full path from directory and filename.
bool faudes::FileExists (const std::string &rFilename)
 Test existence of file.
bool faudes::FileDelete (const std::string &rFilename)
 Delete file.
bool faudes::FileCopy (const std::string &rFromFile, const std::string &rToFile)
 Copy file.
bool faudes::DirectoryExists (const std::string &rDirectory)
 Test existence of directory.
std::set< std::string > faudes::ReadDirectory (const std::string &rDirectory)
 Read the contents of the specified directors.
std::string faudes::TestProtocol (const std::string &rSource)
 Test Protocol.
void faudes::TestProtocol (const std::string &rMessage, const Type &rData, bool core=false)
 Test Protocol.
void faudes::TestProtocol (const std::string &rMessage, bool data)
 Test Protocol.
void faudes::TestProtocol (const std::string &rMessage, long int data)
 Test Protocol.
void faudes::TestProtocol (const std::string &rMessage, const std::string &data)
 Test Protocol.
bool faudes::TestProtocol (void)
 Test Protocol.
FAUDES_API void faudes::LoopCallback (bool(*pBreakFnct)(void))
 Algorithm loop callback.
void faudes::LoopCallback (void)
 Algorithm loop callback.

Detailed Description

Helper functions.

Definition in file cfl_helper.h.

Macro Definition Documentation

#define FAUDES_TEST_DIFF ( )
Value:
{ if(!TestProtocol()) { \
FAUDES_WRITE_CONSOLE("FAUDES_TEST_DIFF: sensed test case error in " << __FILE__); exit(1);} }

Test protocol diff macro.

Definition at line 488 of file cfl_helper.h.

#define FAUDES_TEST_DUMP (   mes,
  dat 
)
Value:
{ \
TestProtocol(__FILE__); \
std::string fname= __FILE__; \
std::replace(fname.begin(),fname.end(),'\\','/'); \
fname=ExtractFilename(fname); \
std::stringstream sstr; \
sstr << mes << " [at " << fname << ":" << __LINE__ << "]" ; \
TestProtocol(sstr.str(),dat); }

Test protocol record macro ("mangle" filename for platform independance)

Definition at line 478 of file cfl_helper.h.

libFAUDES 2.28a --- 2016.09.13 --- c++ api documentaion by doxygen