OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
owl::TPidl Class Reference

TPidl is an item identifier list class (ITEMIDLIST). More...

#include <owl/shellitm.h>

Public Member Functions

 TPidl (LPITEMIDLIST pidl=0)
 Construct a TPidl from an LPITEMIDLIST (pidl)
 
 TPidl (const TPidl &source)
 TPidl copy constructor.
 
virtual ~TPidl ()
 TPidl destructor.
 
TPidloperator= (const TPidl &source)
 TPidl assignement operator (from another TPidl)
 
TPidloperator= (LPITEMIDLIST pidl)
 TPidl assignement operator (from an LPITEMIDLIST (pidl))
 
bool operator! () const
 Check to see if TPidl represents an ITEMIDLIST (return true if it does not)
 
 operator LPCITEMIDLIST () const
 Use TPidl in place of pidl.
 
 operator LPITEMIDLIST ()
 
 operator LPCITEMIDLIST * () const
 Use TPidl in place of pointer to a pidl.
 
 operator LPITEMIDLIST * ()
 
ulong GetSize () const
 Get size (in bytes) of a pidl.
 
long GetItemCount () const
 Get number of item ids in the TPidl (the TPidl can be a list of ids)
 
TPidl GetLastItem () const
 Get the last item id in the TPidl.
 
TPidl StripLastItem () const
 Return a TPidl with the last item id stripped off of it.
 
LPITEMIDLIST CopyPidl () const
 Copy a pidl.
 

Static Public Member Functions

static LPITEMIDLIST Next (LPITEMIDLIST pidl)
 Return next item id (in the list)
 

Protected Member Functions

void FreePidl ()
 Free a pidl with the shell's allocator.
 

Detailed Description

TPidl is an item identifier list class (ITEMIDLIST).

Its constructor takes an LPITEMIDLIST (a.k.a., pidl). The copy constructor and assignement operators supplied function to manipulate the ITEMIDLIST, get the size, get the number of items in the list, etc, supplied. Normally, the programmer will not have to be concerned with ITEMIDLISTs nor with the TPidl class. The TShellItem class hides all this.

Definition at line 169 of file shellitm.h.

Constructor & Destructor Documentation

◆ TPidl() [1/2]

owl::TPidl::TPidl ( LPITEMIDLIST pidl = 0)
inline

Construct a TPidl from an LPITEMIDLIST (pidl)

Definition at line 892 of file shellitm.h.

◆ TPidl() [2/2]

owl::TPidl::TPidl ( const TPidl & source)
inline

TPidl copy constructor.

Definition at line 885 of file shellitm.h.

◆ ~TPidl()

owl::TPidl::~TPidl ( )
inlinevirtual

TPidl destructor.

Definition at line 920 of file shellitm.h.

References FreePidl().

Member Function Documentation

◆ CopyPidl()

LPITEMIDLIST owl::TPidl::CopyPidl ( ) const

Copy a pidl.

CopyPidl copies a pidl (allocates memory with the shell's allocator)

Definition at line 286 of file shellitm.cpp.

References _T, GetSize(), Next(), owl::TXShell::Raise(), STATIC_CAST, and WARNX.

◆ FreePidl()

void owl::TPidl::FreePidl ( )
protected

Free a pidl with the shell's allocator.

protected function used internally to free PIDL memory with the shell's allocator

Definition at line 239 of file shellitm.cpp.

◆ GetItemCount()

long owl::TPidl::GetItemCount ( ) const

Get number of item ids in the TPidl (the TPidl can be a list of ids)

GetItemCount returns the number of identifiers in the identifier list (pidl)

Definition at line 253 of file shellitm.cpp.

References Next().

◆ GetLastItem()

TPidl owl::TPidl::GetLastItem ( ) const

Get the last item id in the TPidl.

GetLastItem returns the last item in an identifier list for file system items, this is the rightmost part of a path e.g., GetLastItem() on a pidl representing.

"c:\\dir1\\dir2\\dir3\\file1"

returns "file1"

Definition at line 325 of file shellitm.cpp.

References TPidl(), _T, GetItemCount(), Next(), owl::TXShell::Raise(), STATIC_CAST, and WARNX.

◆ GetSize()

ulong owl::TPidl::GetSize ( ) const

Get size (in bytes) of a pidl.

GetSize returns the size (in bytes) of the PIDL.

Definition at line 271 of file shellitm.cpp.

References Next().

◆ Next()

LPITEMIDLIST owl::TPidl::Next ( LPITEMIDLIST pidl)
inlinestatic

Return next item id (in the list)

Definition at line 878 of file shellitm.h.

◆ operator LPCITEMIDLIST()

owl::TPidl::operator LPCITEMIDLIST ( ) const
inline

Use TPidl in place of pidl.

Definition at line 925 of file shellitm.h.

◆ operator LPCITEMIDLIST *()

owl::TPidl::operator LPCITEMIDLIST * ( ) const
inline

Use TPidl in place of pointer to a pidl.

Definition at line 935 of file shellitm.h.

◆ operator LPITEMIDLIST()

owl::TPidl::operator LPITEMIDLIST ( )
inline

Definition at line 930 of file shellitm.h.

◆ operator LPITEMIDLIST *()

owl::TPidl::operator LPITEMIDLIST * ( )
inline

Definition at line 940 of file shellitm.h.

◆ operator!()

bool owl::TPidl::operator! ( ) const
inline

Check to see if TPidl represents an ITEMIDLIST (return true if it does not)

Definition at line 870 of file shellitm.h.

◆ operator=() [1/2]

TPidl & owl::TPidl::operator= ( const TPidl & source)
inline

TPidl assignement operator (from another TPidl)

Definition at line 900 of file shellitm.h.

◆ operator=() [2/2]

TPidl & owl::TPidl::operator= ( LPITEMIDLIST pidl)
inline

TPidl assignement operator (from an LPITEMIDLIST (pidl))

Definition at line 911 of file shellitm.h.

References FreePidl().

◆ StripLastItem()

TPidl owl::TPidl::StripLastItem ( ) const

Return a TPidl with the last item id stripped off of it.

StripLastItem returns a pidl stipped of its last (rightmost) item.

Definition at line 358 of file shellitm.cpp.

References TPidl(), _T, GetItemCount(), Next(), owl::TXShell::Raise(), STATIC_CAST, and WARNX.


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