<?xml version="1.0"?>
<!DOCTYPE logtalk SYSTEM "logtalk.dtd">
<?xml-stylesheet type="text/xsl" href="lgtxml.xsl"?>
<logtalk>
<entity>
<name><![CDATA[dictionaryp]]></name>
<type>protocol</type>
<compilation>static</compilation>
<comment><![CDATA[Dictionary protocol.]]></comment>
<authors><![CDATA[Paulo Moura]]></authors>
<version>1.0</version>
<date>2000/7/24</date>
</entity>
<relations>
</relations>
<predicates>
<public>
<predicate>
<name><![CDATA[as_dictionary/2]]></name>
<scope>public</scope>
<compilation>static</compilation>
<mode>
<template><![CDATA[as_dictionary(@list,-dictionary)]]></template>
<solutions>one</solutions>
</mode>
<comment><![CDATA[Converts a list of key-value pairs to a dictionary.]]></comment>
<template><![CDATA[as_dictionary(List,Dictionary)]]></template>
</predicate>
<predicate>
<name><![CDATA[as_list/2]]></name>
<scope>public</scope>
<compilation>static</compilation>
<mode>
<template><![CDATA[as_list(@dictionary,-list)]]></template>
<solutions>one</solutions>
</mode>
<comment><![CDATA[Converts a dictionary to a list of key-value pairs.]]></comment>
<template><![CDATA[as_list(Dictionary,List)]]></template>
</predicate>
<predicate>
<name><![CDATA[delete/4]]></name>
<scope>public</scope>
<compilation>static</compilation>
<mode>
<template><![CDATA[delete(+dictionary,@ground,?term,-dictionary)]]></template>
<solutions>zero_or_one</solutions>
</mode>
<comment><![CDATA[Deletes a matching Key-Value pair from a dictionary, returning the updated dictionary.]]></comment>
<template><![CDATA[delete(Dictionary_in,Key,Value,Dictionary_out)]]></template>
</predicate>
<predicate>
<name><![CDATA[empty/1]]></name>
<scope>public</scope>
<compilation>static</compilation>
<mode>
<template><![CDATA[empty(@dictionary)]]></template>
<solutions>zero_or_one</solutions>
</mode>
<comment><![CDATA[True if the dictionary is empty.]]></comment>
<template><![CDATA[empty(Dictionary)]]></template>
</predicate>
<predicate>
<name><![CDATA[insert/4]]></name>
<scope>public</scope>
<compilation>static</compilation>
<mode>
<template><![CDATA[insert(+ground,@term,+dictionary,-dictionary)]]></template>
<solutions>one</solutions>
</mode>
<comment><![CDATA[Inserts a Key-Value pair into a dictionary, returning the updated dictionary.]]></comment>
<template><![CDATA[insert(Key,Value,Dictionary_in,Dictionary_out)]]></template>
</predicate>
<predicate>
<name><![CDATA[insert_all/3]]></name>
<scope>public</scope>
<compilation>static</compilation>
<mode>
<template><![CDATA[insert_all(@list,+dictionary,-dictionary)]]></template>
<solutions>one</solutions>
</mode>
<comment><![CDATA[Inserts a list of Key-Value pairs into a dictionary, returning the updated dictionary.]]></comment>
<template><![CDATA[insert_all(List,Dictionary_in,Dictionary_out)]]></template>
</predicate>
<predicate>
<name><![CDATA[lookup/3]]></name>
<scope>public</scope>
<compilation>static</compilation>
<mode>
<template><![CDATA[lookup(+ground,?term,@dictionary)]]></template>
<solutions>zero_or_one</solutions>
</mode>
<mode>
<template><![CDATA[lookup(-ground,?term,@dictionary)]]></template>
<solutions>zero_or_more</solutions>
</mode>
<comment><![CDATA[Get a matching Key-Value pair from a dictionary.]]></comment>
<template><![CDATA[lookup(Key,Value,Dictionary)]]></template>
</predicate>
<predicate>
<name><![CDATA[keys/2]]></name>
<scope>public</scope>
<compilation>static</compilation>
<mode>
<template><![CDATA[keys(@dictionary,-list)]]></template>
<solutions>one</solutions>
</mode>
<comment><![CDATA[Returns a list with all dictionary keys.]]></comment>
<template><![CDATA[keys(Dictionary,List)]]></template>
</predicate>
<predicate>
<name><![CDATA[map/3]]></name>
<scope>public</scope>
<compilation>static</compilation>
<mode>
<template><![CDATA[map(+functor,+dictionary,-dictionary)]]></template>
<solutions>zero_or_one</solutions>
</mode>
<comment><![CDATA[Maps a binary predicate over each dictionary key-value pair returning a new pair.]]></comment>
<template><![CDATA[map(Functor,In,Out)]]></template>
</predicate>
<predicate>
<name><![CDATA[size/2]]></name>
<scope>public</scope>
<compilation>static</compilation>
<mode>
<template><![CDATA[size(@dictionary,?integer)]]></template>
<solutions>zero_or_one</solutions>
</mode>
<comment><![CDATA[Number of dictionary entries.]]></comment>
<template><![CDATA[size(Dictionary,Size)]]></template>
</predicate>
</public>
<protected>
</protected>
<private>
</private>
</predicates>
</logtalk>
