of_add


pfcapsrv.pbl   >   pfc_n_cst_tree   >   of_add   

Full name pfc_n_cst_tree.of_add
Access public
Extend of integer
Return value integer
Prototype public function integer of_add(n_cst_treenode)

Name Datatype
No Data

Name Datatype
lb_height boolean

public function integer of_add (n_cst_treenode anv_currentnode);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  of_add
//
//	Access:  public
//
//	Arguments : 
//	anv_currentnode the node to be added to the tree
//
//	Returns:  integer
//	1 : node was added
//	0 : node with this key already exists in the tree, so node was not added
//	-1 : node was not added due to an error
//	-2 : node to be added is invalid
//
//	Description:  
//	Adds the passed node to the tree
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	6.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996-1997 Sybase, Inc. and its subsidiaries.  All rights reserved.
//	Any distribution of the PowerBuilder Foundation Classes (PFC)
//	source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////

boolean lb_height
setpointer(hourglass!)

// Validate parameters.
if isnull(anv_currentnode) or not isvalid(anv_currentnode) then return -2 

// If necessarey, create the comparison object.
if isnull(inv_compare) or not isvalid(inv_compare) then 
	// take the default comparision service
	inv_compare = create n_cst_treenodecompare
end if

// call the recursive function of_addnode
lb_height = false
return of_addnode(anv_currentnode,inv_root,lb_height) 

end function

     
Name Owner
No Data

     
Name Owner
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.setpointer systemfunctions
pfc_n_cst_tree.of_addnode pfc_n_cst_tree

     
Full name
No Data

     
Name Scope
No Data