void JointsElement::ReadNode(const DOMNode* node) { _ASSERTE(node != NULL); ReadAttributes( node ); DOMNode* currentNode = node->getFirstChild(); while( currentNode != NULL ) { #if _DEBUG // デバッグ時に名前をチェックする為に const XMLCh* name = currentNode->getNodeName(); #endif if( IsElementNode( currentNode ) ) { if( Is_input_NodeName( currentNode ) ) { InputElement* elemInput = new InputElement(); elemInput->ReadNode( currentNode ); vecElemInput.push_back( elemInput ); } } currentNode = currentNode->getNextSibling(); // 次の要素を処理する } }
void PassElement::ReadNode(const DOMNode* node) { _ASSERTE(node != NULL); DOMNode* currentNode = node->getFirstChild(); while( currentNode != NULL ) { #if _DEBUG // デバッグ時に名前をチェックする為に const XMLCh* name = currentNode->getNodeName(); #endif if( IsElementNode( currentNode ) ) { if( Is_param_NodeName( currentNode ) ) { ParamElement* elemParam = new ParamElement(); elemParam->ReadNode( currentNode ); vecElemParam.push_back( elemParam ); } else if( Is_input_NodeName( currentNode ) ) { InputElement* elemInput = new InputElement(); elemInput->ReadNode( currentNode ); vecElemInput.push_back( elemInput ); } else if( Is_program_NodeName( currentNode ) ) { _ASSERTE(elemProgram == NULL); // 0または1つ存在するのでこの時点ではNULL elemProgram = new ProgramElement(); elemProgram->ReadNode( currentNode ); } } currentNode = currentNode->getNextSibling(); // 次の要素を処理する } }