v2.49
IPropertyManager Interface Reference

Represents a Property Manager. More...

Public Member Functions

HRESULT AssignPropertyToType ([in] GUID propertyId, [in] GUID entityType)
 Associates a property with an entity type.
HRESULT AssignPropertyToTypeS ([in] BSTR propertyId, [in] BSTR entityType)
 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 GetCSVExportFlag ([in] GUID propertyId, [in] GUID entityType, [out, retval] VARIANT_BOOL *pValue)
 Check whether assigned property should be exported to csv or not.
HRESULT GetCSVExportFlagS ([in] BSTR propertyId, [in] BSTR entityType, [out, retval] VARIANT_BOOL *pValue)
 Same as GetCSVExportFlag, but accepting GUID as a string.
HRESULT GetExpression ([in] GUID propertyId, [in] GUID entityType, [out, retval] BSTR *pExpression)
 Gets the expression of the assigned property. Returns null if expression is not set.
HRESULT GetExpressionS ([in] BSTR propertyId, [in] BSTR entityType, [out, retval] BSTR *pExpression)
 Same as GetExpression, but accepting GUID as a string.
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 entityType, [out, retval] VARIANT_BOOL *pResult)
 Checks if a property is assigned to an entity type.
HRESULT IsPropertyAssignedToTypeS ([in] BSTR propertyId, [in] BSTR entityType, [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 ResetExpression ([in] GUID propertyId, [in] GUID entityType)
 Resets the expression of the assigned property.
HRESULT SetCSVExportFlag ([in] GUID propertyId, [in] GUID entityType, [in] VARIANT_BOOL value)
 Sets whether assigned property should be exported to csv or not.
HRESULT SetCSVExportFlagS ([in] BSTR propertyId, [in] BSTR entityType, [in] VARIANT_BOOL value)
 Same as SetCSVExportFlag, but accepting GUID as a string.
HRESULT SetExpression ([in] GUID propertyId, [in] GUID entityType, [in] BSTR expression)
 Sets the expression to the assigned property. Use ResetExpression or pass null as expression string to reset the expression.
HRESULT SetExpressionS ([in] BSTR propertyId, [in] BSTR entityType, [in] BSTR expression)
 Same as SetExpression, 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 entityType)
 Unassigns a property from an entity type.
HRESULT UnassignPropertyFromTypeS ([in] BSTR propertyId, [in] BSTR entityType)
 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 entity 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 entity types. All values of the property stored in entities are also removed.

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

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

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

This interface can be obtained from IProject.

See also
IPropertyContainer, Entity types

Member Function Documentation

◆ AssignPropertyToType()

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

Associates a property with an entity type.

Parameters
[in]propertyIdThe unique identifier of the property.
[in]entityTypeThe entity 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.

◆ GetCSVExportFlag()

HRESULT GetCSVExportFlag ( [in] GUID propertyId,
[in] GUID entityType,
[out, retval] VARIANT_BOOL * pValue )

Check whether assigned property should be exported to csv or not.

Parameters
[in]propertyIdThe unique identifier of the property.
[in]entityTypeThe entity type.
[out]pValueTRUE if the assigned property should be exported to csv, FALSE otherwise.

◆ GetExpression()

HRESULT GetExpression ( [in] GUID propertyId,
[in] GUID entityType,
[out, retval] BSTR * pExpression )

Gets the expression of the assigned property. Returns null if expression is not set.

Parameters
[in]propertyIdThe unique identifier of the property.
[in]entityTypeThe entity type.
[out]pExpressionThe expression assigned the property.
See also
SetExpression

◆ 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]ppDescriptionThe 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 entityType,
[out, retval] VARIANT_BOOL * pResult )

Checks if a property is assigned to an entity type.

Parameters
[in]propertyIdThe unique identifier of the property.
[in]entityTypeThe entity 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]description_The 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.

◆ ResetExpression()

HRESULT ResetExpression ( [in] GUID propertyId,
[in] GUID entityType )

Resets the expression of the assigned property.

Parameters
[in]propertyIdThe unique identifier of the property.
[in]entityTypeThe entity type.
See also
SetExpression

◆ SetCSVExportFlag()

HRESULT SetCSVExportFlag ( [in] GUID propertyId,
[in] GUID entityType,
[in] VARIANT_BOOL value )

Sets whether assigned property should be exported to csv or not.

Parameters
[in]propertyIdThe unique identifier of the property.
[in]entityTypeThe entity type.
[in]valueTRUE if the assigned property should be exported to csv, FALSE otherwise.

◆ SetExpression()

HRESULT SetExpression ( [in] GUID propertyId,
[in] GUID entityType,
[in] BSTR expression )

Sets the expression to the assigned property. Use ResetExpression or pass null as expression string to reset the expression.

Parameters
[in]propertyIdThe unique identifier of the property.
[in]entityTypeThe entity type.
[in]expressionThe expression to be set.
See also
Formulas, GetExpression, ResetExpression

◆ 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 entityType )

Unassigns a property from an entity type.

Parameters
[in]propertyIdThe unique identifier of the property.
[in]entityTypeThe entity 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.