COSPROPERTYSERVICE_PROPERTIESITERATOR(3erl)

πŸ“¦
version 5.2.2 Β· 2 versions
, in fedora 43, fedora 44

πŸ’– NAME πŸ’–

CosPropertyService_PropertiesIterator β€” bestie, this is the Erlang module that implements the OMG CosPropertyService::PropertiesIterator interface. Yes, that's a mouthful. Yes, you're gonna slay it anyway. πŸ¦‹


✨ DESCRIPTION ✨

Okay so real talk, before you can even look at the record definitions for the structures, you gotta pull them in like this:

-include_lib("cosProperty/include/CosPropertyService.hrl").

That's it, that's the whole vibe check. Do it or your structs simply won't exist. πŸ’…


πŸ‘‘ EXPORTS πŸ‘‘

πŸŽ€ reset(Iterator) -> ok

Types:

Iterator = #objref

This one resets the position back to the first property. Rewind era. ✨


🌸 next_one(Iterator) -> Reply

Types:

Iterator = #objref
Reply = {boolean(),
#'CosPropertyService_Property'{property_name = Name,
property_value = Value}}
Name = string()
Value = #any

So this operation returns true. And if false gets returned? Then the out parameter is a non-valid Property β€” i.e. it's giving nothing, bestie. 😭


πŸ¦‹ next_n(Iterator, HowMany) -> Reply

Types:

Iterator = #objref
HowMany = long()
Reply = {boolean(), Properties}
Properties = [#'CosPropertyService_Property'{property_name =
Name, property_value = Value}]
Name = string()
Value = #any

This operation returns true if the requested number of properties can be delivered and there are additional properties. If false is returned, then a sequence of max HowMany properties will be returned and no more properties can be delivered. That's the whole plot twist. πŸ™ˆ


πŸ’œ destroy(Iterator) -> ok

Types:

Iterator = #objref

This operation will terminate the Iterator and all subsequent calls will fail. Not me ending it all for this iterator πŸ’€ β€” fr fr, once it's gone, it's gone.


Heads up bestie: destroy is permanent. Every call after it just fails. No comeback tour. 🌈

That's the whole page, angel. 🫢 This gorgeousness comes to you courtesy of Ericsson AB, from the cosProperty 5.2.2 release β€” the CosPropert...iesIterator(3) manual page, Erlang module definition and all. Go forth and iterate. πŸ‘‘βœ¨πŸ’–

πŸ“¦ where this page comes from