Exotica
Classes | Namespaces | Macros | Functions
printable.h File Reference
#include <iomanip>
#include <iostream>
#include <map>
#include <vector>
#include <Eigen/Geometry>
#include <kdl/frames.hpp>
Include dependency graph for printable.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  exotica::Printable
 

Namespaces

 exotica
 

Macros

#define __PRETTY_FUNCTION__   __func__
 A set of debugging tools: basically these provide easy ways of checking code execution through std::cout prints. More...
 
#define CHECK_EXECUTION
 
#define INDICATE_FAILURE   std::cerr << "\033[1;32m[EXOTica]:\033[0m \033[1;31mFailed in " << __FILE__ << " at line " << __LINE__ << " within function " << __PRETTY_FUNCTION__ << ".\033[0m\n";
 With endline. More...
 
#define WARNING(x)   std::cout << "\033[1;32m[EXOTica]:\033[0m \033[33mWarning in " << __PRETTY_FUNCTION__ << ": " << x << "\033[0m\n";
 With endline. More...
 
#define ERROR(x)
 
#define INFO(x)
 
#define HIGHLIGHT(x)   std::cout << "\033[1;32m[EXOTica]:\033[0m \033[36m" << x << "\033[0m\n";
 
#define HIGHLIGHT_NAMED(name, x)   std::cout << "\033[1;32m[EXOTica]:\033[0m \033[35m[" << name << "]\033[0m \033[36m" << x << "\033[0m\n";
 
#define WARNING_NAMED(name, x)   std::cout << "\033[1;32m[EXOTica]:\033[0m \033[35m[" << name << "]\033[0m \033[33m" << x << "\033[0m\n";
 
#define INFO_NAMED(name, x)   std::cout << "\033[1;32m[EXOTica]:\033[0m \033[35m[" << name << "]\033[0m " << x << "\n";
 
#define INFO_PLAIN(x)   std::cout << x << "\n";
 

Functions

std::ostream & exotica::operator<< (std::ostream &os, const Printable &s)
 
template<typename T >
std::ostream & exotica::operator<< (std::ostream &os, const std::vector< T > &s)
 
template<typename I , typename T >
std::ostream & exotica::operator<< (std::ostream &os, const std::map< I, T > &s)
 
std::string exotica::ToString (const KDL::Frame &s)
 
std::string exotica::ToString (const Eigen::Isometry3d &s)
 
void exotica::PrintDimensions (const std::string &name, const Eigen::Ref< const Eigen::MatrixXd > m)
 

Macro Definition Documentation

◆ __PRETTY_FUNCTION__

#define __PRETTY_FUNCTION__   __func__

A set of debugging tools: basically these provide easy ways of checking code execution through std::cout prints.

◆ CHECK_EXECUTION

#define CHECK_EXECUTION

◆ ERROR

#define ERROR (   x)
Value:
std::cerr << "\033[1;32m[EXOTica]:\033[0m \033[1;31mFailed in " << __FILE__ << " at line " << __LINE__ << " within function " << __PRETTY_FUNCTION__ << ".\n" \
<< x << "\033[0m\n";

◆ HIGHLIGHT

#define HIGHLIGHT (   x)    std::cout << "\033[1;32m[EXOTica]:\033[0m \033[36m" << x << "\033[0m\n";

◆ HIGHLIGHT_NAMED

#define HIGHLIGHT_NAMED (   name,
 
)    std::cout << "\033[1;32m[EXOTica]:\033[0m \033[35m[" << name << "]\033[0m \033[36m" << x << "\033[0m\n";

◆ INDICATE_FAILURE

#define INDICATE_FAILURE   std::cerr << "\033[1;32m[EXOTica]:\033[0m \033[1;31mFailed in " << __FILE__ << " at line " << __LINE__ << " within function " << __PRETTY_FUNCTION__ << ".\033[0m\n";

With endline.

◆ INFO

#define INFO (   x)

◆ INFO_NAMED

#define INFO_NAMED (   name,
 
)    std::cout << "\033[1;32m[EXOTica]:\033[0m \033[35m[" << name << "]\033[0m " << x << "\n";

◆ INFO_PLAIN

#define INFO_PLAIN (   x)    std::cout << x << "\n";

◆ WARNING

#define WARNING (   x)    std::cout << "\033[1;32m[EXOTica]:\033[0m \033[33mWarning in " << __PRETTY_FUNCTION__ << ": " << x << "\033[0m\n";

With endline.

◆ WARNING_NAMED

#define WARNING_NAMED (   name,
 
)    std::cout << "\033[1;32m[EXOTica]:\033[0m \033[35m[" << name << "]\033[0m \033[33m" << x << "\033[0m\n";
__PRETTY_FUNCTION__
#define __PRETTY_FUNCTION__
A set of debugging tools: basically these provide easy ways of checking code execution through std::c...
Definition: printable.h:43