libcsdbg  1.28
C++ exception (and generic) stack trace debug library
csdbg::filebuf::filebuf ( const i8 path)
explicit

Object constructor.

Parameters
[in]paththe output file path
Exceptions
std::bad_alloc
csdbg::exception

Definition at line 23 of file filebuf.cpp.

References m_path, and unlikely.

Referenced by clone().

24  :
25 streambuf(),
26 m_path(NULL)
27 {
28  if ( unlikely(path == NULL) )
29  throw exception("invalid argument: path (=%p)", path);
30 
31  m_path = new i8[strlen(path) + 1];
32  strcpy(m_path, path);
33 }
34 
35 catch (...) {
36  delete[] m_data;
37  m_data = NULL;
38  m_path = NULL;
39 }
char i8
8-bit signed integer
Definition: config.hpp:72
streambuf()
Object default constructor.
Definition: streambuf.cpp:20
i8 * m_data
String data.
Definition: string.hpp:42
virtual const i8 * path() const
Get the output file path.
Definition: filebuf.cpp:96
i8 * m_path
Output file path.
Definition: filebuf.hpp:37
#define unlikely(expr)
Offer a hint (negative) to the pipeline branch predictor.
Definition: config.hpp:349

+ Here is the caller graph for this function: