Created
December 19, 2015 09:07
-
-
Save androlo/21096d64b41d429852d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract SomeAddressMapper is AddressMapper { | |
IAMap map; | |
function addAddress(address addr) returns (bool had) { | |
return _insert(map, addr, true); | |
} | |
function removeAddress(address addr) returns (bool removed) { | |
return _remove(map, addr); | |
} | |
function removeAllAddresses() returns (uint numRemoved) { | |
return _removeAll(map); | |
} | |
function hasAddress(address addr) constant returns (bool has) { | |
return _hasKey(map, addr); | |
} | |
function getAddressFromIndex(uint index) constant returns (address addr) { | |
return _keyFromIndex(map, index); | |
} | |
function getAddressIndex(address addr) constant returns (int index) { | |
return _keyIndex(map, addr); | |
} | |
function numAddresses() constant returns (uint mapSize) { | |
return _size(map); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment