C# Class Smrf.NodeXL.Core.IDGenerator

Generates a sequence of unique IDs.
Call GetNextID to get a unique integer ID. By default, generates a simple integer sequence that starts at 1.

This class can be used to generate unique IDs for graphs, vertices, and edges. The class responsible for creating objects of one of these types should define a static field of type IDGenerator, then call GetNextID every time an object of that type is created. This results in independent sequences for each type.

Inheritance: NodeXLBase
ファイルを表示 Open project: 2014-sed-team3/term-project Class Usage Examples

Protected Properties

Property Type Description
m_iNextID System.Int32

Public Methods

Method Description
AssertValid ( ) : void
GetNextID ( ) : Int32
IDGenerator ( ) : System

Initializes a new instance of the IDGenerator class with a first ID of 1.

IDGenerator ( Int32 firstID ) : System

Initializes a new instance of the IDGenerator class with a specified first ID.

Method Details

AssertValid() public method

public AssertValid ( ) : void
return void

GetNextID() public method

public GetNextID ( ) : Int32
return System.Int32

IDGenerator() public method

Initializes a new instance of the IDGenerator class with a first ID of 1.
public IDGenerator ( ) : System
return System

IDGenerator() public method

Initializes a new instance of the IDGenerator class with a specified first ID.
public IDGenerator ( Int32 firstID ) : System
firstID System.Int32 /// First ID to return from . Can't be . ///
return System

Property Details

m_iNextID protected_oe property

protected Int32,System m_iNextID
return System.Int32