v2.33
 
IPropertyManager Interface Reference

Represents a Property Manager. More...

Inheritance diagram for IPropertyManager:

Public Member Functions

HRESULT AssignPropertyToType ([in] GUID propertyId, [in] GUID objectType_)
 Associates a property with an object type.
 
HRESULT AssignPropertyToTypeS ([in] BSTR propertyId, [in] BSTR objectType_)
 Same as AssignPropertyToType, but accepting GUIDs as strings.
 
HRESULT CreatePropertyDescription ([in] BSTR name_, [in] enum PropertyType type_, [out, retval] IPropertyDescription **ppDescription)
 Constructs a new property description.
 
HRESULT GetPropertyDescription ([in] GUID propertyId, [out, retval] PropertyDescription *pDescription)
 Gets the description of a property.
 
HRESULT GetPropertyDescription2 ([in] GUID propertyId, [out, retval] IPropertyDescription **ppDescription)
 Gets the description of a property.
 
HRESULT GetPropertyDescription2S ([in] BSTR propertyId, [out, retval] IPropertyDescription **ppDescription)
 Same as GetPropertyDescription2, but accepting GUID as a string.
 
HRESULT GetPropertyId ([in] int index, [out, retval] GUID *pPropertyId)
 Gets the ID of a property stored in the manager by the given index.
 
HRESULT GetPropertyIdS ([in] int index, [out, retval] BSTR *pPropertyId)
 Same as GetPropertyId, but accepting GUID as a string.
 
HRESULT GetPropertyName ([in] GUID propertyId, [out, retval] BSTR *pName)
 Gets the name of a property by id.
 
HRESULT GetPropertyNameS ([in] BSTR propertyId, [out, retval] BSTR *pName)
 Gets the name of a property by string id.
 
HRESULT GetPropertyType ([in] GUID propertyId, [out, retval] enum PropertyType *pType)
 Gets the type of a property by id.
 
HRESULT GetPropertyTypeS ([in] BSTR propertyId, [out, retval] enum PropertyType *pType)
 Gets the type of a property by string id.
 
HRESULT IsPropertyAssignedToType ([in] GUID propertyId, [in] GUID objectType_, [out, retval] VARIANT_BOOL *pResult)
 Checks if a property is assigned to an object type.
 
HRESULT IsPropertyAssignedToTypeS ([in] BSTR propertyId, [in] BSTR objectType_, [out, retval] VARIANT_BOOL *pResult)
 Same as IsPropertyAssignedToType, but accepting GUIDs as strings.
 
HRESULT IsPropertyRegistered ([in] GUID propertyId, [out, retval] VARIANT_BOOL *pResult)
 Checks if a property is registered.
 
HRESULT IsPropertyRegisteredS ([in] BSTR propertyId, [out, retval] VARIANT_BOOL *pResult)
 Same as IsPropertyRegistered, but accepting GUID as a string.
 
HRESULT RegisterProperty ([in] GUID propertyId, [in] PropertyDescription description_)
 Registers a property with the given ID and description in the project.
 
HRESULT RegisterProperty2 ([in] GUID propertyId, [in] IPropertyDescription *pDescription)
 Registers a property with the given ID and description in the project.
 
HRESULT RegisterPropertyS ([in] BSTR propertyId, [in] BSTR name_, [in] enum PropertyType type_)
 Same as RegisterProperty, but accepting GUID as a string and not using struct PropertyDescription.
 
HRESULT RegisterPropertyS2 ([in] BSTR propertyId, [in] IPropertyDescription *pDescription)
 Same as RegisterProperty2, but accepting GUID as a string.
 
HRESULT SetPropertyName ([in] GUID propertyId, [in] BSTR name)
 Sets the name of the property.
 
HRESULT UnassignPropertyFromType ([in] GUID propertyId, [in] GUID objectType_)
 Unassigns a property from an object type.
 
HRESULT UnassignPropertyFromTypeS ([in] BSTR propertyId, [in] BSTR objectType_)
 Same as UnassignPropertyFromType, but accepting GUIDs as strings.
 
HRESULT UnregisterProperty ([in] GUID propertyId)
 Unregisters a property from the project.
 
HRESULT UnregisterPropertyS ([in] BSTR propertyId)
 Same as UnregisterProperty, but accepting GUID as a string.
 
HRESULT UpdateEnumValues ([in] GUID propertyId, [in] SAFEARRAY(BSTR) pEnumItems, [in] SAFEARRAY(BSTR) pSubstitutionTable)
 Updates enum values of a property.
 

Properties

int PropertyCount [get]
 The number of properties in the project.
 

Detailed Description

Represents a Property Manager.

Using this class you can:

  • add properties to a Renga project and delete them;
  • associate and dissociate properties with model object types.

To have a property appear in a Renga project use the RegisterProperty() method. Call IsPropertyRegistered() to check if a property exists in the project.

To delete properties from Renga projects use the UnregisterProperty() method. Deleting a property dissociates it from all model object types. All values of the property stored in model objects are also removed.

Call AssignPropertyToType() to associate a model object type with a property. When a property is associated with an object type, all objects of that type gain the property. Call IsPropertyAssignedToType() to check if a property is added to a model object type.

Initially, the associated properties have no values set. Use IPropertyContainer::Get() to get or set property values for an object.

You can remove properties from model object types using the UnassignPropertyFromType() method. Removing a property results in removal of all values of the property stored in model objects.

