v2.4
IPropertyManager Interface Reference

Represents a Property Manager. More...

Inheritance diagram for IPropertyManager:

Public Member Functions

HRESULT RegisterProperty ([in] GUID propertyId, [in] PropertyDescription description)
 Registers a property with the given ID and description in the project. More...
 
HRESULT UnregisterProperty ([in] GUID propertyId)
 Unregisters a property from the project. More...
 
HRESULT GetPropertyId ([in] int index, [out, retval] GUID *pPropertyId)
 Gets the ID of a property stored in the manager by the given index. More...
 
HRESULT GetPropertyDescription ([in] GUID propertyId, [out, retval] PropertyDescription *pDescription)
 Gets the description of a property. More...
 
HRESULT IsPropertyRegistered ([in] GUID propertyId, [out, retval] VARIANT_BOOL *pResult)
 Checks if a property is registered. More...
 
HRESULT AssignPropertyToType ([in] GUID propertyId, [in] GUID objectType_)
 Associates a property with an object type. More...
 
HRESULT UnassignPropertyFromType ([in] GUID propertyId, [in] GUID objectType_)
 Unassigns a property from an object type. More...
 
HRESULT IsPropertyAssignedToType ([in] GUID propertyId, [in] GUID objectType_, [out, retval] VARIANT_BOOL *pResult)
 Checks if a property is assigned to an object type. More...
 
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 UnregisterPropertyS ([in] BSTR propertyId)
 Same as UnregisterProperty, but accepting GUID as a string.
 
HRESULT GetPropertyIdS ([in] int index, [out, retval] BSTR *pPropertyId)
 Same as GetPropertyId, but accepting GUID as a string.
 
HRESULT GetPropertyNameS ([in] BSTR propertyId, [out, retval] BSTR *pName)
 Gets the name of a property by string id. More...
 
HRESULT GetPropertyTypeS ([in] BSTR propertyId, [out, retval] enum PropertyType *pType)
 Gets the type of a property by string id. More...
 
HRESULT IsPropertyRegisteredS ([in] BSTR propertyId, [out, retval] VARIANT_BOOL *pResult)
 Same as IsPropertyRegistered, but accepting GUID as a string.
 
HRESULT AssignPropertyToTypeS ([in] BSTR propertyId, [in] BSTR objectType_)
 Same as AssignPropertyToType, but accepting GUIDs as strings.
 
HRESULT UnassignPropertyFromTypeS ([in] BSTR propertyId, [in] BSTR objectType_)
 Same as UnassignPropertyFromType, but accepting GUIDs as strings.
 
HRESULT IsPropertyAssignedToTypeS ([in] BSTR propertyId, [in] BSTR objectType_, [out, retval] VARIANT_BOOL *pResult)
 Same as IsPropertyAssignedToType, but accepting GUIDs as strings.
 
HRESULT GetPropertyName ([in] GUID propertyId, [out, retval] BSTR *pName)
 Gets the name of a property by id. More...
 
HRESULT GetPropertyType ([in] GUID propertyId, [out, retval] enum PropertyType *pType)
 Gets the type of a property by id. More...
 

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

HRESULT IPropertyManager::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.
HRESULT IPropertyManager::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.
HRESULT IPropertyManager::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.
HRESULT IPropertyManager::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.
HRESULT IPropertyManager::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.
HRESULT IPropertyManager::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.
HRESULT IPropertyManager::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.
HRESULT IPropertyManager::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.
HRESULT IPropertyManager::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.
HRESULT IPropertyManager::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.
HRESULT IPropertyManager::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.
HRESULT IPropertyManager::UnregisterProperty ( [in] GUID  propertyId)

Unregisters a property from the project.

Parameters
[in]propertyIdThe unique identifier of the property.