USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::ID Class Reference
[Utility]

#include <ID.h>

Collaboration diagram for Isis::ID:

Collaboration graph
[legend]
List of all members.

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

For internal use only.

Definition at line 44 of file ID.h.

Public Member Functions

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

Private Attributes

std::string p_namebase
int p_current
int p_numLength
int p_numStart


Constructor & Destructor Documentation

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

Creates an ID object.

Parameters:
name The string to be a base for the serial IDs
basenum The number to start the count at. Defaults to one.

Definition at line 33 of file ID.cpp.

References _FILEINFO_, Isis::iException::Message(), p_current, p_namebase, p_numLength, p_numStart, and sub().

Isis::ID::~ID (  ) 

Deconstructor.

Definition at line 56 of file ID.cpp.


Member Function Documentation

std::string Isis::ID::Next (  ) 

Returns the next ID in the sequence.

Returns:
std::string The next ID in the sequence

Definition at line 64 of file ID.cpp.

References _FILEINFO_, Isis::iException::Message(), p_current, p_namebase, p_numLength, and p_numStart.


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