ReactOS 0.4.16-dev-122-g325d74c
CLayerStringList Class Reference

#include <CLayerStringList.hpp>

Inheritance diagram for CLayerStringList:
Collaboration diagram for CLayerStringList:

Public Member Functions

 CLayerStringList ()
 
 ~CLayerStringList ()
 
STDMETHOD() Next (ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched) override
 
STDMETHOD() Skip (ULONG celt) override
 
STDMETHOD() Reset () override
 
STDMETHOD() Clone (IEnumString **ppenum) override
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComMultiThreadModelNoCS >
 ~CComObjectRootEx ()
 
ULONG InternalAddRef ()
 
ULONG InternalRelease ()
 
void Lock ()
 
void Unlock ()
 
HRESULT _AtlInitialConstruct ()
 
- Public Member Functions inherited from ATL::CComObjectRootBase
 CComObjectRootBase ()
 
 ~CComObjectRootBase ()
 
void SetVoid (void *)
 
HRESULT _AtlFinalConstruct ()
 
HRESULT FinalConstruct ()
 
void InternalFinalConstructAddRef ()
 
void InternalFinalConstructRelease ()
 
void FinalRelease ()
 
- Public Member Functions inherited from IEnumString
HRESULT Next ([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] LPOLESTR *rgelt, [out] ULONG *pceltFetched)
 
HRESULT RemoteNext ([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] LPOLESTR *rgelt, [out] ULONG *pceltFetched)
 
HRESULT Skip ([in] ULONG celt)
 
HRESULT Reset ()
 
HRESULT Clone ([out] IEnumString **ppenum)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Protected Attributes

PDB m_db
 
TAGID m_root
 
TAGID m_layer
 

Additional Inherited Members

- Public Types inherited from IEnumString
typedef IEnumStringLPENUMSTRING
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRYGetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 

Detailed Description

Definition at line 11 of file CLayerStringList.hpp.

Constructor & Destructor Documentation

◆ CLayerStringList()

CLayerStringList::CLayerStringList ( )
inline

Definition at line 16 of file CLayerStringList.hpp.

18 {
21 StringCchCatW(buf, _countof(buf), L"\\sysmain.sdb");
23 Reset();
24 }
PDB WINAPI SdbOpenDatabase(LPCWSTR path, PATH_TYPE type)
Definition: sdbapi.c:329
HRESULT WINAPI SdbGetAppPatchDir(HSDB db, LPWSTR path, DWORD size)
Definition: hsdb.c:579
STDMETHOD() Reset() override
#define TAGID_NULL
Definition: db.cpp:38
#define DOS_PATH
Definition: db.cpp:32
#define NULL
Definition: types.h:112
#define MAX_PATH
Definition: compat.h:34
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define L(x)
Definition: ntvdm.h:50
#define _countof(array)
Definition: sndvol32.h:70
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:325
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ ~CLayerStringList()

CLayerStringList::~CLayerStringList ( )
inline

Definition at line 26 of file CLayerStringList.hpp.

27 {
29 }
void WINAPI SdbCloseDatabase(PDB)
Definition: sdbapi.c:373

Member Function Documentation

◆ Clone()

STDMETHOD() CLayerStringList::Clone ( IEnumString **  ppenum)
inlineoverride

Implements IEnumString.

Definition at line 86 of file CLayerStringList.hpp.

87 {
88 return E_NOTIMPL;
89 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Next()

STDMETHOD() CLayerStringList::Next ( ULONG  celt,
LPOLESTR rgelt,
ULONG pceltFetched 
)
inlineoverride

Implements IEnumString.

Definition at line 31 of file CLayerStringList.hpp.

32 {
33 if (pceltFetched)
34 *pceltFetched = 0;
35
36 while (celt && m_layer)
37 {
39 if (nameid)
40 {
42 if (name && !IsBuiltinLayer(name))
43 {
44 ULONG Size = wcslen(name) + 1;
45
46 *rgelt = (LPOLESTR)::CoTaskMemAlloc(Size * sizeof(WCHAR));
47 StringCchCopyW(*rgelt, Size, name);
48
49 if (pceltFetched)
50 (*pceltFetched)++;
51
52 celt--;
53 rgelt++;
54 }
55 }
57 }
58 return celt ? S_FALSE : S_OK;
59 }
BOOL IsBuiltinLayer(PCWSTR Name)
TAGID WINAPI SdbFindFirstTag(PDB pdb, TAGID parent, TAG tag)
Definition: sdbread.c:208
TAGID WINAPI SdbFindNextTag(PDB pdb, TAGID parent, TAGID prev_child)
Definition: sdbread.c:231
LPWSTR WINAPI SdbGetStringTagPtr(PDB pdb, TAGID tagid)
Definition: sdbread.c:375
DWORD TAGID
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define S_OK
Definition: intsafe.h:52
static LPOLESTR
Definition: stg_prop.c:27
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
Definition: name.c:39
uint32_t ULONG
Definition: typedefs.h:59
#define TAG_NAME
Definition: vfat.h:553
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
#define S_FALSE
Definition: winerror.h:2357
WCHAR * LPWSTR
Definition: xmlstorage.h:184

◆ Reset()

STDMETHOD() CLayerStringList::Reset ( )
inlineoverride

Implements IEnumString.

Definition at line 71 of file CLayerStringList.hpp.

72 {
74 if (m_db)
75 {
77 if (m_root != TAGID_NULL)
78 {
80 return S_OK;
81 }
82 }
83 return E_FAIL;
84 }
#define TAG_LAYER
Definition: db.cpp:90
#define TAGID_ROOT
Definition: db.cpp:39
#define TAG_DATABASE
Definition: db.cpp:85
#define E_FAIL
Definition: ddrawi.h:102

Referenced by CLayerStringList().

◆ Skip()

STDMETHOD() CLayerStringList::Skip ( ULONG  celt)
inlineoverride

Implements IEnumString.

Definition at line 61 of file CLayerStringList.hpp.

62 {
63 while (m_layer && celt)
64 {
66 --celt;
67 }
68 return celt ? S_FALSE : S_OK;
69 }

Member Data Documentation

◆ m_db

PDB CLayerStringList::m_db
protected

Definition at line 92 of file CLayerStringList.hpp.

Referenced by CLayerStringList(), Next(), Reset(), Skip(), and ~CLayerStringList().

◆ m_layer

TAGID CLayerStringList::m_layer
protected

Definition at line 94 of file CLayerStringList.hpp.

Referenced by Next(), Reset(), and Skip().

◆ m_root

TAGID CLayerStringList::m_root
protected

Definition at line 93 of file CLayerStringList.hpp.

Referenced by Next(), Reset(), and Skip().


The documentation for this class was generated from the following file: