ReactOS 0.4.15-dev-8348-gc1b9bb5
CEnumPins Class Reference
Inheritance diagram for CEnumPins:
Collaboration diagram for CEnumPins:

Public Member Functions

STDMETHODIMP QueryInterface (REFIID InterfaceId, PVOID *Interface)
 
 STDMETHODIMP_ (ULONG) AddRef()
 
 STDMETHODIMP_ (ULONG) Release()
 
HRESULT STDMETHODCALLTYPE Next (ULONG cPins, IPin **ppPins, ULONG *pcFetched)
 
HRESULT STDMETHODCALLTYPE Skip (ULONG cPins)
 
HRESULT STDMETHODCALLTYPE Reset ()
 
HRESULT STDMETHODCALLTYPE Clone (IEnumPins **ppEnum)
 
 CEnumPins (std::vector< IPin * > Pins)
 
virtual ~CEnumPins ()
 
STDMETHODIMP QueryInterface (REFIID InterfaceId, PVOID *Interface)
 
 STDMETHODIMP_ (ULONG) AddRef()
 
 STDMETHODIMP_ (ULONG) Release()
 
HRESULT STDMETHODCALLTYPE Next (ULONG cPins, IPin **ppPins, ULONG *pcFetched)
 
HRESULT STDMETHODCALLTYPE Skip (ULONG cPins)
 
HRESULT STDMETHODCALLTYPE Reset ()
 
HRESULT STDMETHODCALLTYPE Clone (IEnumPins **ppEnum)
 
 CEnumPins (ULONG NumPins, IPin **pins)
 
virtual ~CEnumPins ()
 
HRESULT Next ([in] ULONG cPins, [out, size_is(cPins)] IPin **ppPins, [out] ULONG *pcFetched)
 
HRESULT Skip ([in] ULONG cPins)
 
HRESULT Reset (void)
 
HRESULT Clone ([out] IEnumPins **ppEnum)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Protected Attributes

LONG m_Ref
 
std::vector< IPin * > m_Pins
 
ULONG m_Index
 
ULONG m_NumPins
 
IPin ** m_Pins
 

Additional Inherited Members

- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 

Detailed Description

Definition at line 11 of file enumpins.cpp.

Constructor & Destructor Documentation

◆ CEnumPins() [1/2]

CEnumPins::CEnumPins ( std::vector< IPin * >  Pins)
inline

Definition at line 38 of file enumpins.cpp.

38: m_Ref(0), m_Pins(Pins), m_Index(0){};
LONG m_Ref
Definition: enumpins.cpp:42
ULONG m_Index
Definition: enumpins.cpp:44
std::vector< IPin * > m_Pins
Definition: enumpins.cpp:43

◆ ~CEnumPins() [1/2]

virtual CEnumPins::~CEnumPins ( )
inlinevirtual

Definition at line 39 of file enumpins.cpp.

39{};

◆ CEnumPins() [2/2]

CEnumPins::CEnumPins ( ULONG  NumPins,
IPin **  pins 
)
inline

Definition at line 38 of file enumpins.cpp.

38: m_Ref(0), m_NumPins(NumPins), m_Pins(pins), m_Index(0){};
ULONG m_NumPins
Definition: enumpins.cpp:43

◆ ~CEnumPins() [2/2]

virtual CEnumPins::~CEnumPins ( )
inlinevirtual

Definition at line 39 of file enumpins.cpp.

39{};

Member Function Documentation

◆ Clone() [1/2]

HRESULT STDMETHODCALLTYPE CEnumPins::Clone ( IEnumPins **  ppEnum)

Implements IEnumPins.

Definition at line 139 of file enumpins.cpp.

141{
142#ifdef KSPROXY_TRACE
143 OutputDebugStringW(L"CEnumPins::Clone : NotImplemented\n");
144#endif
145
146 return E_NOTIMPL;
147}
#define E_NOTIMPL
Definition: ddrawi.h:99
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
#define L(x)
Definition: ntvdm.h:50

◆ Clone() [2/2]

HRESULT STDMETHODCALLTYPE CEnumPins::Clone ( IEnumPins **  ppEnum)

Implements IEnumPins.

◆ Next() [1/2]

HRESULT STDMETHODCALLTYPE CEnumPins::Next ( ULONG  cPins,
IPin **  ppPins,
ULONG pcFetched 
)

