27 #include "precompiled.h"
49 , m_pathname(pathname)
63 std::wstringstream stream(text);
70 ENSURE(action ==
'L' || action ==
'S');
77 std::getline(stream, pathname, L
'"');
82 ENSURE(stream.get() ==
'\n');
84 ENSURE(stream.get() == WEOF);
152 entry->~TraceEntry();
198 fputws(text.c_str(), file);
virtual size_t NumEntries() const
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
shared_ptr< ITrace > PITrace
virtual const TraceEntry * Entries() const
virtual Status Load(const OsPath &pathname)
load entries from file.
void * pool_alloc(Pool *p, size_t size)
Dole out memory from the pool.
virtual Status Store(const OsPath &pathname) const
store all entries into a file.
virtual void NotifyLoad(const Path &pathname, size_t size)
int swprintf_s(wchar_t *buf, size_t max_chars, const wchar_t *fmt,...) WPRINTF_ARGS(3)
std::wstring EncodeAsText() const
Status pool_create(Pool *p, size_t max_size, size_t el_size)
Ready Pool for use.
FILE * sys_OpenFile(const OsPath &pathname, const char *mode)
open a file like with fopen (but taking an OsPath argument).
virtual void NotifyStore(const Path &pathname, size_t size)
virtual size_t NumEntries() const
TraceEntry(EAction action, const Path &pathname, size_t size)
virtual void NotifyStore(const Path &pathname, size_t size)
#define ENSURE(expr)
ensure the expression <expr> evaluates to non-zero.
const String & string() const
i64 Status
Error handling system.
allocator design parameters:
virtual const TraceEntry * Entries() const
virtual void NotifyLoad(const Path &pathname, size_t size)
virtual Status Store(const OsPath &pathname) const
store all entries into a file.
size_t el_size
size of elements.
void pool_free_all(Pool *p)
"free" all user allocations that ensued from the given Pool.
PITrace CreateTrace(size_t maxSize)
#define WARN_RETURN(status)
PITrace CreateDummyTrace(size_t maxSize)
Status pool_destroy(Pool *p)
free all memory (address space + physical) that constitutes the given Pool.
virtual Status Load(const OsPath &pathname)
load entries from file.