ImqNamelist

Figure 17. ImqNamelist class

A Booch class diagram showing the ImqNamelist class and its parent class, ImqObject.

This class encapsulates a namelist. It relates to the MQI calls listed in Table 18.

Other relevant classes

ImqObject (see ImqObject)

ImqString (see ImqString)

Object attributes

name count
The number of object names in namelist names. This attribute is read-only.

namelist names
Object names, the number of which is indicated by the name count. This attribute is read-only.

Constructors

ImqNamelist( );
The default constructor.

ImqNamelist( const ImqNamelist & list );
The copy constructor. The ImqObject open status will be false.

ImqNamelist( const char * name);
Sets the ImqObject name to name.

Object methods (public)

void operator = ( const ImqNamelist & list );
Instance data is copied from list, replacing the existing instance data. The ImqObject open status will be false.

ImqBoolean nameCount( MQLONG & count );
Provides a copy of the name count. It returns TRUE if successful.

MQLONG nameCount ( );
Returns the name count without any indication of possible errors.

ImqBoolean namelistName ( const MQLONG index, ImqString & name );
Provides a copy of one the namelist names by zero based index. It returns TRUE if successful.

ImqString namelistName ( const MQLONG index );
Returns one of the namelist names by zero based index without any indication of possible errors.

Reason codes

MQRC_INDEX_ERROR

MQRC_INDEX_NOT_PRESENT



© IBM Corporation 2001. All Rights Reserved