CosNaming_...ContextExt(3)
π CosNaming_NamingContextExt β the Erlang module, bestie π
okay so this is CosNaming_NamingContextExt from the CosNaming_...ContextExt(3) manual, and it's genuinely one of those little modules that does one job and does it iconically. β¨
πΈ NAME πΈ
CosNaming_NamingContextExt β no cap, this interface is literally the operation hub for converting a Name sequence to a string and back again. π¦ Both directions. She does both. π
β¨ DESCRIPTION β¨
okay so first thing's first: to get access to the record definitions for the structures, you use this:
-include_lib("orber/COSS/CosNaming/CosNaming.hrl").
periodt. that's the include. don't forget it, bestie, or you'll be out here fighting undefined records at 2am. π
Also β and this is the part people sleep on β this module also exports the functions described in:
- CosNaming_NamingContext
so yeah, she's not just doing her own thing, she's carrying the whole NamingContext vibe too. main character energy fr fr. π
π EXPORTS π
to_string(NamingContext, Name) -> Return
Types:
NameContext = #objref
Name = [NameComponent]
Return = string() | {'EXCEPTION', NamingContext::InvalidName{}}
This one stringifies a Name sequence to a string. That's it, that's the job. Name in, string out. π
to_name(NamingContext, NameString) -> Return
Types:
NameContext = #objref
NameString = string()
Return = [NameComponent] | {'EXCEPTION', NamingContext::InvalidName{}}
and this one is the glow-up in reverse: it converts a stringified Name to a Name sequence. π«
to_url(NamingContext, AddressString, NameString) -> Return
Types:
NameContext = #objref
Address = NameString = string()
Return = URLString | {'EXCEPTION', NamingContext::InvalidName{}} | {'EXCEPTION', NamingContextExt::InvalidAddress{}}
So what this operation does is take a corbaloc string and a stringified Name sequence as input, and it hands you back a fully formed URL string. like, fully assembled. no assembly required, she came ready. π
β οΈ heads up though β you can getNamingContext::InvalidName{}orNamingContextExt::InvalidAddress{}thrown back at you, so handle your exceptions, bestie, don't just yolo it. π
resolve_str(NamingContext, NameString) -> Return
Types:
NameContext = #objref
NameString = string()
Return = #objref | {'EXCEPTION', NamingContext::InvalidName{}}
| {'EXCEPTION', NamingContext::NotFound{why, rest_of_name}} |
{'EXCEPTION', NamingContext::CannotProceed{cxt, rest_of_name}}
Last but never least: this operation takes a stringified Name sequence as input and returns the associated object, if any. π«Ά
and likeβ¦ the exception menu here is long, okay? you can catch NamingContext::InvalidName{}, or NamingContext::NotFound{why, rest_of_name}, or NamingContext::CannotProceed{cxt, rest_of_name}. three whole flavours of nope. π so write your error handling, she's worth it.
π little sign-off π
That's the whole page, bestie β every flag, type, exception and function accounted for, nothing skipped, nothing invented. π
This one's brought to you by Ericsson AB, running orber 5.2.2, and filed under CosNaming_...ContextExt(3). π go forth and stringify responsibly. πβ¨π¦
π¦ 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