ReactOS  0.4.14-dev-41-g31d7680
CLayerStringList Class Reference

#include <CLayerStringList.hpp>

Inheritance diagram for CLayerStringList:
Collaboration diagram for CLayerStringList:

Public Member Functions

 CLayerStringList ()
 
 ~CLayerStringList ()
 
virtual HRESULT STDMETHODCALLTYPE Next (ULONG celt, LPOLESTR *rgelt, ULONG *pceltFetched)
 
virtual HRESULT STDMETHODCALLTYPE Skip (ULONG celt)
 
virtual HRESULT STDMETHODCALLTYPE Reset ()
 
virtual HRESULT STDMETHODCALLTYPE Clone (IEnumString **ppenum)
 
- 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 RemoteNext ([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] LPOLESTR *rgelt, [out] ULONG *pceltFetched)
 
- 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  }
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define _countof(array)
Definition: fontsub.cpp:30
HRESULT WINAPI SdbGetAppPatchDir(HSDB db, LPWSTR path, DWORD size)
Definition: hsdb.c:579
virtual HRESULT STDMETHODCALLTYPE Reset()
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:325
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:26
static const WCHAR L[]
Definition: oid.c:1250
#define TAGID_NULL
Definition: db.cpp:36
PDB WINAPI SdbOpenDatabase(LPCWSTR path, PATH_TYPE type)
Definition: sdbapi.c:329

◆ ~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()

virtual HRESULT STDMETHODCALLTYPE CLayerStringList::Clone ( IEnumString **  ppenum)
inlinevirtual

Implements IEnumString.

Definition at line 86 of file CLayerStringList.hpp.

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

◆ Next()

virtual HRESULT STDMETHODCALLTYPE CLayerStringList::Next ( ULONG  celt,
LPOLESTR rgelt,
ULONG pceltFetched 
)
inlinevirtual

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  }
#define TAG_NAME
Definition: vfat.h:547
LPWSTR WINAPI SdbGetStringTagPtr(PDB pdb, TAGID tagid)
Definition: sdbread.c:375
static LPOLESTR
Definition: stg_prop.c:27
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
#define S_FALSE
Definition: winerror.h:2357
TAGID WINAPI SdbFindNextTag(PDB pdb, TAGID parent, TAGID prev_child)
Definition: sdbread.c:231
__wchar_t WCHAR
Definition: xmlstorage.h:180
TAGID WINAPI SdbFindFirstTag(PDB pdb, TAGID parent, TAG tag)
Definition: sdbread.c:208
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
#define S_OK
Definition: intsafe.h:59
Definition: name.c:36
unsigned int ULONG
Definition: retypes.h:1
DWORD TAGID
WCHAR * LPWSTR
Definition: xmlstorage.h:184
BOOL IsBuiltinLayer(PCWSTR Name)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:406
size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)

◆ Reset()

virtual HRESULT STDMETHODCALLTYPE CLayerStringList::Reset ( void  )
inlinevirtual

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_DATABASE
Definition: db.cpp:83
#define E_FAIL
Definition: ddrawi.h:102
TAGID WINAPI SdbFindFirstTag(PDB pdb, TAGID parent, TAG tag)
Definition: sdbread.c:208
#define TAGID_NULL
Definition: db.cpp:36
#define S_OK
Definition: intsafe.h:59
#define TAG_LAYER
Definition: db.cpp:88
#define TAGID_ROOT
Definition: db.cpp:37

Referenced by CLayerStringList().

◆ Skip()

virtual HRESULT STDMETHODCALLTYPE CLayerStringList::Skip ( ULONG  celt)
inlinevirtual

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  }
#define S_FALSE
Definition: winerror.h:2357
TAGID WINAPI SdbFindNextTag(PDB pdb, TAGID parent, TAGID prev_child)
Definition: sdbread.c:231
#define S_OK
Definition: intsafe.h:59

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: