IProfile::Cursor

The IProfile::Cursor class creates and manages the cursor for an IProfile object. IProfile uses this cursor to iterate through the application names or keys in a profile. In the same way that you can use a cursor to iterate through the objects in a collection, you can use this cursor to iterate through a profile one item at a time.


IProfile::Cursor - Member Functions and Data by Group

Constructors & Destructor

Use these members to construct and destruct objects of this nested class. You can construct objects of this class by using a reference to the profile, or a reference to the profile data and an application name.


[view class]
~Cursor
public:
virtual ~Cursor()

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
Cursor

Note: The cursor object is invalidated for the current state of application names or key names in the profile data set.


Overload 1
public:
Cursor(IProfile& profile, const char* applName)

profile
Reference to the profile object.
applName
Pointer to an application name.

You can construct an object of this class by using a reference to the profile and an application name. Use this constructor to create a cursor to iterate through the keys.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Overload 2
public:
Cursor(IProfile& profile)

profile
Reference to the profile object.

You can construct an object of this class by using a reference to the profile. Use this constructor to create a cursor to iterate through the application names.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


Profile Iteration

Use these members to iterate through the application names or keys in a profile.


[view class]
invalidate
public:
virtual void invalidate()

Marks the cursor as invalid.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
isValid
public:
virtual bool isValid(bool checkFile = false) const

Determines if the cursor is still valid. If the cursor is valid, true is returned. If the parameter, checkFile, is set to true, this function checks to see if the data set's application and key information has been changed by another application while your application still has the data set open.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes

AIX Considerations

AIX does not support checkFile.

OS/2 Considerations

If checkFile is set to true, this function determines whether the file application and key information have been changed by another application while your application still has them open.


[view class]
setToFirst
public:
virtual bool setToFirst()

Sets the cursor's position to the first application or key.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setToLast
public:
virtual bool setToLast()

Sets the cursor's position to the last application or key.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setToNext
public:
virtual bool setToNext()

Sets the cursor's position to the next application or key.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


[view class]
setToPrevious
public:
virtual bool setToPrevious()

Set the cursor's position to the previous application or key.

Supported Platforms

Windows OS/2 AIX
Yes Yes Yes


IProfile::Cursor - Inherited Member Functions and Data

Inherited Public Functions

Inherited Public Data

Inherited Protected Functions

Inherited Protected Data