eXpress Open Architecture Reference
×
Menu
Index

Design - Object - Failure Effect Relationship

 

Overview

 
Objects and Failure Effects are searchable within collections. The IDesign interface supports direct recasting into either an IObjectCollection, whereby any object can then be searched for, or to an IFailureEffectCollection, whereby design-level effects can be searched for.
 
Only certain types of objects can be recast into an IFailureEffectCollection, whereby a Failure Effect can be searched for. Failure Effects found within the object Failure Effect Collection represent Object-level Failure Effects, whereas the Failure Effects found within the Design Failure Effect Collection This is called Drill-Down. By the same token, parent interfaces are searchable by using the IExpressEntity.
 

Drill-Down

 

Parent Searching

 
 
 

Short-Cuts for Smart Pointers

 
When using smart pointers, since Objects support direct recasting into Behavior, it is not necessary to first search for behavior prior to the cast. Instead, from an object collection, one can search for an object and receive the return pointer directly as an IFailureEffectCollection. If a COM Exception is not thrown, the object was found and successfully recast as an IFailureEffectCollection. This saves the extra step of attempting to find the object first, and then having to check again if it can be cast successfully.