ReactOS 0.4.16-dev-1638-g46c2a3c
CEnumTfDocumentMgr Class Reference
Inheritance diagram for CEnumTfDocumentMgr:
Collaboration diagram for CEnumTfDocumentMgr:

Public Member Functions

 CEnumTfDocumentMgr ()
 
virtual ~CEnumTfDocumentMgr ()
 
STDMETHODIMP QueryInterface (REFIID iid, LPVOID *ppvObject) override
 
 STDMETHODIMP_ (ULONG) AddRef() override
 
 STDMETHODIMP_ (ULONG) Release() override
 
STDMETHODIMP Clone (_Out_ IEnumTfDocumentMgrs **ppEnum) override
 
STDMETHODIMP Next (_In_ ULONG ulCount, _Out_ ITfDocumentMgr **rgDocumentMgr, _Out_ ULONG *pcFetched) override
 
STDMETHODIMP Reset () override
 
STDMETHODIMP Skip (_In_ ULONG ulCount) override
 
- Public Member Functions inherited from IEnumTfDocumentMgrs
HRESULT Clone ([out] IEnumTfDocumentMgrs **ppEnum)
 
HRESULT Next ([in] ULONG ulCount, [out, size_is(ulCount), length_is(*pcFetched)] ITfDocumentMgr **rgDocumentMgr, [out] ULONG *pcFetched)
 
HRESULT Reset ()
 
HRESULT Skip ([in] ULONG ulCount)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Static Public Member Functions

static HRESULT CreateInstance (struct list *head, CEnumTfDocumentMgr **ppOut)
 

Protected Attributes

LONG m_cRefs
 
struct listm_index
 
struct listm_head
 

Additional Inherited Members

- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 

Detailed Description

Definition at line 246 of file threadmgr.cpp.

Constructor & Destructor Documentation

◆ CEnumTfDocumentMgr()

CEnumTfDocumentMgr::CEnumTfDocumentMgr ( )

Definition at line 1259 of file threadmgr.cpp.

1260 : m_cRefs(1)
1261 , m_index(NULL)
1262 , m_head(NULL)
1263{
1264}
struct list * m_head
Definition: threadmgr.cpp:272
struct list * m_index
Definition: threadmgr.cpp:271
#define NULL
Definition: types.h:112

Referenced by CreateInstance().

◆ ~CEnumTfDocumentMgr()

CEnumTfDocumentMgr::~CEnumTfDocumentMgr ( )
virtual

Definition at line 1266 of file threadmgr.cpp.

1267{
1268 TRACE("destroying %p\n", this);
1269}
#define TRACE(s)
Definition: solgame.cpp:4

Member Function Documentation

◆ Clone()

STDMETHODIMP CEnumTfDocumentMgr::Clone ( _Out_ IEnumTfDocumentMgrs **  ppEnum)
override

Definition at line 1301 of file threadmgr.cpp.

1302{
1303 TRACE("(%p)\n", this);
1304
1305 if (!ppEnum)
1306 return E_POINTER;
1307
1308 *ppEnum = NULL;
1309
1310 CEnumTfDocumentMgr *cloned;
1312 if (SUCCEEDED(hr))
1313 {
1314 *ppEnum = static_cast<IEnumTfDocumentMgrs *>(cloned);
1315 cloned->m_index = m_index;
1316 }
1317
1318 return hr;
1319}
static HRESULT CreateInstance(struct list *head, CEnumTfDocumentMgr **ppOut)
Definition: threadmgr.cpp:1371
#define SUCCEEDED(hr)
Definition: intsafe.h:50
HRESULT hr
Definition: shlfolder.c:183
#define E_POINTER
Definition: winerror.h:3480

◆ CreateInstance()

HRESULT CEnumTfDocumentMgr::CreateInstance ( struct list head,
CEnumTfDocumentMgr **  ppOut 
)
static

Definition at line 1371 of file threadmgr.cpp.

