Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(amap_t), | intent(in) | :: | this | |||
character(len=*), | intent(in) | :: | kv |
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | idx | ||||
type(key_t), | public | :: | k |
function get_amap_t(this, kv) result(r)
class(amap_t), intent(in) :: this
character(len=*), intent(in) :: kv
type(value_t) :: r
type(key_t) :: k
integer :: idx
k = kv
idx = this%find(k)
if (idx > 0) then
r = this%pairs(idx)%v
else
r = value_t()
end if
end function get_amap_t