ReactOS 0.4.16-dev-122-g325d74c
CEnumString Class Reference
Inheritance diagram for CEnumString:
Collaboration diagram for CEnumString:

Public Member Functions

 CEnumString ()
 
virtual ~CEnumString ()
 
VOID SetList (UINT nCount, LPWSTR *pList)
 
STDMETHODIMP QueryInterface (REFIID iid, VOID **ppv) override
 
 STDMETHODIMP_ (ULONG) AddRef() override
 
 STDMETHODIMP_ (ULONG) Release() override
 
STDMETHODIMP Next (ULONG celt, LPWSTR *rgelt, ULONG *pceltFetched) override
 
STDMETHODIMP Skip (ULONG celt) override
 
STDMETHODIMP Reset () override
 
STDMETHODIMP Clone (IEnumString **ppenum) override
 
STDMETHODIMP Expand (PCWSTR pszExpand) override
 
STDMETHODIMP GetOptions (DWORD *pdwFlag) override
 
STDMETHODIMP SetOptions (DWORD dwFlag) override
 
- 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

ULONG m_cRefs
 
UINT m_nIndex
 
UINT m_nCount
 
LPWSTRm_pList
 

Additional Inherited Members

- Public Types inherited from IEnumString
typedef IEnumStringLPENUMSTRING
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 

Detailed Description

Definition at line 41 of file IAutoComplete.cpp.

Constructor & Destructor Documentation

◆ CEnumString()

CEnumString::CEnumString ( )
inline

Definition at line 44 of file IAutoComplete.cpp.

44 : m_cRefs(0), m_nIndex(0), m_nCount(0), m_pList(NULL)
45 {
46 trace("CEnumString::CEnumString(%p)\n", this);
47 }
#define trace
Definition: atltest.h:70
LPWSTR * m_pList
#define NULL
Definition: types.h:112

◆ ~CEnumString()

virtual CEnumString::~CEnumString ( )
inlinevirtual

Definition at line 49 of file IAutoComplete.cpp.

