void main() { char choice; textcolor(CYAN); clrscr(); getch(); //DrawFaces(); //cout<<"\n"; //Text("-+-+-Standard XI C++ PROJECT-+-+-",2,0.23); //cout<<"\n"; //Text("-+-ARRAYS MANIPULATION-+-",2,0.23); //cout<<"\n"; //DrawFaces(); DrawFaces2(3,50); DrawFaces(1,45); gotoxy(1,10); cout<<"\n"; Text("1 : Add Arrays",1); cout<<"\n"; Text("2 : Subtract Arrays",1); cout<<"\n"; Text("3 : Multiply Arrays",1); cout<<"\n"; Text("4 : Sort an Array",1); cout<<"\n\n"; Text("Your choice : ",1,1,0.1,0); choice = getch(); if(choice=='1') AddArrays(); else if(choice=='2') SubArrays(); else if(choice=='3') AscSort(); //DrawFaces2(wherey(),2); getch(); }
void SILAttributes::SetFromNode(DataNode *parentNode) { if(parentNode == 0) return; DataNode *searchNode = parentNode->GetNode("SILAttributes"); if(searchNode == 0) return; DataNode *node; DataNode **children; if((node = searchNode->GetNode("nSets")) != 0) SetNSets(node->AsInt()); if((node = searchNode->GetNode("setNames")) != 0) SetSetNames(node->AsStringVector()); if((node = searchNode->GetNode("setIds")) != 0) SetSetIds(node->AsIntVector()); if((node = searchNode->GetNode("wholeList")) != 0) SetWholeList(node->AsIntVector()); if((node = searchNode->GetNode("nCollections")) != 0) SetNCollections(node->AsInt()); if((node = searchNode->GetNode("category")) != 0) SetCategory(node->AsStringVector()); if((node = searchNode->GetNode("role")) != 0) SetRole(node->AsIntVector()); if((node = searchNode->GetNode("superset")) != 0) SetSuperset(node->AsIntVector()); // Clear all the NamespaceAttributess if we got any. bool clearedNspaces = false; // Go through all of the children and construct a new // NamespaceAttributes for each one of them. children = searchNode->GetChildren(); if(children != 0) { for(int i = 0; i < searchNode->GetNumChildren(); ++i) { if(children[i]->GetKey() == std::string("NamespaceAttributes")) { if (!clearedNspaces) { ClearNspaces(); clearedNspaces = true; } NamespaceAttributes temp; temp.SetFromNode(children[i]); AddNspace(temp); } } } // Clear all the SILMatrixAttributess if we got any. bool clearedMatrices = false; // Go through all of the children and construct a new // SILMatrixAttributes for each one of them. children = searchNode->GetChildren(); if(children != 0) { for(int i = 0; i < searchNode->GetNumChildren(); ++i) { if(children[i]->GetKey() == std::string("SILMatrixAttributes")) { if (!clearedMatrices) { ClearMatrices(); clearedMatrices = true; } SILMatrixAttributes temp; temp.SetFromNode(children[i]); AddMatrices(temp); } } } // Clear all the SILArrayAttributess if we got any. bool clearedArrays = false; // Go through all of the children and construct a new // SILArrayAttributes for each one of them. children = searchNode->GetChildren(); if(children != 0) { for(int i = 0; i < searchNode->GetNumChildren(); ++i) { if(children[i]->GetKey() == std::string("SILArrayAttributes")) { if (!clearedArrays) { ClearArrays(); clearedArrays = true; } SILArrayAttributes temp; temp.SetFromNode(children[i]); AddArrays(temp); } } } if((node = searchNode->GetNode("order")) != 0) SetOrder(node->AsIntVector()); }