TuttleOFX  1
TuttleOFX/libraries/tuttle/src/tuttle/common/utils/FileGlobal.hpp File Reference
#include <tuttle/common/patterns/Singleton.hpp>
#include <tuttle/common/system/system.hpp>
#include <iostream>
#include <fstream>
Include dependency graph for FileGlobal.hpp:

Go to the source code of this file.

Data Structures

class  FileGlobal
 Output datas in the same file from anywhere. More...

Defines

#define FILEGLOBAL_FILENAME(FILENAME)
 Change the filename for the output.
#define FILEGLOBAL(...)
 Output into the file define by FILEGLOBAL_FILENAME (if not specified, by default "out.log")
#define FILEGLOBAL_VAR(a)
#define FILEGLOBAL_VAR2(a, b)
#define FILEGLOBAL_VAR3(a, b, c)
#define FILEGLOBAL_VAR4(a, b, c, d)
#define FILEGLOBAL_INFO(...)
 Output into the file define by FILEGLOBAL_FILENAME (if not specified, by default "out.log")
#define FILEGLOBAL_FUNCTION

Define Documentation

#define FILEGLOBAL (   ...)
Value:
if( !FileGlobal::instance()._flux ) { FileGlobal::instance().openFile( "out.log" ); } \
    FileGlobal::instance()._flux << __VA_ARGS__ << std::endl;

Output into the file define by FILEGLOBAL_FILENAME (if not specified, by default "out.log")

Parameters:
[in]...: all parameters with an operator << defined

Definition at line 60 of file FileGlobal.hpp.

#define FILEGLOBAL_FILENAME (   FILENAME)
Value:

Change the filename for the output.

Parameters:
[in]FILENAME: file name

Definition at line 52 of file FileGlobal.hpp.

#define FILEGLOBAL_FUNCTION
Value:
if( !FileGlobal::instance()._flux ) { FileGlobal::instance().openFile( "out.log" ); } \
    FileGlobal::instance()._flux << INFO << std::endl;

Definition at line 89 of file FileGlobal.hpp.

#define FILEGLOBAL_INFO (   ...)
Value:
if( !FileGlobal::instance()._flux ) { FileGlobal::instance().openFile( "out.log" ); } \
    FileGlobal::instance()._flux << INFO << \
    "\t" << __VA_ARGS__ << std::endl;

Output into the file define by FILEGLOBAL_FILENAME (if not specified, by default "out.log")

Parameters:
[in]...: all parameters with an operator << defined

Definition at line 84 of file FileGlobal.hpp.

#define FILEGLOBAL_VAR (   a)
Value:
if( !FileGlobal::instance()._flux ) { FileGlobal::instance().openFile( "out.log" ); } \
    FileGlobal::instance()._flux << # a << ": " << a << std::endl;

Definition at line 64 of file FileGlobal.hpp.

#define FILEGLOBAL_VAR2 (   a,
 
)
Value:
if( !FileGlobal::instance()._flux ) { FileGlobal::instance().openFile( "out.log" ); } \
    FileGlobal::instance()._flux << # a << ": " << a << ", " << # b << ": " << b << std::endl;

Definition at line 68 of file FileGlobal.hpp.

#define FILEGLOBAL_VAR3 (   a,
  b,
 
)
Value:
if( !FileGlobal::instance()._flux ) { FileGlobal::instance().openFile( "out.log" ); } \
    FileGlobal::instance()._flux << # a << ": " << a << ", " << # b << ": " << b << ", " << # c << ": " << c << std::endl;

Definition at line 72 of file FileGlobal.hpp.

#define FILEGLOBAL_VAR4 (   a,
  b,
  c,
 
)
Value:
if( !FileGlobal::instance()._flux ) { FileGlobal::instance().openFile( "out.log" ); } \
    FileGlobal::instance()._flux << # a << ": " << a << ", " << # b << ": " << b << ", " << # c << ": " << c << ", " << # d << ": " << d << std::endl;

Definition at line 76 of file FileGlobal.hpp.