1 // Created on: 2004-03-05
2 // Created by: Mikhail KUZMITCHEV
3 // Copyright (c) 2004-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
16 #include <QANCollection.hxx>
17 #include <QANCollection_Common.hxx>
20 #include <Draw_Interpretor.hxx>
24 #include <Precision.hxx>
26 #include <NCollection_Vector.hxx>
28 #define ItemType gp_Pnt
29 #define Key1Type Standard_Real
30 #define Key2Type Standard_Integer
32 #include <NCollection_DefineArray1.hxx>
33 #include <NCollection_DefineHArray1.hxx>
34 ////////////////////////////////DEFINE_ARRAY1(QANCollection_Array1,QANCollection_BaseCol,ItemType)
35 ////////////////////////////////DEFINE_HARRAY1(QANCollection_HArray1,QANCollection_Array1)
36 DEFINE_ARRAY1(QANCollection_Array1Func,QANCollection_BaseColFunc,ItemType)
37 DEFINE_HARRAY1(QANCollection_HArray1Func,QANCollection_Array1Func)
39 #include <NCollection_DefineArray2.hxx>
40 #include <NCollection_DefineHArray2.hxx>
41 ////////////////////////////////DEFINE_ARRAY2(QANCollection_Array2,QANCollection_BaseCol,ItemType)
42 ////////////////////////////////DEFINE_HARRAY2(QANCollection_HArray2,QANCollection_Array2)
43 DEFINE_ARRAY2(QANCollection_Array2Func,QANCollection_BaseColFunc,ItemType)
44 DEFINE_HARRAY2(QANCollection_HArray2Func,QANCollection_Array2Func)
46 #include <NCollection_DefineMap.hxx>
47 #include <NCollection_DefineDataMap.hxx>
48 #include <NCollection_DefineDoubleMap.hxx>
49 #include <NCollection_DefineIndexedMap.hxx>
50 #include <NCollection_DefineIndexedDataMap.hxx>
51 ////////////////////////////////DEFINE_MAP(QANCollection_Map,QANCollection_Key1BaseCol,Key1Type)
52 ////////////////////////////////DEFINE_DATAMAP(QANCollection_DataMap,QANCollection_BaseCol,Key1Type,ItemType)
53 ////////////////////////////////DEFINE_DOUBLEMAP(QANCollection_DoubleMap,QANCollection_Key2BaseCol,Key1Type,Key2Type)
54 ////////////////////////////////DEFINE_INDEXEDMAP(QANCollection_IndexedMap,QANCollection_Key1BaseCol,Key1Type)
55 ////////////////////////////////DEFINE_INDEXEDDATAMAP(QANCollection_IDMap,QANCollection_BaseCol,Key1Type,ItemType)
56 DEFINE_MAP(QANCollection_MapFunc,QANCollection_Key1BaseColFunc,Key1Type)
57 DEFINE_DATAMAP(QANCollection_DataMapFunc,QANCollection_BaseColFunc,Key1Type,ItemType)
58 DEFINE_DOUBLEMAP(QANCollection_DoubleMapFunc,QANCollection_Key2BaseColFunc,Key1Type,Key2Type)
59 DEFINE_INDEXEDMAP(QANCollection_IndexedMapFunc,QANCollection_Key1BaseColFunc,Key1Type)
60 DEFINE_INDEXEDDATAMAP(QANCollection_IDMapFunc,QANCollection_BaseColFunc,Key1Type,ItemType)
62 #include <NCollection_DefineList.hxx>
63 ////////////////////////////////DEFINE_LIST(QANCollection_List,QANCollection_BaseCol,ItemType)
64 DEFINE_LIST(QANCollection_ListFunc,QANCollection_BaseColFunc,ItemType)
66 #include <NCollection_DefineSequence.hxx>
67 #include <NCollection_DefineHSequence.hxx>
68 ////////////////////////////////DEFINE_SEQUENCE(QANCollection_Sequence,QANCollection_BaseCol,ItemType)
69 ////////////////////////////////DEFINE_HSEQUENCE(QANCollection_HSequence,QANCollection_Sequence)
70 DEFINE_SEQUENCE(QANCollection_SequenceFunc,QANCollection_BaseColFunc,ItemType)
71 DEFINE_HSEQUENCE(QANCollection_HSequenceFunc,QANCollection_SequenceFunc)
73 // HashCode and IsEquel must be defined for key types of maps
74 Standard_Integer HashCode(const gp_Pnt thePnt, int theUpper)
76 return HashCode(thePnt.X(),theUpper);
79 Standard_Boolean IsEqual(const gp_Pnt& theP1, const gp_Pnt& theP2)
81 return theP1.IsEqual(theP2,gp::Resolution());
84 ////////////////////////////////void printCollection (QANCollection_Key1BaseCol& aColl,
86 void printCollection (Coll& aColl, const char * str)
89 Standard_Integer iSize = aColl.Size();
90 ////////////////////////////////QANCollection_Key1BaseCol::Iterator& anIter = aColl.CreateIterator();
91 typename Coll::Iterator anIter (aColl);
95 printf (" <Empty collection>\n");
97 printf ("Error : empty collection has size==%d",iSize);
101 printf (" Size==%d\n",iSize);
102 for (; anIter.More(); anIter.Next())
103 PrintItem(anIter.Value());
107 ////////////////////////////////void AssignCollection (QANCollection_BaseCol& aCollSrc,
108 //////////////////////////////// QANCollection_BaseCol& aCollDst)
109 template <class Coll>
110 void AssignCollection (Coll& aCollSrc, Coll& aCollDst)
112 printCollection (aCollSrc,"Source collection");
113 aCollDst.Assign(aCollSrc);
114 printCollection (aCollDst,"Target collection");
117 // ===================== Test methods of Array1 type ==========================
118 ////////////////////////////////void TestArray1 (QANCollection_Array1& theA1)
119 static void TestArray1 (QANCollection_Array1Func& theA1)
122 Standard_Integer iLow=theA1.Lower();
123 Standard_Integer iUpp=theA1.Upper();
126 printf ("Info: testing Array1(%d,%d), %s\n",
127 iLow, iUpp, (theA1.IsDeletable()?"deletable":"frozen"));
128 // C-array constructor, Length, Init
132 ItemType * rBlock = new ItemType[theA1.Length()];
133 ////////////////////////////////QANCollection_Array1 aCArr(*rBlock, iLow-100, iUpp-100);
134 QANCollection_Array1Func aCArr(*rBlock, iLow-100, iUpp-100);
135 printf (" created the same sized preallocated array (%d,%d), %s\n",
136 aCArr.Lower(),aCArr.Upper(),(aCArr.IsDeletable()?"deletable":"frozen"));
137 // *Value, operator()
138 for (i=iLow+1; i<iUpp; i++)
140 Random (aCArr.ChangeValue (i-101));
141 aCArr.SetValue (i-100, ItemType(aCArr.Value(i-101)));
142 aCArr(i-99) = aCArr(i-100) = aCArr(i-101);
144 // Handle, copy constructor (including operator=)
145 ////////////////////////////////Handle(QANCollection_HArray1) aHa = new QANCollection_HArray1(aCArr);
146 Handle(QANCollection_HArray1Func) aHa = new QANCollection_HArray1Func(aCArr);
148 AssignCollection (aHa->ChangeArray1(), theA1);
151 // ===================== Test methods of Array2 type ==========================
152 ////////////////////////////////void TestArray2 (QANCollection_Array2& theA2)
153 static void TestArray2 (QANCollection_Array2Func& theA2)
156 Standard_Integer iLR=theA2.LowerRow(), iLC=theA2.LowerCol();
157 Standard_Integer iUR=theA2.UpperRow(), iUC=theA2.UpperCol();
158 Standard_Integer i,j;
160 printf ("Info: testing Array2 (%d,%d)(%d,%d), %s\n",
161 iLR, iUR, iLC, iUC, (theA2.IsDeletable()?"deletable":"frozen"));
162 // C-array constructor, Length, Init, RowLength, ColLength
166 ItemType * rBlock = new ItemType[theA2.Length()];
167 ////////////////////////////////QANCollection_Array2 aCArr(*rBlock, iLR-100, iUR-100, iLC, iUC);
168 QANCollection_Array2Func aCArr(*rBlock, iLR-100, iUR-100, iLC, iUC);
169 printf (" created the same sized preallocated array (%d*%d), %s\n",
170 aCArr.RowLength(), aCArr.ColLength(),
171 (aCArr.IsDeletable()?"deletable":"frozen"));
172 // *Value, operator()
173 for (i=iLR+1; i<iUR; i++)
175 for (j=iLC; j<=iUC; j++)
177 Random (aCArr.ChangeValue (i-101, j));
178 aCArr.SetValue (i-100, j,
179 ItemType(aCArr.Value(i-101,j)));
180 aCArr(i-99,j) = aCArr(i-100,j) = aCArr(i-101,j);
183 // Handle, copy constructor (including operator=)
184 ////////////////////////////////Handle(QANCollection_HArray2) aHa = new QANCollection_HArray2(aCArr);
185 Handle(QANCollection_HArray2Func) aHa = new QANCollection_HArray2Func(aCArr);
187 AssignCollection (aHa->ChangeArray2(), theA2);
190 // ===================== Test methods of List type ==========================
191 ////////////////////////////////void TestList (QANCollection_List& theL)
192 static void TestList (QANCollection_ListFunc& theL)
195 Standard_Integer iExt=theL.Extent();
198 printf ("Info: testing List(%d)\n", iExt);
199 // Append(2), Prepend(2), InsertBefore(2), InsertAfter(2),
200 // Remove, RemoveFirst, First, Last
202 ////////////////////////////////QANCollection_List aL, aL1;
203 QANCollection_ListFunc aL, aL1;
207 aL.Append (anItem); // #1
208 aL.Append (aL1); // #2
210 aL1.Prepend (anItem); // #3
211 aL1.Prepend (aL); // #4
212 ////////////////////////////////QANCollection_List::Iterator anI(theL);
213 QANCollection_ListFunc::Iterator anI(theL);
217 theL.InsertBefore (anItem, anI); // #5
218 theL.InsertBefore (aL1, anI); // #6
220 theL.InsertAfter (anItem, anI); // #7
221 theL.InsertAfter (aL, anI); // #8
222 theL.Remove (anI); // #9
223 if (theL.Extent() > 0)
224 theL.RemoveFirst(); // #10
228 theL.Prepend (anItem);
229 PrintItem(theL.First());
230 PrintItem(theL.Last());
233 // Copy constructor + operator=
234 ////////////////////////////////aL = QANCollection_List(theL);
235 aL = QANCollection_ListFunc(theL);
238 AssignCollection (theL, aL);
244 // ===================== Test methods of Sequence type ========================
245 ////////////////////////////////void TestSequence (QANCollection_Sequence& theS)
246 static void TestSequence (QANCollection_SequenceFunc& theS)
250 printf ("Info: testing Sequence\n");
253 ////////////////////////////////QANCollection_Sequence aS, aS1;
254 QANCollection_SequenceFunc aS, aS1;
255 // Append(2), Prepend(2), InsertBefore(2), InsertAfter(2),
256 // Remove, RemoveFirst, First, Last
260 aS.Append (anItem); // #1
261 aS.Append (aS1); // #2
263 aS1.Prepend (anItem); // #3
264 aS1.Prepend (aS); // #4
265 if (theS.Length() > 0)
268 theS.InsertBefore (1, anItem); // #5
269 theS.InsertBefore (2, aS1); // #6
271 theS.InsertAfter (1, anItem); // #7
272 theS.InsertAfter (2, aS); // #8
273 theS.Remove (1); // #9
274 if (theS.Length() > 0)
275 theS.Remove(1); // #10
279 theS.Prepend (anItem);
280 PrintItem(theS.First());
281 PrintItem(theS.Last());
289 ////////////////////////////////Handle(QANCollection_HSequence) aHS = new QANCollection_HSequence(aS1);
290 Handle(QANCollection_HSequenceFunc) aHS = new QANCollection_HSequenceFunc(aS1);
291 theS.Split (3, aHS->ChangeSequence());
294 AssignCollection (theS, aS);
300 // ===================== Test methods of Map type =============================
301 ////////////////////////////////void TestMap (QANCollection_Map& theM)
302 static void TestMap (QANCollection_MapFunc& theM)
305 Standard_Integer iExt=theM.Extent();
308 printf ("Info: testing Map(l=%d)\n", iExt);
309 theM.Statistics(cout);
312 theM.Statistics(cout);
315 ////////////////////////////////QANCollection_Map aM;
316 QANCollection_MapFunc aM;
325 if (!aM.Contains(aKey))
327 printf("Error : map says that it does not contain its key ");
333 printf(" successfully removed item, l=%d\n", aM.Size());
335 // Copy constructor (including operator=)
336 ////////////////////////////////QANCollection_Map aM2 = QANCollection_Map(aM);
337 QANCollection_MapFunc aM2 = QANCollection_MapFunc(aM);
339 AssignCollection (aM2,theM);
345 // ===================== Test methods of DataMap type =========================
346 ////////////////////////////////void TestDataMap (QANCollection_DataMap& theM)
347 static void TestDataMap (QANCollection_DataMapFunc& theM)
350 Standard_Integer iExt=theM.Extent();
353 printf ("Info: testing DataMap(l=%d)\n", iExt);
354 theM.Statistics(cout);
357 theM.Statistics(cout);
360 ////////////////////////////////QANCollection_DataMap aM;
361 QANCollection_DataMapFunc aM;
362 // Bind, Find, ChangeFind, ()
369 aM.Bind (aKey, anItem);
370 PrintItem(aM.Find(aKey));
374 if (!aM.IsBound(aKey))
376 printf("Error : map says that it does not contain its key ");
382 printf(" successfully unbound the key, l=%d\n", aM.Size());
384 // Copy constructor (including operator=)
385 ////////////////////////////////theM = QANCollection_DataMap(aM);
386 theM = QANCollection_DataMapFunc(aM);
387 // Assign - prohibited
388 // AssignCollection (aM2,theM);
389 printCollection (theM, "DataMap:");
396 // ===================== Test methods of DoubleMap type =======================
397 ////////////////////////////////void TestDoubleMap (QANCollection_DoubleMap& theM)
398 static void TestDoubleMap (QANCollection_DoubleMapFunc& theM)
401 Standard_Integer iExt=theM.Extent();
404 printf ("Info: testing DoubleMap(l=%d)\n", iExt);
405 theM.Statistics(cout);
408 theM.Statistics(cout);
411 ////////////////////////////////QANCollection_DoubleMap aM;
412 QANCollection_DoubleMapFunc aM;
420 aM.Bind (aKey1, aKey2);
421 PrintItem(aM.Find1(aKey1));
422 if (!aM.IsBound1(aKey1))
424 printf("Error : map says that it does not contain its key ");
427 PrintItem(aM.Find2(aKey2));
428 if (!aM.IsBound2(aKey2))
430 printf("Error : map says that it does not contain its key ");
435 if (!aM.AreBound(aKey1,aKey2))
437 printf("Error : map says that it does not contain its keys ");
443 if (aM.UnBind2(aKey2))
444 printf(" successfully unbound the key, l=%d\n", aM.Size());
445 if (aM.UnBind1(aKey1))
446 printf("Error : unbound both keys?!\n");
448 // Copy constructor (including operator=)
449 ////////////////////////////////theM = QANCollection_DoubleMap(aM);
450 theM = QANCollection_DoubleMapFunc(aM);
451 // Assign - prohibited
452 // AssignCollection (aM2,theM);
453 printCollection (theM, "DoubleMap:");
459 // ===================== Test methods of IndexedMap type ======================
460 ////////////////////////////////void TestIndexedMap (QANCollection_IndexedMap& theM)
461 static void TestIndexedMap (QANCollection_IndexedMapFunc& theM)
464 Standard_Integer iExt=theM.Extent();
467 printf ("Info: testing IndexedMap(l=%d)\n", iExt);
468 theM.Statistics(cout);
471 theM.Statistics(cout);
474 ////////////////////////////////QANCollection_IndexedMap aM;
475 QANCollection_IndexedMapFunc aM;
476 // Add, FindKey, FindIndex
482 Standard_Integer iIndex=aM.FindIndex(aKey);
483 printf (" added a key, i=%d, k=",iIndex);
484 PrintItem(aM(iIndex));
487 if (!aM.Contains(aM.FindKey(aM.FindIndex(aKey))))
489 printf("Error : map says that it does not contain its key ");
495 printf(" successfully removed item, l=%d\n", aM.Size());
499 aM.Substitute(1,aKey);
500 if (!aM.Contains (aKey) || aM.FindIndex (aKey) != 1)
502 printf("Error : map does not contain valid key after substitute");
504 // Invoke substitute with the same key
505 aM.Substitute(1,aKey);
506 if (!aM.Contains (aKey) || aM.FindIndex (aKey) != 1)
508 printf("Error : map does not contain valid key after substitute");
510 // Copy constructor (including operator=)
511 ////////////////////////////////QANCollection_IndexedMap aM2 = QANCollection_IndexedMap(aM);
512 QANCollection_IndexedMapFunc aM2 = QANCollection_IndexedMapFunc(aM);
514 AssignCollection (aM2,theM);
520 // ===================== Test methods of IndexedDataMap type ==================
521 ////////////////////////////////void TestIndexedDataMap (QANCollection_IDMap& theM)
522 static void TestIndexedDataMap (QANCollection_IDMapFunc& theM)
525 Standard_Integer iExt=theM.Extent();
528 printf ("Info: testing IndexedDataMap(l=%d)\n", iExt);
529 theM.Statistics(cout);
532 theM.Statistics(cout);
535 ////////////////////////////////QANCollection_IDMap aM;
536 QANCollection_IDMapFunc aM;
537 // Add, FindKey, FindIndex, FindFromIndex, Change..., ()
544 aM.Add (aKey, anItem);
545 Standard_Integer iIndex=aM.FindIndex(aKey);
546 printf (" added a key, i=%d, k=",iIndex);
547 PrintItem(aM.FindKey(iIndex));
548 PrintItem(aM(iIndex));
549 Random(aM.ChangeFromIndex(iIndex));
551 // Contains, Remove, FindFromKey
552 if (!aM.Contains(aM.FindKey(aM.FindIndex(aKey))))
554 printf("Error : map says that it does not contain its key ");
559 anItem = aM.FindFromKey(aKey);
561 printf(" successfully removed item, l=%d\n", aM.Size());
563 // Substitute with different keys
565 aM.Substitute (1, aKey, anItem);
566 if (!aM.Contains (aKey) || aM.FindIndex (aKey) != 1 || !aM.FindFromKey (aKey).IsEqual (anItem, Precision::Confusion()))
568 printf("Error : map does not contain valid key and item after substitute");
570 // Substitute with equal keys
572 aM.Substitute (1, aKey, anItem);
573 if (!aM.Contains (aKey) || aM.FindIndex (aKey) != 1 || !aM.FindFromKey (aKey).IsEqual (anItem, Precision::Confusion()))
575 printf("Error : map does not contain valid key and item after substitute");
577 // Copy constructor (including operator=)
578 ////////////////////////////////theM = QANCollection_IDMap(aM);
579 theM = QANCollection_IDMapFunc(aM);
580 // Assign - prohibited
581 // AssignCollection (aM2,theM);
582 printCollection (theM, "DoubleMap:");
588 //=======================================================================
589 //function : CheckArguments1
591 //=======================================================================
592 Standard_Integer CheckArguments1(Draw_Interpretor& di, Standard_Integer argc, const char ** argv, Standard_Integer& Lower, Standard_Integer& Upper)
595 di << "Usage : " << argv[0] << " Lower Upper\n";
598 Lower = Draw::Atoi(argv[1]);
599 Upper = Draw::Atoi(argv[2]);
600 if ( Lower > Upper ) {
601 di << "Lower > Upper\n";
607 //=======================================================================
608 //function : CheckArguments2
610 //=======================================================================
611 Standard_Integer CheckArguments2(Draw_Interpretor& di, Standard_Integer argc, const char ** argv, Standard_Integer& LowerRow, Standard_Integer& UpperRow, Standard_Integer& LowerCol, Standard_Integer& UpperCol)
614 di << "Usage : " << argv[0] << " LowerRow UpperRow LowerCol UpperCol\n";
617 LowerRow = Draw::Atoi(argv[1]);
618 UpperRow = Draw::Atoi(argv[2]);
619 LowerCol = Draw::Atoi(argv[3]);
620 UpperCol = Draw::Atoi(argv[4]);
621 if ( LowerRow > UpperRow ) {
622 di << "LowerRow > UpperRow\n";
625 if ( LowerCol > UpperCol ) {
626 di << "LowerCol UpperCol> \n";
633 //=======================================================================
634 //function : QANColTestArray1
636 //=======================================================================
637 static Standard_Integer QANColTestArray1(Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
639 Standard_Integer Lower, Upper;
640 if ( CheckArguments1(di, argc, argv, Lower, Upper) ) {
643 QANCollection_Array1Func anArr1(Lower, Upper);
648 //=======================================================================
649 //function : QANColTestArray2
651 //=======================================================================
652 static Standard_Integer QANColTestArray2(Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
654 Standard_Integer LowerRow, UpperRow, LowerCol, UpperCol;
655 if ( CheckArguments2(di, argc, argv, LowerRow, UpperRow, LowerCol, UpperCol) ) {
658 QANCollection_Array2Func anArr2(LowerRow, UpperRow, LowerCol, UpperCol);
663 //=======================================================================
664 //function : QANColTestMap
666 //=======================================================================
667 static Standard_Integer QANColTestMap(Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
670 di << "Usage : " << argv[0] << "\n";
673 QANCollection_MapFunc aMap;
678 //=======================================================================
679 //function : QANColTestDataMap
681 //=======================================================================
682 static Standard_Integer QANColTestDataMap(Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
685 di << "Usage : " << argv[0] << "\n";
688 QANCollection_DataMapFunc aDataMap;
689 TestDataMap(aDataMap);
693 //=======================================================================
694 //function : QANColTestDoubleMap
696 //=======================================================================
697 static Standard_Integer QANColTestDoubleMap(Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
700 di << "Usage : " << argv[0] << "\n";
703 QANCollection_DoubleMapFunc aDoubleMap;
704 TestDoubleMap(aDoubleMap);
708 //=======================================================================
709 //function : QANColTestIndexedMap
711 //=======================================================================
712 static Standard_Integer QANColTestIndexedMap(Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
715 di << "Usage : " << argv[0] << "\n";
718 QANCollection_IndexedMapFunc aIndexedMap;
719 TestIndexedMap(aIndexedMap);
723 //=======================================================================
724 //function : QANColTestIndexedDataMap
726 //=======================================================================
727 static Standard_Integer QANColTestIndexedDataMap(Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
730 di << "Usage : " << argv[0] << "\n";
733 QANCollection_IDMapFunc aIDMap;
734 TestIndexedDataMap(aIDMap);
738 //=======================================================================
739 //function : QANColTestList
741 //=======================================================================
742 static Standard_Integer QANColTestList(Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
745 di << "Usage : " << argv[0] << "\n";
748 QANCollection_ListFunc aList;
753 //=======================================================================
754 //function : QANColTestVector
756 //=======================================================================
757 static Standard_Integer QANColTestVector (Draw_Interpretor&, Standard_Integer, const char**)
759 // test method Append and copying of empty vector
760 NCollection_Vector<int> aVec;
761 NCollection_Vector<int> aVec2 (aVec);
762 NCollection_Vector<int> aVec3;
767 std::cout << "Error: wrong value in original vector!" << endl;
770 std::cout << "Error: wrong value in copy-constructed vector!" << endl;
773 std::cout << "Error: wrong value in copied vector!" << endl;
774 std::cout << "Test OK" << endl;
779 //=======================================================================
780 //function : QANColTestSequence
782 //=======================================================================
783 static Standard_Integer QANColTestSequence(Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
786 di << "Usage : " << argv[0] << "\n";
789 QANCollection_SequenceFunc aSeq;
794 void QANCollection::CommandsTest(Draw_Interpretor& theCommands) {
795 const char *group = "QANCollection";
797 // from agvCollTest/src/CollectionEXE/FuncTestEXE.cxx
798 theCommands.Add("QANColTestArray1", "QANColTestArray1", __FILE__, QANColTestArray1, group);
799 theCommands.Add("QANColTestArray2", "QANColTestArray2", __FILE__, QANColTestArray2, group);
800 theCommands.Add("QANColTestMap", "QANColTestMap", __FILE__, QANColTestMap, group);
801 theCommands.Add("QANColTestDataMap", "QANColTestDataMap", __FILE__, QANColTestDataMap, group);
802 theCommands.Add("QANColTestDoubleMap", "QANColTestDoubleMap", __FILE__, QANColTestDoubleMap, group);
803 theCommands.Add("QANColTestIndexedMap", "QANColTestIndexedMap", __FILE__, QANColTestIndexedMap, group);
804 theCommands.Add("QANColTestIndexedDataMap", "QANColTestIndexedDataMap", __FILE__, QANColTestIndexedDataMap, group);
805 theCommands.Add("QANColTestList", "QANColTestList", __FILE__, QANColTestList, group);
806 theCommands.Add("QANColTestSequence", "QANColTestSequence", __FILE__, QANColTestSequence, group);
807 theCommands.Add("QANColTestVector", "QANColTestVector", __FILE__, QANColTestVector, group);