UT_UniqueId Class Reference

#include <ut_misc.h>

List of all members.

Public Types

enum  idType {
  List = 0, Footnote, Endnote, Annotation,
  HeaderFtr, Image, Math, Embed,
  _Last
}

Public Member Functions

 UT_UniqueId ()
 ~UT_UniqueId ()
UT_uint32 getUID (idType t)
bool setMinId (idType t, UT_uint32 iMin)
bool isIdUnique (idType t, UT_uint32 iId)

Private Attributes

UT_uint32 m_iID [(UT_uint32) _Last]


Member Enumeration Documentation

Enumerator:
List 
Footnote 
Endnote 
Annotation 
HeaderFtr 
Image 
Math 
Embed 
_Last 


Constructor & Destructor Documentation

UT_UniqueId::UT_UniqueId (  ) 

References AUTO_LIST_RESERVED, List, and m_iID.

UT_UniqueId::~UT_UniqueId (  )  [inline]


Member Function Documentation

UT_uint32 UT_UniqueId::getUID ( idType  t  ) 

returns unique id (0 <= id < UT_UID_INVALID) of given type or UT_UID_INVALID on failure

References _Last, m_iID, UT_return_val_if_fail, and UT_UID_INVALID.

bool UT_UniqueId::setMinId ( idType  t,
UT_uint32  iMin 
)

sets the minimum id to be returned by subsequent calls to getUID() to iMin and returns true on success; returns false if it fails (either because unknown type is specified or because the value of iMin is too high)

References _Last, m_iID, and UT_return_val_if_fail.

bool UT_UniqueId::isIdUnique ( idType  t,
UT_uint32  iId 
)

returns true of iId can be used as a unique identifier of a type t; before using iId, THE CALLER MUST CALL setMinId(t, iId+1) !!!

References _Last, m_iID, and UT_return_val_if_fail.


Member Data Documentation


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

Generated on Sat Nov 22 00:07:13 2008 for AbiWord by  doxygen 1.5.5