|
@@ -30,11 +30,6 @@ Type TStringMap
|
|
about: Removes all keys and values.
|
|
about: Removes all keys and values.
|
|
End Rem
|
|
End Rem
|
|
Method Clear()
|
|
Method Clear()
|
|
-?ngcmod
|
|
|
|
- If Not IsEmpty() Then
|
|
|
|
- _modCount :+ 1
|
|
|
|
- End If
|
|
|
|
-?
|
|
|
|
bmx_map_stringmap_clear(Varptr _root)
|
|
bmx_map_stringmap_clear(Varptr _root)
|
|
End Method
|
|
End Method
|
|
|
|
|
|
@@ -51,10 +46,8 @@ Type TStringMap
|
|
about: If the map already contains @key, its value is overwritten with @value.
|
|
about: If the map already contains @key, its value is overwritten with @value.
|
|
End Rem
|
|
End Rem
|
|
Method Insert( key:String,value:Object )
|
|
Method Insert( key:String,value:Object )
|
|
|
|
+ key.Hash()
|
|
bmx_map_stringmap_insert(key, value, Varptr _root)
|
|
bmx_map_stringmap_insert(key, value, Varptr _root)
|
|
-?ngcmod
|
|
|
|
- _modCount :+ 1
|
|
|
|
-?
|
|
|
|
End Method
|
|
End Method
|
|
|
|
|
|
Rem
|
|
Rem
|
|
@@ -62,6 +55,7 @@ Type TStringMap
|
|
returns: #True if the map contains @key.
|
|
returns: #True if the map contains @key.
|
|
End Rem
|
|
End Rem
|
|
Method Contains:Int( key:String )
|
|
Method Contains:Int( key:String )
|
|
|
|
+ key.Hash()
|
|
Return bmx_map_stringmap_contains(key, Varptr _root)
|
|
Return bmx_map_stringmap_contains(key, Varptr _root)
|
|
End Method
|
|
End Method
|
|
|
|
|
|
@@ -71,6 +65,7 @@ Type TStringMap
|
|
about: If the map does not contain @key, a #Null object is returned.
|
|
about: If the map does not contain @key, a #Null object is returned.
|
|
End Rem
|
|
End Rem
|
|
Method ValueForKey:Object( key:String )
|
|
Method ValueForKey:Object( key:String )
|
|
|
|
+ key.Hash()
|
|
Return bmx_map_stringmap_valueforkey(key, Varptr _root)
|
|
Return bmx_map_stringmap_valueforkey(key, Varptr _root)
|
|
End Method
|
|
End Method
|
|
|
|
|
|
@@ -79,9 +74,7 @@ Type TStringMap
|
|
returns: #True if @key was removed, or #False otherwise.
|
|
returns: #True if @key was removed, or #False otherwise.
|
|
End Rem
|
|
End Rem
|
|
Method Remove:Int( key:String )
|
|
Method Remove:Int( key:String )
|
|
-?ngcmod
|
|
|
|
- _modCount :+ 1
|
|
|
|
-?
|
|
|
|
|
|
+ key.Hash()
|
|
Return bmx_map_stringmap_remove(key, Varptr _root)
|
|
Return bmx_map_stringmap_remove(key, Varptr _root)
|
|
End Method
|
|
End Method
|
|
|
|
|
|
@@ -111,9 +104,6 @@ Type TStringMap
|
|
Local mapenum:TStringMapEnumerator=New TStringMapEnumerator
|
|
Local mapenum:TStringMapEnumerator=New TStringMapEnumerator
|
|
mapenum._enumerator=nodeenum
|
|
mapenum._enumerator=nodeenum
|
|
nodeenum._map = Self
|
|
nodeenum._map = Self
|
|
-?ngcmod
|
|
|
|
- nodeenum._expectedModCount = _modCount
|
|
|
|
-?
|
|
|
|
Return mapenum
|
|
Return mapenum
|
|
End Method
|
|
End Method
|
|
|
|
|
|
@@ -133,9 +123,6 @@ Type TStringMap
|
|
Local mapenum:TStringMapEnumerator=New TStringMapEnumerator
|
|
Local mapenum:TStringMapEnumerator=New TStringMapEnumerator
|
|
mapenum._enumerator=nodeenum
|
|
mapenum._enumerator=nodeenum
|
|
nodeenum._map = Self
|
|
nodeenum._map = Self
|
|
-?ngcmod
|
|
|
|
- nodeenum._expectedModCount = _modCount
|
|
|
|
-?
|
|
|
|
Return mapenum
|
|
Return mapenum
|
|
End Method
|
|
End Method
|
|
|
|
|
|
@@ -183,10 +170,6 @@ Type TStringMap
|
|
|
|
|
|
Field _root:Byte Ptr
|
|
Field _root:Byte Ptr
|
|
|
|
|
|
-?ngcmod
|
|
|
|
- Field _modCount:Int
|
|
|
|
-?
|
|
|
|
-
|
|
|
|
End Type
|
|
End Type
|
|
|
|
|
|
Type TStringNode
|
|
Type TStringNode
|
|
@@ -227,9 +210,6 @@ Type TStringNodeEnumerator
|
|
End Method
|
|
End Method
|
|
|
|
|
|
Method NextObject:Object()
|
|
Method NextObject:Object()
|
|
-?ngcmod
|
|
|
|
- Assert _expectedModCount = _map._modCount, "TStringMap Concurrent Modification"
|
|
|
|
-?
|
|
|
|
Local node:TStringNode=_node
|
|
Local node:TStringNode=_node
|
|
_node=_node.NextNode()
|
|
_node=_node.NextNode()
|
|
Return node
|
|
Return node
|
|
@@ -240,16 +220,10 @@ Type TStringNodeEnumerator
|
|
Field _node:TStringNode
|
|
Field _node:TStringNode
|
|
|
|
|
|
Field _map:TStringMap
|
|
Field _map:TStringMap
|
|
-?ngcmod
|
|
|
|
- Field _expectedModCount:Int
|
|
|
|
-?
|
|
|
|
End Type
|
|
End Type
|
|
|
|
|
|
Type TStringKeyEnumerator Extends TStringNodeEnumerator
|
|
Type TStringKeyEnumerator Extends TStringNodeEnumerator
|
|
Method NextObject:Object() Override
|
|
Method NextObject:Object() Override
|
|
-?ngcmod
|
|
|
|
- Assert _expectedModCount = _map._modCount, "TStringMap Concurrent Modification"
|
|
|
|
-?
|
|
|
|
Local node:TStringNode=_node
|
|
Local node:TStringNode=_node
|
|
_node=_node.NextNode()
|
|
_node=_node.NextNode()
|
|
Return node.Key()
|
|
Return node.Key()
|
|
@@ -258,9 +232,6 @@ End Type
|
|
|
|
|
|
Type TStringValueEnumerator Extends TStringNodeEnumerator
|
|
Type TStringValueEnumerator Extends TStringNodeEnumerator
|
|
Method NextObject:Object() Override
|
|
Method NextObject:Object() Override
|
|
-?ngcmod
|
|
|
|
- Assert _expectedModCount = _map._modCount, "TStringMap Concurrent Modification"
|
|
|
|
-?
|
|
|
|
Local node:TStringNode=_node
|
|
Local node:TStringNode=_node
|
|
_node=_node.NextNode()
|
|
_node=_node.NextNode()
|
|
Return node.Value()
|
|
Return node.Value()
|