IReposProperties Interface

Meta Data Services Programming

Meta Data Services Programming

IReposProperties Interface

The IReposProperties interface provides access to the Properties collection. The Properties collection gives you a convenient mechanism for enumerating through all of the persistent properties and collections of an interface, when you do not already know the names of all of the interface members.

When you instantiate an Automation object that represents an object from your 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 engine provides 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, which returns an IReposProperties interface pointer.

This support enables the Automation programmer to use syntax like the following:

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

The second statement is resolved in the following way:

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

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

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

  • 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:

  • Get a count of the number of members in the collection.

  • Retrieve an IReposProperty interface pointer to one of the members in the collection.

  • Enumerate the members in the collection.
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.

See Also

ReposProperties Class

IRepositoryDispatch Interface

IReposProperty