#ifndef NAMEDITEMLIST_H // {
#define NAMEDITEMLIST_H

class NamedItemList
{

private:

    class NamedItem
    {
    private:

        NamedItem();

    public:

        ~NamedItem();
        static HRESULT Create(const WCHAR * pszName, NamedItem * * ppNamedItem);
   
        NamedItem * m_pNext;
        BSTR m_bstrName;
        DWORD m_flags;

        BOOL IsPersistent();
        void Reset();
    };

    NamedItemList();
    NamedItem * Find(const WCHAR * psz);
    Mutex * m_pMutex;
    NamedItem * * m_Buckets;
    int m_cBuckets;

public:

    ~NamedItemList();

    static HRESULT Create(int cBuckets, NamedItemList * * ppNamedItemList);
    HRESULT Add(const WCHAR * pszName, DWORD flags);
    void Reset(void);
    void Clear(void);
    HRESULT Clone(NamedItemList * * ppNamedItemList);
};

#endif // NAMEDITEMLIST_H }