Implements IEnumPins.

Definition at line 79 of file enumpins.cpp.

83{
84 ULONG i = 0;
85
86 if (!ppPins)
87 return E_POINTER;
88
89 if (cPins > 1 && !pcFetched)
90 return E_INVALIDARG;
91
92 while(i < cPins)
93 {
94 if (m_Index + i >= m_Pins.size())
95 break;
96
97 ppPins[i] = m_Pins[m_Index + i];
98 m_Pins[m_Index + i]->AddRef();
99
100 i++;
101 }
102
103 if (pcFetched)
104 {
105 *pcFetched = i;
106 }
107
108 m_Index += i;
109 if (i < cPins)
110 return S_FALSE;
111 else
112 return S_OK;
113}
#define E_INVALIDARG
Definition: ddrawi.h:101
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
#define S_OK
Definition: intsafe.h:52
uint32_t ULONG
Definition: typedefs.h:59
#define S_FALSE
Definition: winerror.h:2357
#define E_POINTER
Definition: winerror.h:2365

◆ Next() [2/2]

HRESULT STDMETHODCALLTYPE CEnumPins::Next ( ULONG  cPins,
IPin **  ppPins,
ULONG pcFetched 
)

Implements IEnumPins.

◆ QueryInterface() [1/2]

STDMETHODIMP CEnumPins::QueryInterface ( REFIID  InterfaceId,
PVOID Interface 
)

◆ QueryInterface() [2/2]

STDMETHODIMP CEnumPins::QueryInterface ( REFIID  InterfaceId,
PVOID Interface 
)

◆ Reset() [1/2]

HRESULT STDMETHODCALLTYPE CEnumPins::Reset ( void  )

Implements IEnumPins.

Definition at line 131 of file enumpins.cpp.

132{
133 m_Index = 0;
134 return S_OK;
135}

◆ Reset() [2/2]

HRESULT STDMETHODCALLTYPE CEnumPins::Reset ( )

Implements IEnumPins.

◆ Skip() [1/2]

HRESULT STDMETHODCALLTYPE CEnumPins::Skip ( ULONG  cPins)

Implements IEnumPins.

Definition at line 117 of file enumpins.cpp.

119{
120 if (cPins + m_Index >= m_Pins.size())
121 {
122 return S_FALSE;
123 }
124
125 m_Index += cPins;
126 return S_OK;
127}

◆ Skip() [2/2]

HRESULT STDMETHODCALLTYPE CEnumPins::Skip ( ULONG  cPins)

Implements IEnumPins.

◆ STDMETHODIMP_() [1/4]

CEnumPins::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 16 of file enumpins.cpp.

17 {
19 return m_Ref;
20 }
#define InterlockedIncrement
Definition: armddk.h:53

◆ STDMETHODIMP_() [2/4]

CEnumPins::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 16 of file enumpins.cpp.

17 {
19 return m_Ref;
20 }

◆ STDMETHODIMP_() [3/4]

CEnumPins::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 21 of file enumpins.cpp.

22 {
24 if (!m_Ref)
25 {
26 delete this;
27 return 0;
28 }
29 return m_Ref;
30 }
#define InterlockedDecrement
Definition: armddk.h:52

◆ STDMETHODIMP_() [4/4]

CEnumPins::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 21 of file enumpins.cpp.

22 {
24 if (!m_Ref)
25 {
26 delete this;
27 return 0;
28 }
29 return m_Ref;
30 }

Member Data Documentation

◆ m_Index

ULONG CEnumPins::m_Index
protected

Definition at line 44 of file enumpins.cpp.

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

◆ m_NumPins

ULONG CEnumPins::m_NumPins
protected

Definition at line 43 of file enumpins.cpp.

◆ m_Pins [1/2]

std::vector<IPin*> CEnumPins::m_Pins
protected

Definition at line 43 of file enumpins.cpp.

Referenced by Next(), and Skip().

◆ m_Pins [2/2]

IPin** CEnumPins::m_Pins
protected

Definition at line 44 of file enumpins.cpp.

◆ m_Ref

LONG CEnumPins::m_Ref
protected

Definition at line 42 of file enumpins.cpp.

Referenced by STDMETHODIMP_().


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