lname_component(3)

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

πŸ’– lname_component(3) β€” Erlang Module Definition πŸ’–

okay bestie, welcome to lname_component, the manual page nobody warned you about but honestly? kinda iconic. it lives in the Erlang Module Definition section of the man pages, and it's here to make your life cute and representation-independent. let's get into it 🫢


✨ NAME ✨

lname_component β€” the interface that supports the name pseudo-objects. yes, "pseudo-objects". it's giving mysterious. it's giving main character. slay.


🌸 DESCRIPTION 🌸

so here's the tea, bestie: this interface is part of the name library, and the whole point of that library is to hide how names are actually represented. sneaky? no, thoughtful. πŸ’…

in Orber's Erlang mapping, the pseudo-object names and the real IDL names literally have the same representation β€” same vibes, same shape. but the way it should go is that clients use the names library, so they never become dependent on that representation. it's giving "don't get attached to implementation details, bestie, they will not text you back." 😭

the lname_component interface handles name components β€” think get and set of the struct members. very demure. very mindful. ✨

πŸŽ€ important note, no cap: the lname_component interface in Orber does not contain a destroy function. why? because the NameComponents are represented as Erlang records, and therefore they get removed by the garbage collector when they're not in use anymore. the garbage collector is the cleanup crew and honestly? she ate. πŸ—‘οΈπŸ’–

the type NameComponent used below is defined as:

-record('CosNaming_NameComponent', {id, kind=""}).

id and kind are strings. πŸ“

the record is defined in the file CosNaming.hrl, and you include it like this:

-include_lib("orber/COSS/CosNaming/CosNaming.hrl").

πŸ‘‘ EXPORTS πŸ‘‘

πŸ’œ create() -> Return

Types:

Return = NameComponent

this function returns a new name component. fresh out the box, brand new, no notes. ✨


πŸ’œ get_id(NameComponent) -> Return

Types:

Return = string()

this function returns the id string of a name component. just the id, bestie, nothing extra. πŸŽ€


πŸ’œ set_id(NameComponent, Id) -> Return

Types:

Id = string()
Return = NameComponent

this function sets the id string of a name component and returns the component. so it does the thing and hands it back to you. generous behavior, honestly. 🫢


πŸ’œ get_kind(NameComponent) -> Return

Types:

Return = string()

this function returns the id string of a name component. (yes, the manpage says id string here too β€” I'm not gonna lie to you, I'm reporting it exactly as written, fr fr. πŸ’€) same energy as the line above it, the docs said what they said.


πŸ’œ set_kind(NameComponent, Kind) -> Return

Types:

Kind = string()
Return = NameComponent

this function sets the kind string of a name component and returns the component. set it, get it back, iconic. 🌈


that's the whole page, bestie. every function, every type, every string, every record β€” accounted for. you understood the assignment. πŸ’…

cute lil sign-off: this masterpiece of documentation is brought to you by Ericsson AB, shipping with orber 5.2.2. go forth and handle your name components with main character energy. mwah. πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from