Get the ValueTypeManager associated with a database’s DataObjectContainer.
value_type_manager = sos.database().data().valueTypeManager()Create a floating point ValueType, without any attributes
value_type = sos.ValueTypeDouble.create(value_type_manager, “my_unique_value_type”)print(“Created ValueType:”) print(value_type)
Set attribute
value_type.setAttribute(“max”, 10)Get Attribute
max = value_type.attribute(“max”) print(“Number of ValueTypes stored at ValueTypeManager:”) print(value_type_manager.size()) #1 value_type = None #Clear unreferenced ValueTypes value_type_manager.clearUnused() print(“Number of ValueTypes stored at ValueTypeManager:”) print(value_type_manager.size()) #0.Public Member Functions
Detailed Description
Keeps track of all unique ValueTypes. Required to create new ValueType shared resource instances. Script example:Get the ValueTypeManager associated with a database’s DataObjectContainer.
value_type_manager = sos.database().data().valueTypeManager()Create a floating point ValueType, without any attributes
value_type = sos.ValueTypeDouble.create(value_type_manager, “my_unique_value_type”)print(“Created ValueType:”) print(value_type)
Set attribute
value_type.setAttribute(“max”, 10)Get Attribute
max = value_type.attribute(“max”) print(“Number of ValueTypes stored at ValueTypeManager:”) print(value_type_manager.size()) #1 value_type = None #Clear unreferenced ValueTypes value_type_manager.clearUnused() print(“Number of ValueTypes stored at ValueTypeManager:”) print(value_type_manager.size()) #0. output: Created ValueType: my_unique_value_type Number of ValueTypes stored at ValueTypeManager: 1 Number of ValueTypes stored at ValueTypeManager: 0Constructor & Destructor Documentation
ValueTypeManager()
Member Function Documentation
add()
clearUnused()
operator=()
Returns
Assigned ValueTypeManager