AAO DRAMA/DRAMA2 C++ Interface
DRAMA C++11 and later interface

◆ TSafePrintf()

template<typename... Types>
void drama::TSafePrintf ( std::ostream &  ostream,
const char format,
Types...  args 
)

Safe formated write to a stream, thread compatible.

This version of SafePrintf() is less efficient then the underlying call, but when used from a thread will ensure all the output comes out at once.

Parameters
ostreamThe stream to write to.
formatThe format string. Each % character is to be replaced by the corresponding argument. Note - only the % is needed and used, don't do for example "%d". To output a %, use "%%".
argsArguments to the format. Any arbitrary types can be formatted as long as an overload of the << operator is available for that type.
Template Parameters
Types...the argument types.

References CreateRunDramaTask(), and SafePrintf().

Referenced by drama::Future< T >::~Future(), drama::Future< void >::~Future(), drama::Future< T >::get(), drama::Future< void >::get(), drama::Future< T >::operator=(), and drama::Future< void >::operator=().