The IReposProperty interface provides access to a persistent member (a property or collection) of a tool information model interface.
When you instantiate an Automation object that represents an object from your tool information model, and that object conforms to a class for which there is no custom implementation (in other words, you have provided no software implementation of the class), the Repository will provide an interface implementation for you. This interface implementation uses IRepositoryDispatch as its dispatch interface.
The IRepositoryDispatch interface is an enhanced IDispatch interface; in addition to all of the standard IDispatch methods, IRepositoryDispatch also provides access to the Properties collection. The Properties collection gives you a convenient mechanism to enumerate through all of the persistent properties and collections of an interface. The IReposProperty interface can be used to access the individual members in the Properties collection.
This support enables the Automation programmer to use syntax like:
Dim firstPropName As String
Let firstPropName = repObject.Properties(1).Name
The second statement resolves like this:
At this point, the Automation programmer has access to the name of the first property in the collection through the firstPropName variable.
Use the IReposProperty interface to access a persistent interface member, when no custom implementation is available, and you do not already know the type or name of the member. With this interface, you can:
IUnknown Method | Description |
QueryInterface | Returns pointers to supported interfaces. |
AddRef | Increments the reference count. |
Release | Decrements the reference count. |
IDispatch Method | Description |
GetIDsOfNames | Maps a single member and a set of argument names to a corresponding set of dispatch identifiers. |
GetTypeInfo | Retrieves a type information object, which can be used to get the type information for an interface. |
GetTypeInfoCount | Retrieves the number of type information interfaces that an object provides (either 0 or 1). |
Invoke | Provides access to properties and methods exposed by an Automation object. |
IReposProperty Method | Description |
get_Type | Retrieves the type of a persistent interface member. |
get_Name | Retrieves the name of a persistent interface member. |
get_Value | Retrieves the value of a persistent interface member. |
put_Value | Sets the value of a persistent property. |
Only persistent members (that is, members that are stored in the Repository) can be accessed by the IReposProperty interface.