Stimfit @PACKAGE_VERSION@
Loading...
Searching...
No Matches
common.h File Reference
#include <iosfwd>
#include <string>
#include <stdexcept>
#include <sstream>
Include dependency graph for common.h:

Go to the source code of this file.

Macros

#define DEBUGOUT(s)
#define LOG(x)
#define _T(x)
#define CALL_MEMBER_FN(object, ptrToMember)

Functions

std::ostream * SetLogger (std::ostream *logger_)
std::wstring toWString (const std::string &s)
std::string toString (const std::wstring &ws)
template<typename T>
CheckBits (T value, unsigned int numBits)

Variables

std::ostream * logger
std::ostream * nulllogger

Macro Definition Documentation

◆ _T

#define _T ( x)
Value:
x

Definition at line 60 of file common.h.

◆ CALL_MEMBER_FN

#define CALL_MEMBER_FN ( object,
ptrToMember )
Value:
((object).*(ptrToMember))

Definition at line 77 of file common.h.

◆ DEBUGOUT

#define DEBUGOUT ( s)
Value:
{ \
std::ostringstream os_; \
os_ << " DEBUG: " << s; \
OutputDebugStringA( os_.str().c_str() ); \
}

Definition at line 36 of file common.h.

◆ LOG

#define LOG ( x)
Value:
((x) ? (*logger) : (*nulllogger))

Definition at line 50 of file common.h.

Function Documentation

◆ CheckBits()

template<typename T>
T CheckBits ( T value,
unsigned int numBits )

Definition at line 69 of file common.h.

◆ SetLogger()

std::ostream * SetLogger ( std::ostream * logger_)

◆ toString()

std::string toString ( const std::wstring & ws)

◆ toWString()

std::wstring toWString ( const std::string & s)

Variable Documentation

◆ logger

std::ostream* logger
extern

◆ nulllogger

std::ostream* nulllogger
extern