Isis 3 Programmer Reference
Isis::ID Class Reference

Creates sequential IDs. More...

#include <ID.h>

Collaboration diagram for Isis::ID:
Collaboration graph

Public Member Functions

 ID (const QString &name, int basenum=1)
 Creates an ID object.
 
 ~ID ()
 Deconstructor.
 
QString Next ()
 Returns the next ID in the sequence.
 

Private Attributes

QString p_namebase
 
int p_current
 
int p_numLength
 
int p_numStart
 

Detailed Description

Creates sequential IDs.

This class generates IDs in numerical sequence, from an input string. The input must contain one, and only one, series of question marks, which will be replaced with numbers in the generation of IDs. The default start value is 1, but this can be changed.

Author
2006-07-05 Brendan George

Definition at line 27 of file ID.h.

Constructor & Destructor Documentation

◆ ID()

Isis::ID::ID ( const QString & name,
int basenum = 1 )

Creates an ID object.

Parameters
nameThe string to be a base for the serial IDs
basenumThe number to start the count at. Defaults to one.

Definition at line 22 of file ID.cpp.

References Isis::IException::User.

◆ ~ID()

Isis::ID::~ID ( )

Deconstructor.

Definition at line 45 of file ID.cpp.

Member Function Documentation

◆ Next()

QString Isis::ID::Next ( )

Returns the next ID in the sequence.

Returns
QString The next ID in the sequence

Definition at line 53 of file ID.cpp.

References Isis::IException::User.

Member Data Documentation

◆ p_current

int Isis::ID::p_current
private

Definition at line 37 of file ID.h.

◆ p_namebase

QString Isis::ID::p_namebase
private

Definition at line 36 of file ID.h.

◆ p_numLength

int Isis::ID::p_numLength
private

Definition at line 38 of file ID.h.

◆ p_numStart

int Isis::ID::p_numStart
private

Definition at line 39 of file ID.h.


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