#include <testutils.h>
Definition at line 21 of file testutils.h.
§ outputter()
outputter::outputter |
( |
int |
mode = 1 | ) |
|
§ ~outputter()
outputter::~outputter |
( |
| ) |
|
§ init()
void outputter::init |
( |
int |
mode | ) |
|
|
private |
Definition at line 109 of file testutils.cpp.
118 printf_s(
"No output mode selected, using console by default.\n");
124 folder =
"D:\\TestImages\\TestOutput\\" + std::string(date) +
"\\";
125 if(!CreateDirectory((LPCTSTR)
folder.c_str(),NULL)){
126 printf_s(
"Error creating output folder");
void GetFormattedTimeString(char *output)
§ newFile()
void outputter::newFile |
( |
std::string |
filename, |
|
|
const char * |
mode = "a" |
|
) |
| |
Definition at line 89 of file testutils.cpp.
93 std::string outfile =
folder + filename +
".txt";
94 while(fopen(outfile.c_str(),
"r")){
95 std::cout <<
"Output file " << filename <<
" already exists, please specify new filename:\n";
97 outfile =
folder + filename +
".txt";
101 std::cout <<
"Error creating output file "<< outfile <<
"\n\n";
102 std::cout <<
"Error " << outfile <<
" already exists, please specify new file path:\n";
§ outputArray()
template<typename T >
void outputter::outputArray |
( |
T * |
arr, |
|
|
int |
size |
|
) |
| |
|
inline |
Definition at line 29 of file testutils.h.
30 std::ostringstream out;
31 for(
int ii=0;ii<size;ii++){
32 out <<
"[" << ii <<
"] : " << arr[ii] <<
"\n";
void outputString(std::string out, bool ConsoleOnly=false)
§ outputImage()
void outputter::outputImage |
( |
ImageData |
img, |
|
|
std::string |
filename = "UsedImage" |
|
) |
| |
Definition at line 82 of file testutils.cpp.
84 std::string file =
folder + filename +
".jpg";
void FloatToJPEGFile(const char *name, const float *d, int w, int h)
§ outputString()
void outputter::outputString |
( |
std::string |
out, |
|
|
bool |
ConsoleOnly = false |
|
) |
| |
Definition at line 70 of file testutils.cpp.
72 std::cout << out << std::endl;
void newFile(std::string filename, const char *mode="a")
§ folder
std::string outputter::folder |
§ modes
§ outputFile
FILE* outputter::outputFile |
|
private |
The documentation for this class was generated from the following files: