summaryrefslogtreecommitdiffstats
path: root/private/oleutest/stgdrt/strlist.hxx
blob: 4e0824be6570cfcf8a0b75e4e7279c022e89ba15 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//+--------------------------------------------------------------
//
//  Microsoft Windows
//  Copyright (C) Microsoft Corporation, 1992 - 1992.
//
//  File:	strlist.hxx
//
//  Contents:	CStrList header
//
//  Classes:	CStrList
//
//  History:	24-Sep-92	DrewB	Created
//
//---------------------------------------------------------------

#ifndef __STRLIST_HXX__
#define __STRLIST_HXX__

#include <drt.hxx>

struct SStrEntry
{
    SStrEntry *pseNext, *psePrev;
    union
    {
	void *pv;
	unsigned long dw;
    } user;
    OLECHAR atc[1];		// Actually contains the whole string
};

class CStrList
{
public:
    CStrList(void);
    ~CStrList(void);
    
    SStrEntry *Add(OLECHAR *ptcs);
    void Remove(SStrEntry *pse);
    SStrEntry *Find(OLECHAR *ptcs);
    void Empty(void);
    
    SStrEntry *GetHead(void) { return _pseHead; }
    
private:
    SStrEntry *_pseHead;
};

#endif // #ifndef __STRLIST_HXX__