RML  1.0
Robotics Mathematical Library
Loading...
Searching...
No Matches
Futils.h File Reference
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <ctime>
#include <vector>
#include <unistd.h>
#include <map>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <pwd.h>
#include <iomanip>
#include <algorithm>
#include <memory>
#include <stdexcept>
#include <array>
Include dependency graph for Futils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  futils::Spinner
 My first functor!!! :D. More...
 
struct  futils::Dotter
 
struct  futils::Timer
 
struct  futils::Percentage
 
struct  futils::square< T >
 Functor for getting sum of previous result and square of current element (inner product can be used instead) More...
 
struct  futils::FirstOrderFilter
 

Namespaces

namespace  futils
 

Macros

#define dout   0 && std::cerr
 A set of useful C++ utilities ironically called "futils".
 
#define d_out(x)   0 && std::cerr
 

Typedefs

template<typename K , typename V >
using futils::MapIterator = typename std::map< K, V >::const_iterator
 

Functions

template<class Object >
void futils::PrettyPrint (const Object &A, std::string name, const char *color=tc::white)
 
int futils::MakeDir (const char *path)
 Create folder if not existing.
 
template<typename T >
std::string futils::toStringPointDecimal (T val)
 
template<typename T >
void futils::PrintArray (T arr, const int size, const char delimiter)
 
template<typename T >
void futils::PrintCMATArray (T arr, const int size, const char delimiter)
 
template<typename T >
std::string futils::ArrayToString (T arr, const int size, const char delimiter)
 
template<typename T >
std::string futils::CMATArrayToString (T arr, const int size, const char delimiter)
 
template<typename T >
void futils::PrintSTLVector (T vecObj, const char delimiter, const std::string preText="")
 
template<typename T >
std::string futils::STLVectorToString (T vecObj, const char delimiter, const std::string preText="")
 
template<typename T >
void futils::PrintSTLVectOfVects (T vecObj, const char delimiter)
 
std::string futils::GetCurrentDateFormatted ()
 
template<typename K , typename V >
bool futils::FindMapKeyByValue (const std::map< K, V > myMap, const V value, K &key)
 
bool futils::CopyFile (const std::string &inputFile, const std::string &outputFile)
 

Macro Definition Documentation

◆ d_out

#define d_out (   x)    0 && std::cerr

◆ dout

#define dout   0 && std::cerr

A set of useful C++ utilities ironically called "futils".

Author
Francesco Wanderlingh
Date
Year 2018

The utilities implemented, for Linux-based OS, include:

  • Elapsing Spinner Command-Line Animation
  • Waiting Dotter Command-Line Animation
  • Executable file self path retrieval for path-safe file saving, loading
  • STL Vector Printing
  • Debug print macro
  • UDP Sender/Receiver Sockets