Enumerates all containers associated with the automation object.
#include "ltwrappr.h"
L_INT LAutomation::EnumContainers (void )
Value | Meaning |
---|---|
SUCCESS | The function was successful. |
< 1 | An error occurred. Refer to Return Codes. |
For each container enumerated by this function, the LAutomation::EnumContainersCallBack function is called.
The enumeration process continues until the last container is enumerated or an error occurs.
This example shows how to enumerate the automation containers.
class LUserAutomation :public LAutomation
{
protected :
virtual L_INT EnumContainersCallback (LContainer* pLContainer);
};
//LAutomation::EnumContainers (void)
/* User defined enum callback function */
L_INT LUserAutomation::EnumContainersCallback (LContainer* pLContainer)
{
/* reset the passed container handle */
pLContainer ->Reset () ;
/* return 1 to continue the enumeration */
return 1 ;
}
L_INT LAutomation_EnumContainersExample( LAutomation &Automation )
{
L_INT nRet;
nRet = Automation.IsValid ();
if ( SUCCESS == nRet ) /* check the validity of the automation handle */
{
/* start enum the current added automation containers */
nRet = Automation.EnumContainers ();
if(nRet != SUCCESS)
return nRet;
}
else
{
return nRet ;
}
return SUCCESS;
}