lname(3)

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

🌸 lname(3) 🌸

okay bestie, welcome to the manual page for lname, which lives in the Erlang Module Definition corner of the world. pull up a chair, grab a boba, this one's short and sweet πŸ’–


✨ NAME ✨

lname β€” the interface that supports the name pseudo-objects. it's giving "let me handle your names so you don't have to" πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so, this interface is a part of the names library, and its whole job is to hide the representation of names. iconic behaviour, honestly.

in the Orbers Erlang mapping, the pseudo-object names and the real IDL names have the exact same representation β€” no cap. but the whole point is that clients should still use the names library anyway, so they don't end up dependent on the representation. periodt. the lname interface supports handling of names, like adding and removing name components. slay.

heads up 🫢 the lname interface in orber does not contain a destroy function, and that's on purpose: Names are represented as standard Erlang lists, so the garbage collector will remove them when they're not in use anymore. no manual cleanup, it's self-care ✨

the type NameComponent used down below is defined like this:

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

id and kind are strings.

the record lives 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. fresh out the box, brand new, main character energy πŸŽ€


⭐ insert_component(Name, N, NameComponent) -> Return

Types:

Name = [NameComponent]
N = int()
Return = Name

this function returns a name where the new name component has been inserted as component N in Name. slot it in, bestie πŸ’«


⭐ get_component(Name, N) -> Return

Types:

Name = [NameComponent]
N = int()
Return = NameComponent

this function returns the N:th name component in Name. hand it over πŸ”₯


⭐ delete_component(Name, N) -> Return

Types:

Name = [NameComponent]
N = int()
Return = Name

this function deletes the N:th name component from Name and returns the new name. bye bye component, you will not be missed πŸ’€


⭐ num_component(Name) -> Return

Types:

Name = [NameComponent]
Return = int()

this function returns a the number of name components in Name. yes, just count them. math is math 🌈


⭐ equal(Name1, Name2) -> Return

Types:

Name1 = Name2 = [NameComponent]
Return = bool()

this function returns true if the two names are equal and false otherwise. are they twins or not, we simply must know πŸ’œ


⭐ less_than(Name1, Name2) -> Return

Types:

Name1 = Name2 = [NameComponent]
Return = bool()

this function returns true if Name1 are lesser than Name2 and false otherwise. ranking them, gently 🧚


⭐ to_idl_form(Name) -> Return

Types:

Name = [NameComponent]
Return = Name

this function just checks if Name is a correct IDL name before returning it β€” because the name representation is the same for pseudo and IDL names in orber. so it's basically a vibe check, not a transformation ✨


⭐ from_idl_form(Name) -> Return

Types:

Name = [NameComponent]
Return = Name

this function just returns the Name β€” because the name representation is the same for pseudo and IDL names in orber. no notes, it ate and left no crumbs πŸ“


and that's the whole page, bestie!! πŸ₯³ brought to you by Ericsson AB, this is orber 5.2.2, and we were all reading lname(3) together. mwah, go forth and handle your names πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from