COSPROPERTYSERVICE_PROPERTYSETDEF(3erl)

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

πŸ’– NAME πŸ’–

CosPropertyService_PropertySetDef β€” bestie, this module is literally the implementation of the OMG CosPropertyService::PropertySetDef interface. she's the main character of property-set-defining, no cap. πŸ‘‘


✨ DESCRIPTION ✨

okay so first things first: if you wanna get access to the record definitions for the structures, you gotta do this:

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

slay. include it or you'll be sad. 🫢

also, this module also exports the functions described in

  • CosPropertyService_PropertySet

so like, it's giving inheritance vibes. iykyk. 🌸


πŸŽ€ EXPORTS πŸŽ€

πŸ’… get_allowed_property_types(PropertySetDef) -> Reply

Types:

PropertySetDef = #objref
Reply = {ok, PropertyTypes}
PropertyTypes = [CORBA::TypeCode]

this operation returns the TypeCodes which we are allowed to use when adding new properties. like a lil VIP list but for types. ⭐


πŸ’… get_allowed_properties(PropertySetDef) -> Reply

Types:

PropertySetDef = #objref
Reply = {ok, PropertyDefs}
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

this operation returns a sequence of the allowed properties we may alter β€” and which ones you actually get to touch depends on which mode is associated with a certain property. so like, mode check first, bestie. πŸ”₯


πŸ’… define_property_with_mode(PropertySetDef, Name, Value, Mode) -> Reply

Types:

PropertySetDef = #objref
Name = non-empty string()
Value = #any
Mode = normal | read_only | fixed_normal | fixed_readonly |
undefined
Reply = ok | {'EXCEPTION',
#CosPropertyService_InvalidPropertyName{}} | {'EXCEPTION',
#CosPropertyService_ConflictingProperty{}} | {'EXCEPTION',
#CosPropertyService_UnsupportedTypeCode{}} | {'EXCEPTION',
#CosPropertyService_UnsupportedProperty{}} | {'EXCEPTION',
#CosPropertyService_UnsupportedMode{}} | {'EXCEPTION',
#CosPropertyService_ReadOnlyProperty{}}

this operation attempts to associate a new property with the target object. and if we fail to do so? the appropriate exception is raised. the appropriate one, not just any one, she's specific. 😭


πŸ’… define_properties_with_modes(PropertySetDef, PropertyDefs) -> Reply

Types:

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 = ok | {'EXCEPTION',
#CosPropertyService_MultipleExceptions{exceptions = Excs}}
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

this operation attempts to associate the given Property Definitions with the target object. if one or more attempts fail, an exception is raised describing which properties we were not able to create. so you get receipts, bestie. 🧾✨


πŸ’… get_property_mode(PropertySetDef, Name) -> Reply

Types:

PropertySetDef = #objref
Name = string()
Reply = Mode | {'EXCEPTION',
#CosPropertyService_InvalidPropertyName{}} | {'EXCEPTION',
#CosPropertyService_PropertyNotFound{}}
Mode = normal | read_only | fixed_normal | fixed_readonly |
undefined

this operation returns the type of the given property. (yes it's called mode, yes it says type, that's just how it is, don't fight it πŸ’€)


πŸ’… get_property_modes(PropertySetDef, Names) -> Reply

Types:

PropertySetDef = #objref
Names = [string()]
Reply = {boolean(), PropertyModes}
PropertyModes =
[#'CosPropertyService_PropertyMode'{property_name = Name,
property_mode = Mode}]
Name = string()
Mode = normal | read_only | fixed_normal | fixed_readonly |
undefined

this operation returns the modes of the listed properties. and here's the tea: if the boolean flag is false, then all properties with mode undefined β€” this operation failed to comply. πŸ™ˆ so like, check that boolean, fr fr.


πŸ’… set_property_mode(PropertySetDef, Name, Mode) -> Reply

Types:

PropertySetDef = #objref
Name = string()
Mode = normal | read_only | fixed_normal | fixed_readonly |
undefined
Reply = ok | {'EXCEPTION',
#CosPropertyService_InvalidPropertyName{}} | {'EXCEPTION',
#CosPropertyService_UnsupportedMode{}} | {'EXCEPTION',
#CosPropertyService_PropertyNotFound{}}

this operation changes the given property's mode. and it returns the appropriate exception if it's not able to fulfill the request. can't do it? she'll tell you exactly why. iconic. πŸ’…


πŸ’… set_property_modes(PropertySetDef, PropertyModes) -> Reply

Types:

PropertySetDef = #objref
PropertyModes =
[#'CosPropertyService_PropertyMode'{property_name = Name,
property_mode = Mode}]
Name = string()
Mode = normal | read_only | fixed_normal | fixed_readonly |
undefined
Reply = ok | {'EXCEPTION',
#CosPropertyService_MultipleExceptions{exceptions = Excs}}
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

this operation attempts to update the listed properties' modes. raises an exception which describes which and why an operation failed. full gossip, zero mystery. πŸ’…πŸ”₯


okay that's the whole thing, bestie. go forth and define those properties. ate. πŸ’–

this was brought to you by Ericsson AB, cosProperty 5.2.2, in the cosProperty manual β€” module definition edition. periodt. πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from