lname(3)
πΈ 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 π«Ά thelnameinterface in orber does not contain adestroyfunction, 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
- fedora 43: erlang-orber 1:5.2.2-1.fc43 Β· Apache-2.0
- fedora 44: erlang-orber 1:5.2.2-1.fc44 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms