//
Node* getNode(Node* beginNode, ...)
{
if (beginNode == NULL) return NULL;
Node* ret = beginNode;
va_list argp;
std:string para;
va_start(argp, beginNode);
int count = 0;
while (1)
{
para = va_arg(argp, char*);
if (strcmp(para.c_str(), "") == 0)
{
if (count == 0) ret = NULL;
break;
}
count++;
ret = dynamic_cast<Node *>(ret->getChildByName(para));
if (ret == NULL) return NULL;
}
va_end(argp);
return ret;
}
网友评论