acme
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages Concepts
adaptor.h
1#pragma once
2
3
4#include "string.h"
5
6
7template < typename STRING_CATCHER >
8class wstring_adaptor :
9 public wstring
10{
11public:
12
13
14 STRING_CATCHER & m_stringCatcher;
15
16
17 wstring_adaptor(STRING_CATCHER & stringCatcher, int iAllocCount) :
18 m_stringCatcher(stringCatcher)
19 {
20
21 get_buffer(iAllocCount);
22
23 }
24
25
26 ~wstring_adaptor()
27 {
28
29 m_stringCatcher = this->c_str();
30
31 }
32
33
34 inline operator const ::wide_character * () { return this->m_begin; }
35 inline operator ::wide_character * () { return (::wide_character *) this->m_begin; }
36
37
38};
39
40
41