TParseBase Class Reference

class TParseBase

Base class for file name parsing.

You first need to set up the path to be parsed using either a TParse, TParsePtr or TParsePtrC object.

The interrogation and extraction functions in this class allow you to test whether a component has been specified in the pathname, and if so, to extract it. If a component is not present in the pathname, the extraction function returns an empty string.

This class also allows directories to be added to, and popped from the path.

Notes:

1. the filename modification functions cannot be used by the TParsePtrC class.

2. navigation using .. and . is not supported.

TParse

TParsePtr

TParsePtrC

Nested Classes and Structures

Public Member Functions
TParseBase()
IMPORT_C TIntAddDir(const TDesC &)
IMPORT_C TPtrCDrive()
IMPORT_C TPtrCDriveAndPath()
IMPORT_C TBoolDrivePresent()
IMPORT_C TPtrCExt()
IMPORT_C TBoolExtPresent()
IMPORT_C const TDesC &FullName()
IMPORT_C TBoolIsExtWild()
IMPORT_C TBoolIsKMatchAny()
IMPORT_C TBoolIsKMatchOne()
IMPORT_C TBoolIsNameWild()
IMPORT_C TBoolIsRoot()
IMPORT_C TBoolIsWild()
IMPORT_C TPtrCName()
IMPORT_C TPtrCNameAndExt()
IMPORT_C TBoolNameOrExtPresent()
IMPORT_C TBoolNamePresent()
IMPORT_C TPtrCPath()
IMPORT_C TBoolPathPresent()
IMPORT_C TIntPopDir()
Protected Member Functions
TDes &NameBuf()
const TDesC &NameBufC()
TInt Set(const TDesC *, const TDesC *, const TDesC *, TBool)
Private Member Functions
TInt ParseDrive(TLex &, TBool &)
TInt ParseExt(TLex &, TBool &)
TInt ParseName(TLex &, TBool &)
TInt ParsePath(TLex &, TBool &)
Private Member Enumerations
enumTField { EDrive, EPath, EName, EExt, EMaxFields }
enumTWild {
EWildName = 0x01, EWildExt = 0x02, EWildEither = 0x04, EIsRoot = 0x08, EWildIsKMatchOne = 0x10, EWildIsKMatchAny = 0x20
}
Protected Attributes
TInt16 iMod
Private Attributes
SField iField
TInt16 iWild

Constructor & Destructor Documentation

TParseBase()

IMPORT_CTParseBase()

Member Functions Documentation

AddDir(const TDesC &)

IMPORT_C TIntAddDir(const TDesC &aName)

Parameters

const TDesC & aName

Drive()

IMPORT_C TPtrCDrive()const

DriveAndPath()

IMPORT_C TPtrCDriveAndPath()const

DrivePresent()

IMPORT_C TBoolDrivePresent()const

Ext()

IMPORT_C TPtrCExt()const

ExtPresent()

IMPORT_C TBoolExtPresent()const

FullName()

IMPORT_C const TDesC &FullName()const

IsExtWild()

IMPORT_C TBoolIsExtWild()const

IsKMatchAny()

IMPORT_C TBoolIsKMatchAny()const

IsKMatchOne()

IMPORT_C TBoolIsKMatchOne()const

IsNameWild()

IMPORT_C TBoolIsNameWild()const

IsRoot()

IMPORT_C TBoolIsRoot()const

IsWild()

IMPORT_C TBoolIsWild()const

Name()

IMPORT_C TPtrCName()const

NameAndExt()

IMPORT_C TPtrCNameAndExt()const

NameBuf()

TDes &NameBuf()[protected, pure virtual]

NameBufC()

const TDesC &NameBufC()const [protected, pure virtual]

NameOrExtPresent()

IMPORT_C TBoolNameOrExtPresent()const

NamePresent()

IMPORT_C TBoolNamePresent()const

ParseDrive(TLex &, TBool &)

TInt ParseDrive(TLex &aName,
TBool &aDone
)[private]

Parameters

TLex & aName
TBool & aDone

ParseExt(TLex &, TBool &)

TInt ParseExt(TLex &aName,
TBool &aDone
)[private]

Parameters

TLex & aName
TBool & aDone

ParseName(TLex &, TBool &)

TInt ParseName(TLex &aName,
TBool &aDone
)[private]

Parameters

TLex & aName
TBool & aDone

ParsePath(TLex &, TBool &)

TInt ParsePath(TLex &aName,
TBool &aDone
)[private]

Parameters

TLex & aName
TBool & aDone

Path()

IMPORT_C TPtrCPath()const

PathPresent()

IMPORT_C TBoolPathPresent()const

PopDir()

IMPORT_C TIntPopDir()

Set(const TDesC *, const TDesC *, const TDesC *, TBool)

TInt Set(const TDesC *aName,
const TDesC *aRelated,
const TDesC *aDefault,
TBoolallowWild
)[protected]

Parameters

const TDesC * aName
const TDesC * aRelated
const TDesC * aDefault
TBool allowWild

Member Enumerations Documentation

Enum TField

Enumerators

EDrive
EPath
EName
EExt
EMaxFields

Enum TWild

Enumerators

EWildName = 0x01
EWildExt = 0x02
EWildEither = 0x04
EIsRoot = 0x08
EWildIsKMatchOne = 0x10
EWildIsKMatchAny = 0x20

Member Data Documentation

SField iField

SField iField[private]

TInt16 iMod

TInt16 iMod[protected]

TInt16 iWild

TInt16 iWild[private]