1372{
1374 if (!This)
1375 return E_OUTOFMEMORY;
1376
1377 This->m_head = head;
1378 This->m_index = list_head(This->m_head);
1379
1380 *ppOut = This;
1381 TRACE("returning %p\n", *ppOut);
1382 return S_OK;
1383}
struct outqueuenode * head
Definition: adnsresfilter.c:66
#define cicNoThrow
Definition: cicbase.h:46
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define S_OK
Definition: intsafe.h:52
Definition: list.h:15

Referenced by Clone(), and CThreadMgr::EnumDocumentMgrs().

◆ Next()

STDMETHODIMP CEnumTfDocumentMgr::Next ( _In_ ULONG  ulCount,
_Out_ ITfDocumentMgr **  rgDocumentMgr,
_Out_ ULONG pcFetched 
)
override

Definition at line 1321 of file threadmgr.cpp.

1325{
1326 ULONG fetched = 0;
1327
1328 TRACE("(%p)\n", this);
1329
1330 if (!rgDocumentMgr)
1331 return E_POINTER;
1332
1333 while (fetched < ulCount)
1334 {
1335 DocumentMgrEntry *mgrentry;
1336 if (!m_index)
1337 break;
1338
1340 if (!mgrentry)
1341 break;
1342
1343 *rgDocumentMgr = mgrentry->docmgr;
1344 (*rgDocumentMgr)->AddRef();
1345
1347 ++fetched;
1348 ++rgDocumentMgr;
1349 }
1350
1351 if (pcFetched)
1352 *pcFetched = fetched;
1353 return fetched == ulCount ? S_OK : S_FALSE;
1354}
ULONG AddRef()
uint32_t entry
Definition: isohybrid.c:63
__WINE_SERVER_LIST_INLINE struct list * list_next(const struct list *list, const struct list *elem)
Definition: list.h:115
ITfDocumentMgr * docmgr
Definition: threadmgr.cpp:28
#define LIST_ENTRY(type)
Definition: queue.h:175
uint32_t ULONG
Definition: typedefs.h:59
#define S_FALSE
Definition: winerror.h:3451

◆ QueryInterface()

STDMETHODIMP CEnumTfDocumentMgr::QueryInterface ( REFIID  iid,
LPVOID ppvObject 
)
override

Definition at line 1271 of file threadmgr.cpp.

1272{
1273 *ppvObject = NULL;
1274
1275 if (iid == IID_IUnknown || iid == IID_IEnumTfDocumentMgrs)
1276 *ppvObject = static_cast<IEnumTfDocumentMgrs *>(this);
1277
1278 if (*ppvObject)
1279 {
1280 AddRef();
1281 return S_OK;
1282 }
1283
1284 WARN("unsupported interface: %s\n", debugstr_guid(&iid));
1285 return E_NOINTERFACE;
1286}
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
#define debugstr_guid
Definition: kernel32.h:35
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ Reset()

STDMETHODIMP CEnumTfDocumentMgr::Reset ( )
override

Implements IEnumTfDocumentMgrs.

Definition at line 1356 of file threadmgr.cpp.

1357{
1358 TRACE("(%p)\n", this);
1360 return S_OK;
1361}

◆ Skip()

STDMETHODIMP CEnumTfDocumentMgr::Skip ( _In_ ULONG  ulCount)
override

Definition at line 1363 of file threadmgr.cpp.

1364{
1365 TRACE("(%p)\n", this);
1366 for (ULONG i = 0; i < ulCount && m_index; ++i)
1368 return S_OK;
1369}
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

◆ STDMETHODIMP_() [1/2]

CEnumTfDocumentMgr::STDMETHODIMP_ ( ULONG  )
override

◆ STDMETHODIMP_() [2/2]

CEnumTfDocumentMgr::STDMETHODIMP_ ( ULONG  )
override

Member Data Documentation

◆ m_cRefs

LONG CEnumTfDocumentMgr::m_cRefs
protected

Definition at line 270 of file threadmgr.cpp.

◆ m_head

struct list* CEnumTfDocumentMgr::m_head
protected

Definition at line 272 of file threadmgr.cpp.

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

◆ m_index

struct list* CEnumTfDocumentMgr::m_index
protected

Definition at line 271 of file threadmgr.cpp.

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


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