any(3)
β¨ any(3) β the corba any type β¨
okay bestie, welcome to any(3) from the Erlang module definitions π this is the little corner of orber that deals with the CORBA any type, and honestly? it's giving lowkey iconic. let's get into it π«Ά
πΈ NAME πΈ
any β the corba any type. that's it, that's the whole vibe π
π¦ DESCRIPTION π¦
so like, this module contains functions that gives an interface to the CORBA any type. main character module energy fr fr β¨
heads up bestie: theanyinterface inorberdoes not contain a destroy function π and that's not a bug, it's a feature β theanytype is represented as an Erlang record, so it'll just get removed by the garbage collector when it's not in use anymore. the GC is doing the cleanup for you, slay ποΈπ
the type TC used below describes an IDL type, and it's a tuple according to the Erlang language mapping π
the type Any used below is defined as:
-record(any, {typecode, value}).
where typecode is a TC tuple and value is an Erlang term of the type defined by the typecode field π
π EXPORTS π
okay so here's where the actual functions live, no cap π§
π create() -> Result / create(Typecode, Value) -> Result
Types:
Typecode = TC
Value = term()
Result = Any
the create/0 function creates an empty any record, and the create/2 function creates an initialized record β¨ pick your fighter, both are valid π
π set_typecode(A, Typecode) -> Result
Types:
A = Any
Typecode = TC
Result = Any
this function sets the typecode of A and returns a new any record π note the "new" β it doesn't mutate, it hands you a fresh one, and that's the way that it should be fr fr πΈ
π get_typecode(A) -> Result
Types:
A = Any
Result = TC
this function returns the typecode of A. simple, clean, obsessed π¦
π set_value(A, Value) -> Result
Types:
A = Any
Value = term()
Result = Any
this function sets the value of A and returns a new any record π again with the new record, we love an immutable queen π
π get_value(A) -> Result
Types:
A = Any
Result = term()
this function returns the value of A. that's it bestie, go get your value π
and that's the whole page, you ate it π β¨
this lil' beauty is brought to you by Ericsson AB, running orber 5.2.2, and it's the any(3) page β so next time someone asks you about the CORBA any type, you're literally the expert now. periodt πππ¦
ily, go forth and slay your typecodes π«Ά
π¦ 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