function ok=verifyChildCount(obj,minNumChildren)
%VERIFYCHILDCOUNT  Return whether an object has a certain number of children
%    TF = RPTGEN_UD.VERIFYCHILDCOUNT(OBJ,MINCHILD) returns true if the
%    UDD object OBJ has at least MINCHILD children.

%   Copyright 1997-2002 The MathWorks, Inc.

nChild=0;
childNode = down(obj);
while ~isempty(childNode) & (nChild < minNumChildren)
    nChild = nChild+1;
    childNode = right(childNode);
end

ok = (nChild >= minNumChildren);
