Qt 4.8
Public Functions | Public Variables | Properties | List of all members
QAxSignalVec Class Reference
Inheritance diagram for QAxSignalVec:

Public Functions

unsigned long __stdcall AddRef ()
 
STDMETHOD() Clone (IEnumConnectionPoints **ppEnum)
 
STDMETHOD() Next (ULONG cConnections, IConnectionPoint **cpoint, ULONG *pcFetched)
 
 QAxSignalVec (const QAxServerBase::ConnectionPoints &points)
 
 QAxSignalVec (const QAxSignalVec &old)
 
STDMETHOD() QueryInterface (REFIID iid, void **iface)
 
unsigned long __stdcall Release ()
 
STDMETHOD() Reset ()
 
STDMETHOD() Skip (ULONG cConnections)
 
 ~QAxSignalVec ()
 

Public Variables

QList< IConnectionPoint * > cpoints
 
int current
 

Properties

unsigned long ref
 
CRITICAL_SECTION refCountSection
 

Detailed Description

Definition at line 494 of file qaxserverbase.cpp.

Constructors and Destructors

◆ QAxSignalVec() [1/2]

QAxSignalVec::QAxSignalVec ( const QAxServerBase::ConnectionPoints points)
inline

Definition at line 497 of file qaxserverbase.cpp.

498  : cpoints(points.values())
499  , current(0)
500  , ref(0)
501  {
502  InitializeCriticalSection(&refCountSection);
503  const int count = cpoints.count();
504  for (int i = 0; i < count; ++i)
505  cpoints.at(i)->AddRef();
506  }
QList< T > values() const
Returns a list containing all the values in the map, in ascending order of their keys.
Definition: qmap.h:863
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
CRITICAL_SECTION refCountSection
unsigned long ref
QList< IConnectionPoint * > cpoints

◆ QAxSignalVec() [2/2]

QAxSignalVec::QAxSignalVec ( const QAxSignalVec old)
inline

Definition at line 507 of file qaxserverbase.cpp.

508  : cpoints(old.cpoints)
509  , current(old.current)
510  {
511  InitializeCriticalSection(&refCountSection);
512  ref = 0;
513  const int count = cpoints.count();
514  for (int i = 0; i < count; ++i)
515  cpoints.at(i)->AddRef();
516  }
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
CRITICAL_SECTION refCountSection
unsigned long ref
QList< IConnectionPoint * > cpoints

◆ ~QAxSignalVec()

QAxSignalVec::~QAxSignalVec ( )
inline

Definition at line 517 of file qaxserverbase.cpp.

518  {
519  const int count = cpoints.count();
520  for (int i = 0; i < count; ++i)
521  cpoints.at(i)->Release();
522 
523  DeleteCriticalSection(&refCountSection);
524  }
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
CRITICAL_SECTION refCountSection
QList< IConnectionPoint * > cpoints

Functions

◆ AddRef()

unsigned long __stdcall QAxSignalVec::AddRef ( )
inline

Definition at line 526 of file qaxserverbase.cpp.

527  {
528  EnterCriticalSection(&refCountSection);
529  unsigned long r = ++ref;
530  LeaveCriticalSection(&refCountSection);
531  return ++r;
532  }
CRITICAL_SECTION refCountSection
unsigned long ref

◆ Clone()

STDMETHOD() QAxSignalVec::Clone ( IEnumConnectionPoints **  ppEnum)
inline

Definition at line 598 of file qaxserverbase.cpp.

599  {
600  if (!ppEnum)
601  return E_POINTER;
602  *ppEnum = new QAxSignalVec(*this);
603  (*ppEnum)->AddRef();
604 
605  return S_OK;
606  }
QAxSignalVec(const QAxServerBase::ConnectionPoints &points)

◆ Next()

STDMETHOD() QAxSignalVec::Next ( ULONG  cConnections,
IConnectionPoint **  cpoint,
ULONG *  pcFetched 
)
inline

Definition at line 560 of file qaxserverbase.cpp.

561  {
562  if (!cpoint)
563  return E_POINTER;
564 
565  if (!pcFetched && cConnections > 1)
566  return E_POINTER;
567 
568  const int count = cpoints.count();
569  unsigned long i;
570  for (i = 0; i < cConnections; i++) {
571  if (current==count)
572  break;
573  IConnectionPoint *cp = cpoints.at(current);
574  cp->AddRef();
575  cpoint[i] = cp;
576  ++current;
577  }
578  if (pcFetched)
579  *pcFetched = i;
580  return i == cConnections ? S_OK : S_FALSE;
581  }
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
const T & at(int i) const
Returns the item at index position i in the list.
Definition: qlist.h:468
QList< IConnectionPoint * > cpoints

◆ QueryInterface()

STDMETHOD() QAxSignalVec::QueryInterface ( REFIID  iid,
void **  iface 
)
inline

Definition at line 545 of file qaxserverbase.cpp.

546  {
547  if (!iface)
548  return E_POINTER;
549  *iface = 0;
550  if (iid == IID_IUnknown)
551  *iface = this;
552  else if (iid == IID_IEnumConnectionPoints)
553  *iface = this;
554  else
555  return E_NOINTERFACE;
556 
557  AddRef();
558  return S_OK;
559  }
unsigned long __stdcall AddRef()

◆ Release()

unsigned long __stdcall QAxSignalVec::Release ( )
inline

Definition at line 533 of file qaxserverbase.cpp.

534  {
535  EnterCriticalSection(&refCountSection);
536  unsigned long r = --ref;
537  LeaveCriticalSection(&refCountSection);
538 
539  if (!r) {
540  delete this;
541  return 0;
542  }
543  return r;
544  }
CRITICAL_SECTION refCountSection
unsigned long ref

◆ Reset()

STDMETHOD() QAxSignalVec::Reset ( )
inline

Definition at line 593 of file qaxserverbase.cpp.

594  {
595  current = 0;
596  return S_OK;
597  }

◆ Skip()

STDMETHOD() QAxSignalVec::Skip ( ULONG  cConnections)
inline

Definition at line 582 of file qaxserverbase.cpp.

583  {
584  const int count = cpoints.count();
585  while (cConnections) {
586  if (current == count)
587  return S_FALSE;
588  ++current;
589  --cConnections;
590  }
591  return S_OK;
592  }
int count(const T &t) const
Returns the number of occurrences of value in the list.
Definition: qlist.h:891
QList< IConnectionPoint * > cpoints

Properties

◆ cpoints

QList<IConnectionPoint*> QAxSignalVec::cpoints

Definition at line 608 of file qaxserverbase.cpp.

◆ current

int QAxSignalVec::current

Definition at line 609 of file qaxserverbase.cpp.

◆ ref

unsigned long QAxSignalVec::ref
private

Definition at line 614 of file qaxserverbase.cpp.

◆ refCountSection

CRITICAL_SECTION QAxSignalVec::refCountSection
private

Definition at line 612 of file qaxserverbase.cpp.


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