.\" Copyright (C) 2001 Information-technology Promotion Agency (IPA)
.\" Copyright (C) 2001-2011
.\" National Institute of Advanced Industrial Science and Technology (AIST)
.\" This file is part of the m17n library documentation.
.\" Permission is granted to copy, distribute and/or modify this document
.\" under the terms of the GNU Free Documentation License, Version 1.2 or
.\" any later version published by the Free Software Foundation; with no
.\" Invariant Section, no Front-Cover Texts,
.\" and no Back-Cover Texts. A copy of the license is included in the
.\" appendix entitled "GNU Free Documentation License".
.TH "m17nPlist" 3m17n "Mon Sep 25 2023" "Version 1.8.4" "The m17n Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
m17nPlist \- Property List
.SH SYNOPSIS
.br
.PP
.SS "Functions"
.in +1c
.ti -1c
.RI "\fBMPlist\fP * \fBmplist_deserialize\fP (\fBMText\fP *mt)"
.br
.RI "Generate a property list by deserializing an M-text\&. "
.ti -1c
.RI "\fBMPlist\fP * \fBmplist\fP (void)"
.br
.RI "Create a property list object\&. "
.ti -1c
.RI "\fBMPlist\fP * \fBmplist_copy\fP (\fBMPlist\fP *plist)"
.br
.RI "Copy a property list\&. "
.ti -1c
.RI "\fBMPlist\fP * \fBmplist_put\fP (\fBMPlist\fP *plist, MSymbol key, void *val)"
.br
.RI "Set the value of a property in a property list\&. "
.ti -1c
.RI "void * \fBmplist_get\fP (\fBMPlist\fP *plist, MSymbol key)"
.br
.RI "Get the value of a property in a property list\&. "
.ti -1c
.RI "\fBMPlist\fP * \fBmplist_put_func\fP (\fBMPlist\fP *plist, MSymbol key, \fBM17NFunc\fP func)"
.br
.RI "Set the value (function pointer) of a property in a property list\&. "
.ti -1c
.RI "\fBM17NFunc\fP \fBmplist_get_func\fP (\fBMPlist\fP *plist, MSymbol key)"
.br
.RI "Get the value (function pointer) of a property in a property list\&. "
.ti -1c
.RI "\fBMPlist\fP * \fBmplist_add\fP (\fBMPlist\fP *plist, MSymbol key, void *val)"
.br
.RI "Add a property at the end of a property list\&. "
.ti -1c
.RI "\fBMPlist\fP * \fBmplist_push\fP (\fBMPlist\fP *plist, MSymbol key, void *val)"
.br
.RI "Add a property at the beginning of a property list\&. "
.ti -1c
.RI "void * \fBmplist_pop\fP (\fBMPlist\fP *plist)"
.br
.RI "Remove a property at the beginning of a property list\&. "
.ti -1c
.RI "\fBMPlist\fP * \fBmplist_find_by_key\fP (\fBMPlist\fP *plist, MSymbol key)"
.br
.RI "Find a property of a specific key in a property list\&. "
.ti -1c
.RI "\fBMPlist\fP * \fBmplist_find_by_value\fP (\fBMPlist\fP *plist, void *val)"
.br
.RI "Find a property of a specific value in a property list\&. "
.ti -1c
.RI "\fBMPlist\fP * \fBmplist_next\fP (\fBMPlist\fP *plist)"
.br
.RI "Return the next sublist of a property list\&. "
.ti -1c
.RI "\fBMPlist\fP * \fBmplist_set\fP (\fBMPlist\fP *plist, MSymbol key, void *val)"
.br
.RI "Set the first property in a property list\&. "
.ti -1c
.RI "int \fBmplist_length\fP (\fBMPlist\fP *plist)"
.br
.RI "Return the length of a property list\&. "
.ti -1c
.RI "MSymbol \fBmplist_key\fP (\fBMPlist\fP *plist)"
.br
.RI "Return the key of the first property in a property list\&. "
.ti -1c
.RI "void * \fBmplist_value\fP (\fBMPlist\fP *plist)"
.br
.RI "Return the value of the first property in a property list\&. "
.in -1c
.SS "Variables"
.in +1c
.ti -1c
.RI "MSymbol \fBMinteger\fP"
.br
.RI "Symbol whose name is 'integer'\&. "
.ti -1c
.RI "MSymbol \fBMplist\fP"
.br
.RI "Symbol whose name is 'plist'\&. "
.ti -1c
.RI "MSymbol \fBMtext\fP"
.br
.RI "Symbol whose name is 'mtext'\&. "
.in -1c
.SH "Detailed Description"
.PP
.PP
.nf
@addtogroup m17nPlist
@brief Property List objects and API for them.
A @e property @e list (or @e plist for short) is a list of zero or
more properties. A property consists of a @e key and a @e value,
where key is a symbol and value is anything that can be cast to
(void *).
If the key of a property is a @e managing @e key, its @e value is
a @e managed @e object. A property list itself is a managed
objects.
If each key of a plist is one of #Msymbol, #Mtext, #Minteger, and
#Mplist, the plist is called as @e well\-formed and represented by
the following notation in the documentation.
.fi
.PP
.PP
.nf
PLIST ::= '(' ELEMENT * ')'
ELEMENT ::= INTEGER | SYMBOL | M\-TEXT | PLIST
M\-TEXT ::= '"' text data ... '"'
.fi
.PP
.PP
.nf
For instance, if a plist has four elements; integer \-20, symbol of
name "sym", M\-text of contents "abc", and plist of integer 10 and
symbol of name "another\-symbol", it is represented as this:
(\-20 sym "abc" (10 another\-symbol))
.fi
.PP
.SH "Variable Documentation"
.PP
.SS "MSymbol Minteger"
.PP
Symbol whose name is 'integer'\&. The symbol \fCMinteger\fP has the name \fC'integer'\fP\&. The value of a property whose key is \fCMinteger\fP must be an integer\&.
.br
.SS "MSymbol Mplist"
.PP
Symbol whose name is 'plist'\&. The symbol \fCMplist\fP has the name \fC'plist'\fP\&. It is a managing key\&. A value of a property whose key is \fCMplist\fP must be a plist\&.
.br
.SS "MSymbol Mtext"
.PP
Symbol whose name is 'mtext'\&. The symbol \fCMtext\fP has the name \fC'mtext'\fP\&. It is a managing key\&. A value of a property whose key is \fCMtext\fP must be an M\-text\&.
.br
.SH "Author"
.PP
Generated automatically by Doxygen for The m17n Library from the source code\&.
.SH COPYRIGHT
Copyright (C) 2001 Information\-technology Promotion Agency (IPA)
.br
Copyright (C) 2001\-2011 National Institute of Advanced Industrial Science and Technology (AIST)
.br
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License
.