CosPropert...DefFactory(3)

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

πŸ’– CosPropertyService_PropertySetDefFactory β€” Erlang Module Definition πŸ’–

okay bestie, welcome to the manual page for CosPropert...DefFactory(3) β€” that's the Erlang module definition for the cosProperty application, and honestly? it's giving "small module, big Corba energy". we're in the Erlang Module Definition section of the manuals, and this whole page is about one lil' factory module. slay. let's get into it πŸŽ€


✨ NAME ✨

CosPropertyService_PropertySetDefFactory β€” this module implements the OMG CosPropertyService::PropertySetDefFactory interface. no cap, that's literally its whole job. πŸ‘‘


🌸 DESCRIPTION 🌸

So you wanna actually use the record definitions for the structures? bestie, you gotta include this, verbatim, exactly like this:

-include_lib("cosProperty/include/CosPropertyService.hrl").

that's the vibe check for accessing all the structs. don't skip it, or the compiler will be like "girl what" 😭


πŸ¦‹ EXPORTS πŸ¦‹

three operations, three moments of main character energy. let's go one by one, no skipping, we're doing all of them πŸ’…

⭐ create_propertysetdef(Factory) ->

Types:

Factory = PropertySetDef = #objref

This operation creates a brand new PropertySetDef with no predefined settings. like, a blank slate, a fresh start, a new semester. it's giving empty notebook, ready for anything ✨


πŸ’œ create_constrained_propertysetdef(Factory, PropertyTypes, PropertyDefs) -> Reply

Types:

Factory = PropertySetDef = #objref
PropertyTypes = [CORBA::TypeCode]
PropertyDefs =
[#'CosPropertyService_PropertyDef'{property_name = Name,
property_value = Value, property_mode = Mode}]
Name = string()
Value = #any
Mode = normal | read_only | fixed_normal | fixed_readonly |
undefined
Reply = {'EXCEPTION',
#CosPropertyService_ConstraintNotSupported{}} | PropertySetDef
PropertySetDef = #objref

This operation creates a new PropertySetDef but with specific constraints attached β€” it's the "I have rules" version of the previous one. PropertyTypes states the allowed TypeCode's, and PropertyDefs is the valid CosPropertyService::PropertyDef data. so like, you're telling it exactly what it's allowed to be, and it respects that. boundaries, periodt 🫢

oh and heads up: Reply can come back as {'EXCEPTION', #CosPropertyService_ConstraintNotSupported{}} β€” meaning your constraints were, in fact, not supported. it's giving "sorry bestie, that's not on the menu" 😭

🌈 create_initial_propertysetdef(Factory, PropertyDefs) -> Reply

Types:

Factory = PropertySetDef = #objref
PropertyDefs =
[#'CosPropertyService_PropertyDef'{property_name = Name,
property_value = Value, property_mode = Mode}]
Name = string()
Value = #any
Mode = normal | read_only | fixed_normal | fixed_readonly |
undefined
Reply = {'EXCEPTION',
#CosPropertyService_MultipleExceptions{exceptions = Excs}} |
PropertySetDef
Excs = [#'CosPropertyService_PropertyException{reason =
Reason, failing_property_name = Name}]
Reason = invalid_property_name | conflicting_property |
property_not_found | unsupported_type_code |
unsupported_property | unsupported_mode | fixed_property |
read_only_property
PropertySetDef = #objref

This operation creates a new PropertySetDef with specific initial properties β€” like setting up your profile with all your faves already filled in. iconic behaviour honestly 🌸

and if things go sideways? Reply can be {'EXCEPTION', #CosPropertyService_MultipleExceptions{exceptions = Excs}} where Excs is a list of #'CosPropertyService_PropertyException'{reason = Reason, failing_property_name = Name}, and Reason can be any of: invalid_property_name, conflicting_property, property_not_found, unsupported_type_code, unsupported_property, unsupported_mode, fixed_property, or read_only_property. yes, that's multiple exceptions at once. not one, MULTIPLE. the drama πŸ’€ at least it tells you which property was failing, so that's thoughtful of it πŸŽ€

and that's the whole page, bestie!! you now know everything there is to know about CosPropertyService_PropertySetDefFactory and the three operations it serves. go forth and create property set defs responsibly 🫢

this manual page came to you courtesy of Ericsson AB, and it's the cosProperty 5.2.2 version, so if you're citing it in a group chat, that's the receipt. mwah, bye πŸ’–βœ¨πŸ’…

πŸ“¦ where this page comes from