summaryrefslogtreecommitdiff
path: root/idl/inc/hash.hxx
diff options
context:
space:
mode:
authorMikhail Voytenko <mav@openoffice.org>2010-11-03 15:49:08 +0100
committerMikhail Voytenko <mav@openoffice.org>2010-11-03 15:49:08 +0100
commit01b3628d420ed30b5c61376f4f5fcb491a5aa0a1 (patch)
tree6edfdb698c1f719b738f6193b41522cded102e23 /idl/inc/hash.hxx
parent34dd33af79caf3a13ec3a4e7098616ac0b16cf50 (diff)
removetooltypes01: #i112600# remove tooltypes from idl, and other small changes
Diffstat (limited to 'idl/inc/hash.hxx')
-rw-r--r--idl/inc/hash.hxx60
1 files changed, 30 insertions, 30 deletions
diff --git a/idl/inc/hash.hxx b/idl/inc/hash.hxx
index 2749181d5966..4e25ebd98ca9 100644
--- a/idl/inc/hash.hxx
+++ b/idl/inc/hash.hxx
@@ -36,24 +36,24 @@
/****************** H a s h - T a b l e **********************************/
class SvHashTable
{
- UINT32 nMax; // size of hash-tabel
- UINT32 nFill; // elements in hash-tabel
- UINT32 lAsk; // Anzahl der Anfragen
- UINT32 lTry; // Anzahl der Versuche
+ sal_uInt32 nMax; // size of hash-tabel
+ sal_uInt32 nFill; // elements in hash-tabel
+ sal_uInt32 lAsk; // Anzahl der Anfragen
+ sal_uInt32 lTry; // Anzahl der Versuche
protected:
- BOOL Test_Insert( const void *, BOOL bInsert, UINT32 * pInsertPos );
+ sal_Bool Test_Insert( const void *, sal_Bool bInsert, sal_uInt32 * pInsertPos );
// compare element with entry
- virtual StringCompare Compare( const void * , UINT32 ) const = 0;
+ virtual StringCompare Compare( const void * , sal_uInt32 ) const = 0;
// get hash value from subclass
- virtual UINT32 HashFunc( const void * ) const = 0;
+ virtual sal_uInt32 HashFunc( const void * ) const = 0;
public:
- SvHashTable( UINT32 nMaxEntries );
+ SvHashTable( sal_uInt32 nMaxEntries );
virtual ~SvHashTable();
- UINT32 GetMax() const { return nMax; }
+ sal_uInt32 GetMax() const { return nMax; }
- virtual BOOL IsEntry( UINT32 ) const = 0;
+ virtual sal_Bool IsEntry( sal_uInt32 ) const = 0;
};
/************** S t r i n g H a s h T a b l e E n t r y ******************/
@@ -62,28 +62,28 @@ class SvStringHashEntry : public SvRefBase
{
friend class SvStringHashTable;
ByteString aName;
- UINT32 nHashId;
- ULONG nValue;
- BOOL bHasId;
+ sal_uInt32 nHashId;
+ sal_uIntPtr nValue;
+ sal_Bool bHasId;
public:
- SvStringHashEntry() : bHasId( FALSE ) {;}
- SvStringHashEntry( const ByteString & rName, UINT32 nIdx )
+ SvStringHashEntry() : bHasId( sal_False ) {;}
+ SvStringHashEntry( const ByteString & rName, sal_uInt32 nIdx )
: aName( rName )
, nHashId( nIdx )
, nValue( 0 )
- , bHasId( TRUE ) {}
+ , bHasId( sal_True ) {}
~SvStringHashEntry();
const ByteString & GetName() const { return aName; }
- BOOL HasId() const { return bHasId; }
- UINT32 GetId() const { return nHashId; }
+ sal_Bool HasId() const { return bHasId; }
+ sal_uInt32 GetId() const { return nHashId; }
- void SetValue( ULONG n ) { nValue = n; }
- ULONG GetValue() const { return nValue; }
+ void SetValue( sal_uIntPtr n ) { nValue = n; }
+ sal_uIntPtr GetValue() const { return nValue; }
- BOOL operator == ( const SvStringHashEntry & rRef )
+ sal_Bool operator == ( const SvStringHashEntry & rRef )
{ return nHashId == rRef.nHashId; }
- BOOL operator != ( const SvStringHashEntry & rRef )
+ sal_Bool operator != ( const SvStringHashEntry & rRef )
{ return ! operator == ( rRef ); }
SvStringHashEntry & operator = ( const SvStringHashEntry & rRef )
{ SvRefBase::operator=( rRef );
@@ -104,19 +104,19 @@ class SvStringHashTable : public SvHashTable
{
SvStringHashEntry * pEntries;
protected:
- virtual UINT32 HashFunc( const void * pElement ) const;
- virtual StringCompare Compare( const void * pElement, UINT32 nIndex ) const;
+ virtual sal_uInt32 HashFunc( const void * pElement ) const;
+ virtual StringCompare Compare( const void * pElement, sal_uInt32 nIndex ) const;
public:
- SvStringHashTable( UINT32 nMaxEntries ); // max size of hash-tabel
+ SvStringHashTable( sal_uInt32 nMaxEntries ); // max size of hash-tabel
virtual ~SvStringHashTable();
ByteString GetNearString( const ByteString & rName ) const;
- virtual BOOL IsEntry( UINT32 nIndex ) const;
+ virtual sal_Bool IsEntry( sal_uInt32 nIndex ) const;
- BOOL Insert( const ByteString & rStr, UINT32 * pHash ); // insert string
- BOOL Test( const ByteString & rStr, UINT32 * pHash ) const; // test of insert string
- SvStringHashEntry * Get ( UINT32 nIndex ) const; // return pointer to string
- SvStringHashEntry & operator []( UINT32 nPos ) const
+ sal_Bool Insert( const ByteString & rStr, sal_uInt32 * pHash ); // insert string
+ sal_Bool Test( const ByteString & rStr, sal_uInt32 * pHash ) const; // test of insert string
+ SvStringHashEntry * Get ( sal_uInt32 nIndex ) const; // return pointer to string
+ SvStringHashEntry & operator []( sal_uInt32 nPos ) const
{ return pEntries[ nPos ]; }
void FillHashList( SvStringHashList * rList ) const;