m17nPlist(3m17n)
π m17nPlist π
okay bestie, welcome to the m17nPlist page, straight out of section 3m17n of The m17n Library docs. it's giving property list, it's giving data structure royalty, and we're gonna go through every single bit of it together. no skimming, no skipping, periodt. π
β¨ NAME β¨
m17nPlist β Property List ποΈ
πΈ SYNOPSIS πΈ
Functions
MPlist * mplist_deserialize (MText *mt)β makes a whole new property list by deserializing an M-text. poof, plist. β¨MPlist * mplist (void)β creates a property list object from scratch. baby plist, fresh out the box. πΌMPlist * mplist_copy (MPlist *plist)β copies a property list. twin energy fr fr. π―MPlist * mplist_put (MPlist *plist, MSymbol key, void *val)β sets the value of a property inside a property list. π―void * mplist_get (MPlist *plist, MSymbol key)β gets the value of a property out of a property list. πMPlist * mplist_put_func (MPlist *plist, MSymbol key, M17NFunc func)β sets the value (a function pointer) of a property in a property list. π§M17NFunc mplist_get_func (MPlist *plist, MSymbol key)β gets the value (a function pointer) of a property in a property list. πMPlist * mplist_add (MPlist *plist, MSymbol key, void *val)β adds a property at the end of a property list. πMPlist * mplist_push (MPlist *plist, MSymbol key, void *val)β adds a property at the beginning of a property list. πvoid * mplist_pop (MPlist *plist)β removes the property at the beginning of a property list. bye bestie πMPlist * mplist_find_by_key (MPlist *plist, MSymbol key)β finds a property with a specific key in a property list. π΅οΈββοΈMPlist * mplist_find_by_value (MPlist *plist, void *val)β finds a property with a specific value in a property list. π΅οΈββοΈMPlist * mplist_next (MPlist *plist)β returns the next sublist of a property list. β‘οΈMPlist * mplist_set (MPlist *plist, MSymbol key, void *val)β sets the first property in a property list. π₯int mplist_length (MPlist *plist)β returns the length of a property list. πMSymbol mplist_key (MPlist *plist)β returns the key of the first property in a property list. πvoid * mplist_value (MPlist *plist)β returns the value of the first property in a property list. π
Variables
MSymbol Mintegerβ a symbol whose name is'integer'. π’MSymbol Mplistβ a symbol whose name is'plist'. πMSymbol Mtextβ a symbol whose name is'mtext'. π
π¦ Detailed Description π¦
@addtogroup m17nPlist
@brief Property List objects and API for them.
so. a property list (or plist for short, iykyk) is literally just a list of zero or more properties. and a property? it's a key plus a value. the key is a symbol, and the value is anything that can be cast to (void *). anything. the range. the audacity. π
now here's the tea: if the key of a property is a managing key, then its value is a managed object. and yes, a property list is itself a managed object. it manages, it's managed, it contains multitudes. π
and if every single key of a plist is one of #Msymbol, #Mtext, #Minteger, and #Mplist, then we call that plist well-formed β and it gets written out in the docs using this notation:
PLIST ::= '(' ELEMENT * ')'
ELEMENT ::= INTEGER | SYMBOL | M-TEXT | PLIST
M-TEXT ::= '"' text data ... '"'
for example, say a plist has four elements: the integer -20, a symbol of name "sym", an M-text with contents "abc", and a plist of the integer 10 and a symbol of name "another-symbol". then it's represented like this:
(-20 sym "abc" (10 another-symbol))
nested plists?? in my notation?? it's more likely than you think. π
β Variable Documentation β
MSymbol Minteger
Symbol whose name is 'integer'. The symbol Minteger has the name 'integer'. The value of a property whose key is Minteger must be an integer. π’ no cap, it has to be an integer.
MSymbol Mplist
Symbol whose name is 'plist'. The symbol Mplist has the name 'plist'. It is a managing key. A value of a property whose key is Mplist must be a plist. π managing key behavior, we love to see it.
MSymbol Mtext
Symbol whose name is 'mtext'. The symbol Mtext has the name 'mtext'. It is a managing key. A value of a property whose key is Mtext must be an M-text. π again: managing key. again: must be an M-text.
π Author π
Generated automatically by Doxygen for The m17n Library from the source code. (yes the robot wrote it, and honestly? it ate. π€β¨)
π COPYRIGHT π
Copyright (C) 2001 Information-technology Promotion Agency (IPA)
Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License <http://www.gnu.org/licenses/fdl.html>.
okay that's the whole page bestie, you made it to the end, main character energy fr fr π«Ά
Version 1.8.4 β dated Mon Sep 25 2023. mwah, that's a wrap on m17nPlist(3m17n), go forth and plist responsibly πβ¨π
π¦ where this page comes from
- debian trixie: m17n-docs 1.8.4-1
- ubuntu noble: m17n-docs 1.8.4-1
- ubuntu questing: m17n-docs 1.8.4-1
- ubuntu resolute: m17n-docs 1.8.4-1build1
- ubuntu stonking: m17n-docs 1.8.4-1build1
- Copyright (C) 2001 Information-technology Promotion Agency (IPA)
- Copyright (C) 2001-2011 National Institute of Advanced Industrial Science and Technology (AIST)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms