IReposProperties Interface

See Also

The IReposProperties interface 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, when you don't already know the names of all of the interface members.

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. This dispatch interface contains one additional method, the get_Properties method, that returns an IReposProperties interface pointer.

This support enables the Automation programmer to use syntax like:

Dim firstProperty As ReposProperty
Set firstProperty = repObject.Properties(1)

The second statement is resolved like this:

  1. In this example, repObject is an Automation instantiation of a Repository object where the default implementation has been used.

  2. The Properties term is the Automation level name for the get_Properties method that is supplied by the IRepositoryDispatch dispatch interface.

  3. The get_Properties method returns the interface pointer to the IReposProperties interface.

  4. The default method of the IReposProperties interface is the get_Item method, which returns an IReposProperty interface pointer for the specified property object in the Properties collection.

At this point, the Automation programmer has access to the first property in the collection through the firstProperty object variable.

When to Use

Use the IReposProperties interface to access the properties and collections of a Repository object, when no custom implementation is available, and you do not already know what members are exposed by the object's interface. With the IReposProperties interface, you can:

Methods

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.

IReposProperties Method Description
get_Count Retrieves the count of the number of members in the collection.
get_Item Retrieves the IReposProperty interface pointer for the specified member of the collection.
get_Type Retrieves the type of the interface to which these properties are attached.
_NewEnum Retrieves a standard Automation enumeration interface pointer for the collection.

Remarks

Only persistent members (that is, members that are stored in the Repository) are represented in the Properties collection.