Open CASCADE Technology  7.7.0
Public Member Functions
Aspect_GenId Class Reference

This class permits the creation and control of integer identifiers. More...

#include <Aspect_GenId.hxx>

Public Member Functions

 Aspect_GenId ()
 Creates an available set of identifiers with the lower bound 0 and the upper bound INT_MAX / 2. More...
 
 Aspect_GenId (const Standard_Integer theLow, const Standard_Integer theUpper)
 Creates an available set of identifiers with specified range. Raises IdentDefinitionError if theUpper is less than theLow. More...
 
void Free ()
 Free all identifiers - make the whole range available again. More...
 
void Free (const Standard_Integer theId)
 Free specified identifier. Warning - method has no protection against double-freeing! More...
 
Standard_Boolean HasFree () const
 Returns true if there are available identifiers in range. More...
 
Standard_Integer Available () const
 Returns the number of available identifiers. More...
 
Standard_Integer Lower () const
 Returns the lower identifier in range. More...
 
Standard_Integer Next ()
 Returns the next available identifier. Warning: Raises IdentDefinitionError if all identifiers are busy. More...
 
Standard_Boolean Next (Standard_Integer &theId)
 Generates the next available identifier. More...
 
Standard_Integer Upper () const
 Returns the upper identifier in range. More...
 
void DumpJson (Standard_OStream &theOStream, Standard_Integer theDepth=-1) const
 Dumps the content of me into the stream. More...
 

Detailed Description

This class permits the creation and control of integer identifiers.

Constructor & Destructor Documentation

◆ Aspect_GenId() [1/2]

Aspect_GenId::Aspect_GenId ( )

Creates an available set of identifiers with the lower bound 0 and the upper bound INT_MAX / 2.

◆ Aspect_GenId() [2/2]

Aspect_GenId::Aspect_GenId ( const Standard_Integer  theLow,
const Standard_Integer  theUpper 
)

Creates an available set of identifiers with specified range. Raises IdentDefinitionError if theUpper is less than theLow.

Member Function Documentation

◆ Available()

Standard_Integer Aspect_GenId::Available ( ) const
inline

Returns the number of available identifiers.

◆ DumpJson()

void Aspect_GenId::DumpJson ( Standard_OStream theOStream,
Standard_Integer  theDepth = -1 
) const

Dumps the content of me into the stream.

◆ Free() [1/2]

void Aspect_GenId::Free ( )

Free all identifiers - make the whole range available again.

◆ Free() [2/2]

void Aspect_GenId::Free ( const Standard_Integer  theId)

Free specified identifier. Warning - method has no protection against double-freeing!

◆ HasFree()

Standard_Boolean Aspect_GenId::HasFree ( ) const
inline

Returns true if there are available identifiers in range.

◆ Lower()

Standard_Integer Aspect_GenId::Lower ( void  ) const
inline

Returns the lower identifier in range.

◆ Next() [1/2]

Standard_Integer Aspect_GenId::Next ( )

Returns the next available identifier. Warning: Raises IdentDefinitionError if all identifiers are busy.

◆ Next() [2/2]

Standard_Boolean Aspect_GenId::Next ( Standard_Integer theId)

Generates the next available identifier.

Parameters
theId[out] generated identifier
Returns
FALSE if all identifiers are busy.

◆ Upper()

Standard_Integer Aspect_GenId::Upper ( void  ) const
inline

Returns the upper identifier in range.


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