ReactOS 0.4.16-dev-237-gd6eebaa
FxCollection Class Reference

#include <fxcollection.hpp>

Inheritance diagram for FxCollection:
Collaboration diagram for FxCollection:

Public Member Functions

 FxCollection (__in PFX_DRIVER_GLOBALS FxDriverGlobals)
 
 ~FxCollection (VOID)
 
BOOLEAN Add (__in FxObject *Item)
 
VOID StealCollection (__in FxCollection *Collection)
 
- Public Member Functions inherited from FxNonPagedObject
 FxNonPagedObject (__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
 
 FxNonPagedObject (__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObjectType ObjectType)
 
virtual ~FxNonPagedObject (VOID)
 
 _Acquires_lock_ (this->m_NPLock.m_Lock) __drv_maxIRQL(DISPATCH_LEVEL) __drv_setsIRQL(DISPATCH_LEVEL) VOID Lock(__out __drv_deref(__drv_savesIRQL) PKIRQL PreviousIrql)
 
 _Releases_lock_ (this->m_NPLock.m_Lock) __drv_requiresIRQL(DISPATCH_LEVEL) __inline VOID Unlock(__in __drv_restoresIRQL KIRQL PreviousIrql)
 
 _Acquires_lock_ (this->m_NPLock.m_Lock) __drv_requiresIRQL(DISPATCH_LEVEL) VOID LockAtDispatch(VOID)
 
 _Requires_lock_held_ (this->m_NPLock.m_Lock) _Releases_lock_(this -> m_NPLock.m_Lock) __drv_requiresIRQL(DISPATCH_LEVEL) __inline VOID UnlockFromDispatch(VOID)
 
- Public Member Functions inherited from FxObject
PVOID GetCOMWrapper ()
 
void SetCOMWrapper (__drv_aliasesMem PVOID Wrapper)
 
 FxObject (__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals)
 
virtual ~FxObject (VOID)
 
PVOID __inline operator new (__in size_t Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObjectType Type)
 
PVOID __inline operator new (__in size_t Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __in USHORT ExtraSize=0)
 
VOID operator delete (__in PVOID Memory)
 
VOID SetNoContextHeader (VOID)
 
PVOID __inline GetObjectHandle (VOID)
 
__inline FxContextHeaderGetContextHeader (VOID)
 
__inline PFX_DRIVER_GLOBALS GetDriverGlobals (VOID)
 
WDFTYPE GetType (VOID)
 
USHORT GetObjectSize (VOID)
 
LONG GetRefCnt (VOID)
 
FxTagTrackerGetTagTracker (VOID)
 
CfxDeviceGetDevice (VOID)
 
CfxDeviceBaseGetDeviceBase (VOID)
 
VOID SetDeviceBase (__in CfxDeviceBase *DeviceBase)
 
__inline VOID CallCleanup (VOID)
 
ULONG __inline AddRef (__in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
 
virtual ULONG Release (__in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
 
virtual ULONG AddRefOverride (__in WDFOBJECT_OFFSET Offset, __in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
 
virtual ULONG ReleaseOverride (__in WDFOBJECT_OFFSET Offset, __in_opt PVOID Tag=NULL, __in LONG Line=0, __in_opt PSTR File=NULL)
 
virtual _Must_inspect_result_ NTSTATUS QueryInterface (__in FxQueryInterfaceParams *Params)
 
VOID MarkTraceState (VOID)
 
BOOLEAN __inline IsTraceState (VOID)
 
VOID __inline TraceDroppedEvent (__in FxObjectDroppedEvent Event)
 
VOID MarkPassiveDispose (__in FxObjectLockState State=ObjectLock)
 
VOID MarkPassiveCallbacks (__in FxObjectLockState State=ObjectLock)
 
VOID MarkForceDisposeThread (__in FxObjectLockState State=ObjectLock)
 
BOOLEAN IsPassiveCallbacks (__in BOOLEAN AcquireLock=TRUE)
 
BOOLEAN IsPassiveDispose (__in BOOLEAN AcquireLock=TRUE)
 
BOOLEAN IsForceDisposeThread (__in BOOLEAN AcquireLock=TRUE)
 
VOID MarkCommitted (VOID)
 
BOOLEAN IsCommitted (VOID)
 
VOID MarkDisposeOverride (__in FxObjectLockState State=ObjectLock)
 
VOID MarkNoDeleteDDI (__in FxObjectLockState State=ObjectLock)
 
BOOLEAN IsNoDeleteDDI (VOID)
 
_Must_inspect_result_ NTSTATUS Commit (__in_opt PWDF_OBJECT_ATTRIBUTES Attributes, __out_opt WDFOBJECT *ObjectHandle, __in_opt FxObject *Parent=NULL, __in BOOLEAN AssignDriverAsDefaultParent=TRUE)
 
VOID DeleteFromFailedCreate (VOID)
 
VOID ClearEvtCallbacks (VOID)
 
BOOLEAN EarlyDispose (VOID)
 
virtual VOID DeleteObject (VOID)
 
virtual BOOLEAN Dispose (VOID)
 
_Must_inspect_result_ NTSTATUS AssignParentObject (__in FxObject *ParentObject)
 
_Must_inspect_result_ NTSTATUS AddContext (__in FxContextHeader *Header, __in PVOID *Context, __in PWDF_OBJECT_ATTRIBUTES Attributes)
 
_Must_inspect_result_ NTSTATUS RemoveParentAssignment (VOID)
 
_Must_inspect_result_ FxObjectGetParentObjectReferenced (__in PVOID Tag)
 
BOOLEAN IsDisposed (VOID)
 
- Public Member Functions inherited from FxCollectionInternal
 FxCollectionInternal (VOID)
 
 ~FxCollectionInternal (VOID)
 
_Must_inspect_result_ FxCollectionEntryFindEntry (__in ULONG Index)
 
_Must_inspect_result_ FxCollectionEntryFindEntryByObject (__in FxObject *Object)
 
ULONG Count (VOID)
 
BOOLEAN Add (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObject *Item)
 
_Must_inspect_result_ FxObjectGetItem (__in ULONG Index)
 
_Must_inspect_result_ FxObjectGetFirstItem (VOID)
 
_Must_inspect_result_ FxObjectGetLastItem (VOID)
 
NTSTATUS Remove (__in ULONG Index)
 
VOID CleanupEntry (__in FxCollectionEntry *Entry)
 
VOID CleanupEntryObject (__in FxObject *Object)
 
NTSTATUS RemoveEntry (__in FxCollectionEntry *Entry)
 
_Must_inspect_result_ NTSTATUS RemoveItem (__in FxObject *Item)
 
_Must_inspect_result_ FxCollectionEntryStart (VOID)
 
_Must_inspect_result_ FxCollectionEntryEnd (VOID)
 
VOID Clear (VOID)
 

Protected Member Functions

 FxCollection (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in WDFTYPE Type, __in USHORT Size)
 
- Protected Member Functions inherited from FxObject
 FxObject (__in WDFTYPE Type, __in USHORT Size, __in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObjectType ObjectType)
 
FxObjectDebugExtensionGetDebugExtension (VOID)
 
BOOLEAN IsDebug (VOID)
 
VOID AllocateTagTracker (__in WDFTYPE Type)
 
virtual VOID SelfDestruct (VOID)
 
PVOID __inline GetObjectHandleUnchecked (VOID)
 
VOID __inline DestroyChildren (VOID)
 
VOID DeleteEarlyDisposedObject (VOID)
 
- Protected Member Functions inherited from FxCollectionInternal
_Must_inspect_result_ FxCollectionEntryAllocateEntry (__in PFX_DRIVER_GLOBALS FxDriverGlobals)
 
VOID AddEntry (__in FxCollectionEntry *Node, __in FxObject *Item)
 

Additional Inherited Members

- Static Public Member Functions inherited from FxObject
static FxObject_FromDisposeEntry (__in PSINGLE_LIST_ENTRY Entry)
 
static FxObject_GetObjectFromHandle (__in WDFOBJECT Handle, __inout PWDFOBJECT_OFFSET ObjectOffset)
 
static PVOID __inline _ToHandle (__in FxObject *Object)
 
static VOID __inline _ReferenceActual (__in WDFOBJECT Object, __in_opt PVOID Tag, __in LONG Line, __in PSTR File)
 
static VOID __inline _DereferenceActual (__in WDFOBJECT Object, __in_opt PVOID Tag, __in LONG Line, __in PSTR File)
 
static PVOID _GetDebugBase (__in FxObject *Object)
 
static PFX_POOL_HEADER _CleanupPointer (__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObject *Object)
 
static _Must_inspect_result_ NTSTATUS _GetEffectiveLock (__in FxObject *Object, __in_opt IFxHasCallbacks *Callbacks, __in BOOLEAN AutomaticLocking, __in BOOLEAN PassiveCallbacks, __out FxCallbackLock **CallbackLock, __out_opt FxObject **CallbackLockObject)
 
static _Must_inspect_result_ NTSTATUS _ObjectQuery (_In_ FxObject *Object, _In_ CONST GUID *Guid, _In_ ULONG QueryBufferLength, _Out_writes_bytes_(QueryBufferLength) PVOID QueryBuffer)
 
- Static Protected Member Functions inherited from FxObject
static PVOID _GetBase (__in FxObject *Object)
 
- Protected Attributes inherited from FxObject
union {
   CfxDeviceBase *   m_DeviceBase
 
   CfxDevice *   m_Device
 
}; 
 
- Protected Attributes inherited from FxCollectionInternal
ULONG m_Count
 
LIST_ENTRY m_ListHead
 

Detailed Description

Definition at line 194 of file fxcollection.hpp.

Constructor & Destructor Documentation

◆ FxCollection() [1/2]

FxCollection::FxCollection ( __in PFX_DRIVER_GLOBALS  FxDriverGlobals)

Definition at line 232 of file fxcollection.cpp.

234 :
235 FxNonPagedObject(FX_TYPE_COLLECTION, sizeof(FxCollection), FxDriverGlobals)
236{
237}
@ FX_TYPE_COLLECTION
Definition: fxtypes.h:59

◆ ~FxCollection()

FxCollection::~FxCollection ( VOID  )

Definition at line 247 of file fxcollection.cpp.

250{
251 Clear();
252}
static void Clear(void)
Definition: treeview.c:388

◆ FxCollection() [2/2]

FxCollection::FxCollection ( __in PFX_DRIVER_GLOBALS  FxDriverGlobals,
__in WDFTYPE  Type,
__in USHORT  Size 
)
protected

Definition at line 239 of file fxcollection.cpp.

243 : FxNonPagedObject(Type, Size, FxDriverGlobals)
244{
245}
Type
Definition: Type.h:7
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533

Member Function Documentation

◆ Add()

BOOLEAN FxCollection::Add ( __in FxObject Item)
inline

Definition at line 206 of file fxcollection.hpp.

209 {
211 }
__inline PFX_DRIVER_GLOBALS GetDriverGlobals(VOID)
Definition: fxobject.hpp:734
BOOLEAN Add(__in PFX_DRIVER_GLOBALS FxDriverGlobals, __in FxObject *Item)
_In_ WDFCOLLECTION _In_ WDFOBJECT Item

Referenced by FxIoResList::BuildFromWdmList(), and FxCmResList::BuildFromWdmList().

◆ StealCollection()

VOID FxCollection::StealCollection ( __in FxCollection Collection)

Definition at line 255 of file fxcollection.cpp.

258{
260
261 m_Count = Collection->m_Count;
262 Collection->m_Count = 0;
263
264 while (!IsListEmpty(&Collection->m_ListHead)) {
266
267 ple = RemoveHeadList(&Collection->m_ListHead);
269
270 //
271 // When we are tracking reference tags, the tag associated with the
272 // reference matters. When we added the object to Collection, we used
273 // that pointer as the tag. We must remove that tag and readd the
274 // reference using the this value as a tag.
275 //
276 // Obviously, order is important here. Add the reference first so that
277 // we know the relese will make the object go away.
278 //
279 pEntry->m_Object->ADDREF(this);
280 pEntry->m_Object->RELEASE(Collection);
281
283 }
284}
#define InsertTailList(ListHead, Entry)
#define IsListEmpty(ListHead)
Definition: env_spec_w32.h:954
#define RemoveHeadList(ListHead)
Definition: env_spec_w32.h:964
PSINGLE_LIST_ENTRY ple
PLIST_ENTRY pEntry
Definition: fxioqueue.cpp:4484
Definition: typedefs.h:120
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _In_opt_ PWDF_OBJECT_ATTRIBUTES _In_ WDFCOLLECTION Collection
Definition: wdfregistry.h:374

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