aboutsummaryrefslogtreecommitdiff
path: root/Src/Plugins/Library/ml_devices/gen_deviceprovider/stringBuilder.h
blob: cc2170b7d302a3df6cd38b54a5ad39f883827df7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef NULLSOFT_WINAMP_STRING_BUILDER_HEADER
#define NULLSOFT_WINAMP_STRING_BUILDER_HEADER

#if defined(_MSC_VER) && (_MSC_VER >= 1020)
#pragma once
#endif

#include <wtypes.h>

class StringBuilder
{
public:
	StringBuilder();
	~StringBuilder();

public:
	HRESULT Allocate(size_t newSize);
	void Clear(void);
	LPCWSTR Get(void);
	HRESULT Set(size_t index, WCHAR value);
	HRESULT Append(LPCWSTR pszString);
	

protected:
	LPWSTR buffer;
	LPWSTR cursor;
	size_t allocated;
	size_t remaining;
};

#endif //NULLSOFT_WINAMP_STRING_BUILDER_HEADER