50 {
51 trace("CEnumString::~CEnumString(%p)\n", this);
52 for (UINT i = 0; i < m_nCount; ++i)
53 {
55 m_pList[i] = NULL;
56 }
58 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
unsigned int UINT
Definition: ndis.h:50

Member Function Documentation

◆ Clone()

STDMETHODIMP CEnumString::Clone ( IEnumString **  ppenum)
inlineoverride

Implements IEnumString.

Definition at line 132 of file IAutoComplete.cpp.

133 {
134 trace("CEnumString::Clone()\n");
135 return E_NOTIMPL;
136 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Expand()

STDMETHODIMP CEnumString::Expand ( PCWSTR  pszExpand)
inlineoverride

Definition at line 138 of file IAutoComplete.cpp.

139 {
140 trace("CEnumString::Expand(%S)\n", pszExpand);
141 s_bExpand = TRUE;
142 s_strExpand = pszExpand;
143 return S_OK;
144 }
static BOOL s_bExpand
static CStringW s_strExpand
#define TRUE
Definition: types.h:120
#define S_OK
Definition: intsafe.h:52

◆ GetOptions()

STDMETHODIMP CEnumString::GetOptions ( DWORD pdwFlag)
inlineoverride

Definition at line 145 of file IAutoComplete.cpp.

146 {
147 trace("CEnumString::GetOption(%p)\n", pdwFlag);
148 return S_OK;
149 }

◆ Next()

STDMETHODIMP CEnumString::Next ( ULONG  celt,
LPWSTR rgelt,
ULONG pceltFetched 
)
inlineoverride

Definition at line 102 of file IAutoComplete.cpp.

103 {
104 if (rgelt)
105 *rgelt = NULL;
106 if (pceltFetched)
107 *pceltFetched = 0;
108 if (celt != 1 || !rgelt || !pceltFetched)
109 return E_INVALIDARG;
110 if (m_nIndex >= m_nCount)
111 return S_FALSE;
112
113 SHStrDupW(m_pList[m_nIndex], rgelt);
114 ++m_nIndex;
115 if (!*rgelt)
116 return E_OUTOFMEMORY;
117 *pceltFetched = 1;
118 return S_OK;
119 }
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
HRESULT WINAPI SHStrDupW(LPCWSTR src, LPWSTR *dest)
Definition: string.c:2012
#define S_FALSE
Definition: winerror.h:2357

◆ QueryInterface()

STDMETHODIMP CEnumString::QueryInterface ( REFIID  iid,
VOID **  ppv 
)
inlineoverride

Implements IUnknown.

Definition at line 66 of file IAutoComplete.cpp.

67 {
68 if (iid == IID_IUnknown || iid == IID_IEnumString)
69 {
70 trace("IID_IEnumString\n");
71 AddRef();
72 *ppv = static_cast<IEnumString *>(this);
73 return S_OK;
74 }
75 if (iid == IID_IACList || iid == IID_IACList2)
76 {
77 trace("IID_IACList2\n");
78 AddRef();
79 *ppv = static_cast<IACList2 *>(this);
80 return S_OK;
81 }
82 return E_NOINTERFACE;
83 }
const GUID IID_IUnknown
REFIID LPVOID * ppv
Definition: atlbase.h:39
ULONG AddRef()
const GUID IID_IEnumString
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ Reset()

STDMETHODIMP CEnumString::Reset ( )
inlineoverride

Implements IEnumString.

Definition at line 125 of file IAutoComplete.cpp.

126 {
127 trace("CEnumString::Reset\n");
128 m_nIndex = 0;
129 s_bReset = TRUE;
130 return S_OK;
131 }
static BOOL s_bReset

◆ SetList()

VOID CEnumString::SetList ( UINT  nCount,
LPWSTR pList 
)
inline

Definition at line 60 of file IAutoComplete.cpp.

61 {
62 m_nCount = nCount;
63 m_pList = pList;
64 }
FxChildList * pList

◆ SetOptions()

STDMETHODIMP CEnumString::SetOptions ( DWORD  dwFlag)
inlineoverride

Definition at line 150 of file IAutoComplete.cpp.

151 {
152 trace("CEnumString::SetOption(0x%lX)\n", dwFlag);
153 return S_OK;
154 }

◆ Skip()

STDMETHODIMP CEnumString::Skip ( ULONG  celt)
inlineoverride

Implements IEnumString.

Definition at line 120 of file IAutoComplete.cpp.

121 {
122 trace("CEnumString::Skip(%lu)\n", celt);
123 return E_NOTIMPL;
124 }

◆ STDMETHODIMP_() [1/2]

CEnumString::STDMETHODIMP_ ( ULONG  )
inlineoverride

Definition at line 84 of file IAutoComplete.cpp.

85 {
86 //trace("CEnumString::AddRef\n");
87 ++m_cRefs;
88 return m_cRefs;
89 }

◆ STDMETHODIMP_() [2/2]

CEnumString::STDMETHODIMP_ ( ULONG  )
inlineoverride

Definition at line 90 of file IAutoComplete.cpp.

91 {
92 //trace("CEnumString::Release\n");
93 --m_cRefs;
94 if (m_cRefs == 0)
95 {
96 delete this;
97 return 0;
98 }
99 return m_cRefs;
100 }

Member Data Documentation

◆ m_cRefs

ULONG CEnumString::m_cRefs
protected

Definition at line 157 of file IAutoComplete.cpp.

Referenced by STDMETHODIMP_().

◆ m_nCount

UINT CEnumString::m_nCount
protected

Definition at line 158 of file IAutoComplete.cpp.

Referenced by Next(), SetList(), and ~CEnumString().

◆ m_nIndex

UINT CEnumString::m_nIndex
protected

Definition at line 158 of file IAutoComplete.cpp.

Referenced by Next(), and Reset().

◆ m_pList

LPWSTR* CEnumString::m_pList
protected

Definition at line 159 of file IAutoComplete.cpp.

Referenced by Next(), SetList(), and ~CEnumString().


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