The wpSetupOnce method is called once during the creation of an object. I will push one item onto the stack. Unless popped by the setup string, every newly created stack will have this item. The following sample code shows the use of wpSetupOnce:

SOM_Scope BOOL SOMLINK stk_wpSetupOnce(
                       Stack *somSelf,      // In  - pointer to the object
                       PSZ pszSetupString)

// The method returns the value:
//     TRUE  = successful
//     FALSE = error
{
  PSZ pszStackItem = "***** BOTTOM OF STACK *****";

  // StackData *somThis = StackGetData(somSelf);
  StackMethodDebug("Stack","stk_wpSetupOnce");

  _Push(somSelf, pszStackItem, strlen(pszStackItem) + 1);
  return (parent_wpSetupOnce(somSelf, pszSetupString));

} // End stk_wpSetupOnce


[Back] [Next]