This interface can be obtained from IProject.

See also
IPropertyContainer

Member Function Documentation

◆ AssignPropertyToType()

HRESULT AssignPropertyToType ( [in] GUID propertyId,
[in] GUID objectType_ )

Associates a property with an object type.

Parameters
[in]propertyIdThe unique identifier of the property.
[in]objectType_The object type to assign the property to.

◆ CreatePropertyDescription()

HRESULT CreatePropertyDescription ( [in] BSTR name_,
[in] enum PropertyType type_,
[out, retval] IPropertyDescription ** ppDescription )

Constructs a new property description.

Parameters
[in]name_The property's name.
[in]type_The property's type.
[out]ppDescriptionThe constructed property's description.

◆ GetPropertyDescription()

HRESULT GetPropertyDescription ( [in] GUID propertyId,
[out, retval] PropertyDescription * pDescription )

Gets the description of a property.

Parameters
[in]propertyIdThe unique identifier of the property.
[out]pDescriptionThe property's description.

◆ GetPropertyDescription2()

HRESULT GetPropertyDescription2 ( [in] GUID propertyId,
[out, retval] IPropertyDescription ** ppDescription )

Gets the description of a property.

Parameters
[in]propertyIdThe unique identifier of the property.
[out]pDescriptionThe property's description.

◆ GetPropertyId()

HRESULT GetPropertyId ( [in] int index,
[out, retval] GUID * pPropertyId )

Gets the ID of a property stored in the manager by the given index.

Parameters
[in]indexThe index of the property.
[out]pPropertyIdThe ID of the requested property.

◆ GetPropertyName()

HRESULT GetPropertyName ( [in] GUID propertyId,
[out, retval] BSTR * pName )

Gets the name of a property by id.

Parameters
[in]propertyIdThe unique identifier of the property.
[out]pNameThe property's name.

◆ GetPropertyNameS()

HRESULT GetPropertyNameS ( [in] BSTR propertyId,
[out, retval] BSTR * pName )

Gets the name of a property by string id.

Parameters
[in]propertyIdThe unique identifier of the property.
[out]pNameThe property's name.

◆ GetPropertyType()

HRESULT GetPropertyType ( [in] GUID propertyId,
[out, retval] enum PropertyType * pType )

Gets the type of a property by id.

Parameters
[in]propertyIdThe unique identifier of the property.
[out]pTypeThe property's type.

◆ GetPropertyTypeS()

HRESULT GetPropertyTypeS ( [in] BSTR propertyId,
[out, retval] enum PropertyType * pType )

Gets the type of a property by string id.

Parameters
[in]propertyIdThe unique identifier of the property.
[out]pTypeThe property's type.

◆ IsPropertyAssignedToType()

HRESULT IsPropertyAssignedToType ( [in] GUID propertyId,
[in] GUID objectType_,
[out, retval] VARIANT_BOOL * pResult )

Checks if a property is assigned to an object type.

Parameters
[in]propertyIdThe unique identifier of the property.
[in]objectType_The object type.
[out]pResultTRUE if the property is assigned to the type, FALSE otherwise.

◆ IsPropertyRegistered()

HRESULT IsPropertyRegistered ( [in] GUID propertyId,
[out, retval] VARIANT_BOOL * pResult )

Checks if a property is registered.

Parameters
[in]propertyIdThe unique identifier of the property.
[out]pResultTRUE if the the property is registered, FALSE otherwise.

◆ RegisterProperty()

HRESULT RegisterProperty ( [in] GUID propertyId,
[in] PropertyDescription description_ )

Registers a property with the given ID and description in the project.

Parameters
[in]propertyIdThe unique identifier of the property.
[in]descriptionThe description of the property.

◆ RegisterProperty2()

HRESULT RegisterProperty2 ( [in] GUID propertyId,
[in] IPropertyDescription * pDescription )

Registers a property with the given ID and description in the project.

Parameters
[in]propertyIdThe unique identifier of the property.
[in]pDescriptionThe description of the property.

◆ SetPropertyName()

HRESULT SetPropertyName ( [in] GUID propertyId,
[in] BSTR name )

Sets the name of the property.

Parameters
[in]propertyIdThe unique identifier of the property.
[in]nameThe property's name.

◆ UnassignPropertyFromType()

HRESULT UnassignPropertyFromType ( [in] GUID propertyId,
[in] GUID objectType_ )

Unassigns a property from an object type.

Parameters
[in]propertyIdThe unique identifier of the property.
[in]objectType_The object type to unassign the property from.

◆ UnregisterProperty()

HRESULT UnregisterProperty ( [in] GUID propertyId)

Unregisters a property from the project.

Parameters
[in]propertyIdThe unique identifier of the property.

◆ UpdateEnumValues()

HRESULT UpdateEnumValues ( [in] GUID propertyId,
[in] SAFEARRAY(BSTR) pEnumItems,
[in] SAFEARRAY(BSTR) pSubstitutionTable )

Updates enum values of a property.

Parameters
[in]propertyIdThe unique identifier of the property.
[in]pEnumItemsThe property's new enum items.
[in]pSubstitutionTableThis argument is a collection of pairs of old and new values used to perform substitution in all project entities. For example, if we change enum items from {"1", "2", "3"} to {"one", "two"}, the substitution table might look like this: {"1", "one", "2", "two", "3", "two"}. All project entities (objects, styles, assemblies, etc.) will change their properties respectively.