]> OCCT Git - occt-copy.git/commitdiff
0024742: Remove rarely used collection classes: SList
authordln <dln@opencascade.com>
Tue, 8 Apr 2014 10:21:26 +0000 (14:21 +0400)
committerabv <abv@opencascade.com>
Wed, 7 May 2014 12:07:51 +0000 (16:07 +0400)
Generic "TCollection_SList" class and nested "TCollection_SListNode" class moved (as non-generic) to the "TopLoc" package (the only place where they were instantiated).
Names of these classes changed to "TopLoc_SListOfItemLocation" and "TopLoc_SListNodeOfItemLocation".

"NCollection_SList" class removed as unused (along with NCollection_DefineSList.hxx).

24 files changed:
src/NCollection/FILES
src/NCollection/NCollection_DefineSList.hxx [deleted file]
src/NCollection/NCollection_SList.hxx [deleted file]
src/QANCollection/QANCollection.cdl
src/QANCollection/QANCollection2.cxx
src/QANCollection/QANCollection3.cxx
src/QANCollection/QANCollection_Common2.hxx
src/QANCollection/QANCollection_Common3.hxx
src/QANCollection/QANCollection_FuncLists.hxx
src/QANCollection/QANCollection_FuncTest.hxx
src/QANCollection/QANCollection_PerfLists.hxx
src/TCollection/TCollection.cdl
src/TCollection/TCollection_SList.cdl [deleted file]
src/TCollection/TCollection_SList.gxx [deleted file]
src/TCollection/TCollection_SList.lxx [deleted file]
src/TCollection/TCollection_SListNode.gxx [deleted file]
src/TCollection/TCollection_SListNode.lxx [deleted file]
src/TopLoc/TopLoc.cdl
src/TopLoc/TopLoc_SListNodeOfItemLocation.cdl [new file with mode: 0644]
src/TopLoc/TopLoc_SListNodeOfItemLocation.cxx [new file with mode: 0644]
src/TopLoc/TopLoc_SListNodeOfItemLocation.lxx [new file with mode: 0644]
src/TopLoc/TopLoc_SListOfItemLocation.cdl [new file with mode: 0644]
src/TopLoc/TopLoc_SListOfItemLocation.cxx [new file with mode: 0644]
src/TopLoc/TopLoc_SListOfItemLocation.lxx [new file with mode: 0644]

index d556cad244fa8d71abebe5be2a4ed751d4ab1463..a151b880a4712f3a493bf0f438b3bcb0049bc9c1 100755 (executable)
@@ -29,7 +29,6 @@ NCollection_Array2.hxx
 NCollection_HArray2.hxx
 NCollection_Stack.hxx
 NCollection_List.hxx
-NCollection_SList.hxx
 NCollection_Set.hxx
 NCollection_HSet.hxx
 NCollection_Map.hxx
@@ -51,7 +50,6 @@ NCollection_DefineDataMap.hxx
 NCollection_DefineDoubleMap.hxx
 NCollection_DefineIndexedMap.hxx
 NCollection_DefineIndexedDataMap.hxx
-NCollection_DefineSList.hxx
 NCollection_DefineSequence.hxx
 NCollection_DefineHSequence.hxx
 NCollection_DefineSet.hxx
diff --git a/src/NCollection/NCollection_DefineSList.hxx b/src/NCollection/NCollection_DefineSList.hxx
deleted file mode 100644 (file)
index 3a45ecd..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-// Created on: 2002-04-17
-// Created by: Alexander Kartomin (akm)
-// Copyright (c) 2002-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-//            Automatically created from NCollection_SList.hxx by GAWK
-// Purpose:     An SList is a LISP like list of Items.
-//              An SList is :
-//                . Empty.
-//                . Or it has a Value and a  Tail  which is an other SList. 
-//              The Tail of an empty list is an empty list.
-//              SList are  shared.  It  means   that they  can  be
-//              modified through other lists.
-//              SList may  be used  as Iterators. They  have Next,
-//              More, and value methods. To iterate on the content
-//              of the list S just do.
-//              SList Iterator;
-//              for (Iterator = S; Iterator.More(); Iterator.Next())
-//                X = Iterator.Value();
-//              Memory usage  is  automatically managed for  SLists
-//              (using reference counts).
-// Example:
-//              If S1 and S2 are SLists :
-//              if S1.Value() is X.
-//              And the following is done :
-//              S2 = S1;
-//              S2.SetValue(Y);
-//              S1.Value() becomes also Y.   So SList must be used
-//              with   care.  Mainly  the SetValue()    method  is
-//              dangerous. 
-
-
-#ifndef NCollection_DefineSList_HeaderFile
-#define NCollection_DefineSList_HeaderFile
-
-#include <NCollection_DefineBaseCollection.hxx>
-#include <NCollection_SList.hxx>
-
-// **************************************** Template for  SList  class ********
-
-#define DEFINE_SLIST(_ClassName_, _BaseCollection_, TheItemType)               \
-typedef NCollection_SList<TheItemType > _ClassName_;
-
-#endif
diff --git a/src/NCollection/NCollection_SList.hxx b/src/NCollection/NCollection_SList.hxx
deleted file mode 100644 (file)
index 5a0503f..0000000
+++ /dev/null
@@ -1,285 +0,0 @@
-// Created on: 2002-04-17
-// Created by: Alexander Kartomin (akm)
-// Copyright (c) 2002-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#ifndef NCollection_SList_HeaderFile
-#define NCollection_SList_HeaderFile
-
-#include <NCollection_BaseCollection.hxx>
-
-#if !defined No_Exception && !defined No_Standard_NoSuchObject
-#include <Standard_NoSuchObject.hxx>
-#endif
-
-/**
- * Purpose:     An SList is a LISP like list of Items.
- *              An SList is :
- *                . Empty.
- *                . Or it has a Value and a  Tail  which is an other SList. 
- *              
- *              The Tail of an empty list is an empty list.
- *              SList are  shared.  It  means   that they  can  be
- *              modified through other lists.
- *              SList may  be used  as Iterators. They  have Next,
- *              More, and value methods. To iterate on the content
- *              of the list S just do.
- *              
- *              SList Iterator;
- *              for (Iterator = S; Iterator.More(); Iterator.Next())
- *                X = Iterator.Value();
- *            
- *              Memory usage  is  automatically managed for  SLists
- *              (using reference counts).
- *             
- * Example:
- *              If S1 and S2 are SLists :
- *              if S1.Value() is X.
- *              
- *              And the following is done :
- *              S2 = S1;
- *              S2.SetValue(Y);
- *            
- *              S1.Value() becomes also Y.   So SList must be used
- *              with   care.  Mainly  the SetValue()    method  is
- *              dangerous. 
- */            
-template <class TheItemType> class NCollection_SList
-  : public NCollection_BaseCollection<TheItemType>,
-    public NCollection_BaseCollection<TheItemType>::Iterator
-{
- public:
-  //!   The node of SList
-  class SListNode
-  {
-  private:
-    //! Constructor
-    SListNode (const TheItemType& theItem,
-               const NCollection_SList& theTail) :
-                 myCount(1),
-                 myValue(theItem) 
-    { myTail = new (theTail.myAllocator) NCollection_SList(theTail); }
-    //! Tail
-    NCollection_SList& Tail (void)
-    { return (*myTail); }
-    //! Value
-    TheItemType& Value (void)         
-    { return myValue; }
-    //! Clear
-    void Clear (void)
-    {
-      myTail->Clear();
-      myTail->myAllocator->Free(myTail);
-    }
-
-    DEFINE_STANDARD_ALLOC
-    DEFINE_NCOLLECTION_ALLOC
-
-  private:
-    // ---------- PRIVATE FIELDS ------------
-    Standard_Integer    myCount; //!< Reference count
-    NCollection_SList * myTail;  //!< The tail
-    TheItemType         myValue; //!< Datum
-
-    // Everything above is private. Only SList has an access
-    friend class NCollection_SList<TheItemType>;
-  }; // End of nested class SListNode
-
- public:
-  // ---------- PUBLIC METHODS ------------
-
-  //! Empty constructor
-  NCollection_SList(const Handle(NCollection_BaseAllocator)& theAllocator=0L) :
-    NCollection_BaseCollection<TheItemType>(theAllocator),
-    myNode(NULL) {}
-
-  //! Constructor
-  NCollection_SList(const TheItemType&       theItem,
-                    const NCollection_SList& theTail) :
-    NCollection_BaseCollection<TheItemType>(theTail.myAllocator)
-  { myNode = new (theTail.myAllocator) SListNode(theItem,theTail); }
-
-  //! Copy constructor
-  NCollection_SList (const NCollection_SList& theOther) :
-    NCollection_BaseCollection<TheItemType>(theOther.myAllocator)
-  { 
-    myNode = theOther.myNode; 
-    if (myNode)
-      myNode->myCount++;
-  }
-
-  //! Clear the items out
-  void Clear (void)
-  {
-    if (!myNode)
-      return;
-    myNode->myCount--; 
-    if (myNode->myCount < 1)
-    {
-      myNode->Clear();
-      this->myAllocator->Free(myNode);
-    }
-    myNode = NULL;
-  }
-
-  //! Make this list identical to theOther
-  NCollection_SList& operator= (const NCollection_SList& theOther)
-  { 
-    if (myNode != theOther.myNode) 
-    {
-      if (theOther.myNode) 
-        theOther.myNode->myCount++;
-      Clear();
-      this->myAllocator = theOther.myAllocator;
-      myNode = theOther.myNode;
-    }
-    return *this;
-  }
-
-  //! Replace this list by the items of theOther collection
-  virtual void Assign (const NCollection_BaseCollection<TheItemType>& theOther)
-  {
-    if (this == &theOther) 
-      return;
-    Clear();
-    TYPENAME NCollection_BaseCollection<TheItemType>::Iterator& anIter = 
-      theOther.CreateIterator();
-    if (!anIter.More())
-      return;
-    SListNode *aNode, *aPrevNode=NULL;
-    for (; anIter.More(); anIter.Next())
-    {
-      aNode = new (this->myAllocator) SListNode 
-        (anIter.Value(), NCollection_SList(this->myAllocator));
-      if (IsEmpty())
-        myNode = aNode;
-      else
-        aPrevNode->Tail().myNode = aNode;
-      aPrevNode = aNode;
-    }
-  }
-
-  //! IsEmpty query
-  Standard_Boolean IsEmpty (void) const
-  { return (myNode==NULL); }
-
-  //! Value - constant access
-  virtual const TheItemType& Value (void) const
-  {
-#if !defined No_Exception && !defined No_Standard_NoSuchObject
-    if (IsEmpty())
-      Standard_NoSuchObject::Raise ("NCollection_SList::Value");
-#endif
-    return myNode->Value();
-  }
-
-  //! ChangeValue - variable access
-  virtual TheItemType& ChangeValue (void) const
-  { 
-#if !defined No_Exception && !defined No_Standard_NoSuchObject
-    if (IsEmpty())
-      Standard_NoSuchObject::Raise ("NCollection_SList::ChangeValue");
-#endif
-    return myNode->Value();
-  }
-
-  //! SetValue
-  void SetValue (const TheItemType& theItem)
-  { 
-#if !defined No_Exception && !defined No_Standard_NoSuchObject
-    if (IsEmpty())
-      Standard_NoSuchObject::Raise ("NCollection_SList::SetValue");
-#endif
-    myNode->Value() = theItem;
-  }
-
-  //! Tail
-  const NCollection_SList& Tail (void) const
-  { 
-    if (!IsEmpty()) 
-      return  myNode->Tail();
-    else
-      return *this;
-  }
-
-  //! ChangeTail
-  NCollection_SList& ChangeTail (void)
-  { 
-    if (!IsEmpty()) 
-      return myNode->Tail();
-    else
-      return *this;
-  }
-
-  //! SetTail
-  void SetTail (NCollection_SList& theList)
-  { 
-    if (!IsEmpty())
-      myNode->Tail() = theList;
-    else
-      *this = theList;
-  }
-
-  //! Construct
-  void Construct(const TheItemType& theItem)
-  { *this = NCollection_SList (theItem, *this); }
-
-  //! Constructed
-  NCollection_SList Constructed(const TheItemType& theItem) const
-  { return NCollection_SList (theItem, *this); }
-
-  //! ToTail
-  void ToTail (void)
-  { *this = Tail(); }
-
-  //! Initialize (~Assign)
-  void Initialize (const NCollection_SList& theOther)
-  { *this = theOther; }
-
-  //! Init (virtual method of base iterator)
-  void Init (const NCollection_SList& theOther)
-  { *this = theOther; }
-
-  //! More (~!IsEmpty)
-  virtual Standard_Boolean More (void) const
-  { return !IsEmpty(); }
-
-  //! Next (~ToTail)
-  virtual void Next (void) 
-  { ToTail(); }
-
-  //! Size - Number of items
-  virtual Standard_Integer Size (void) const
-  { return (IsEmpty() ? 0 : 1+myNode->Tail().Size()); }
-
-  //! Destructor - clears the SList
-  ~NCollection_SList (void)
-  { Clear(); }
-
-
- private:
-  // ----------- PRIVATE METHODS -----------
-
-  //! Creates Iterator for use on BaseCollection
-  virtual TYPENAME NCollection_BaseCollection<TheItemType>::Iterator& 
-    CreateIterator(void) const
-  { return *(new (this->IterAllocator()) NCollection_SList(*this)); }
-
- private:
-  // ---------- PRIVATE FIELDS ------------
-  SListNode*    myNode;
-
-  friend class SListNode;
-};
-
-#endif
index ac1d7cb89e65877fce149a1739675dc3fccd88ba..4fb17580949782dfe9747bc9b6fbe3c2d5b14578 100644 (file)
@@ -24,7 +24,6 @@ uses
 is
     class  ListOfPnt   instantiates  List  from  TCollection    (Pnt  from  gp);
     class  StackOfPnt  instantiates  Stack from  TCollection    (Pnt  from  gp);
-    class  SListOfPnt  instantiates  SList from  TCollection    (Pnt  from  gp);
     class  DataMapOfRealPnt instantiates DataMap from TCollection  
                                         (Real from Standard, 
                                          Pnt from gp, 
index 000a7321f3a7ee42d88b472d9adc08fd8b70ee0e..b81907a9de962ea543c662da3ce0fc4a7d6305e4 100644 (file)
@@ -237,21 +237,6 @@ static Standard_Integer QANColTestSet(Draw_Interpretor& di, Standard_Integer arg
   return 0;
 }
 
-//=======================================================================
-//function : QANColTestSList
-//purpose  : 
-//=======================================================================
-static Standard_Integer QANColTestSList(Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
-{
-  if ( argc != 1) {
-    di << "Usage : " << argv[0] << "\n";
-    return 1;
-  }
-  QANCollection_SListFunc aSList;
-  TestSList(aSList);
-  return 0;
-}
-
 //=======================================================================
 //function : QANColTestSequence
 //purpose  : 
@@ -281,7 +266,6 @@ void QANCollection::Commands2(Draw_Interpretor& theCommands) {
   theCommands.Add("QANColTestList",           "QANColTestList",           __FILE__, QANColTestList,           group);  
   theCommands.Add("QANColTestStack",          "QANColTestStack",          __FILE__, QANColTestStack,          group);  
   theCommands.Add("QANColTestSet",            "QANColTestSet",            __FILE__, QANColTestSet,            group);  
-  theCommands.Add("QANColTestSList",          "QANColTestSList",          __FILE__, QANColTestSList,          group);  
   theCommands.Add("QANColTestSequence",       "QANColTestSequence",       __FILE__, QANColTestSequence,       group);  
 
   return;
index 09e953cf33b7aeaabbef6af57817a621d5783a67..6ec7cc72cf65e3e7be75ee3db329352a7bb064f0 100644 (file)
@@ -125,20 +125,6 @@ static Standard_Integer QANColPerfSet(Draw_Interpretor& di, Standard_Integer arg
   return 0;
 }
 
-//=======================================================================
-//function : QANColPerfSList
-//purpose  : 
-//=======================================================================
-static Standard_Integer QANColPerfSList(Draw_Interpretor& di, Standard_Integer argc, const char ** argv)
-{
-  Standard_Integer Repeat, Size;
-  if ( CheckArguments(di, argc, argv, Repeat, Size) ) {
-    return 1;
-  }
-  CompSList(Repeat,Size);
-  return 0;
-}
-
 //=======================================================================
 //function : QANColPerfSequence
 //purpose  : 
@@ -246,7 +232,6 @@ void QANCollection::Commands3(Draw_Interpretor& theCommands) {
   theCommands.Add("QANColPerfList",           "QANColPerfList Repeat Size",           __FILE__, QANColPerfList,           group);  
   theCommands.Add("QANColPerfStack",          "QANColPerfStack Repeat Size",          __FILE__, QANColPerfStack,          group);  
   theCommands.Add("QANColPerfSet",            "QANColPerfSet Repeat Size",            __FILE__, QANColPerfSet,            group);  
-  theCommands.Add("QANColPerfSList",          "QANColPerfSList Repeat Size",          __FILE__, QANColPerfSList,          group);  
   theCommands.Add("QANColPerfSequence",       "QANColPerfSequence Repeat Size",       __FILE__, QANColPerfSequence,       group);  
   theCommands.Add("QANColPerfMap",            "QANColPerfMap Repeat Size",            __FILE__, QANColPerfMap,            group);  
   theCommands.Add("QANColPerfDataMap",        "QANColPerfDataMap Repeat Size",        __FILE__, QANColPerfDataMap,        group);  
index 9abb731d8080058087a4af244fa3c6c9180e6540..a1d2fcf212e4c4060bafbf69e522a013c78017af 100644 (file)
@@ -79,10 +79,6 @@ DEFINE_STACK(QANCollection_StackFunc,QANCollection_BaseColFunc,ItemType)
 DEFINE_SET(QANCollection_SetFunc,QANCollection_Key2BaseColFunc,Key2Type)
 DEFINE_HSET(QANCollection_HSetFunc,QANCollection_SetFunc)
 
-#include <NCollection_DefineSList.hxx>
-////////////////////////////////DEFINE_SLIST(QANCollection_SList,QANCollection_BaseCol,ItemType)
-DEFINE_SLIST(QANCollection_SListFunc,QANCollection_BaseColFunc,ItemType)
-
 #include <NCollection_DefineSequence.hxx>
 #include <NCollection_DefineHSequence.hxx>
 ////////////////////////////////DEFINE_SEQUENCE(QANCollection_Sequence,QANCollection_BaseCol,ItemType)
index 136c9285d125f8f51ddf929522b866f4d69c9acb..6ba90b9f90e3958e6ab0bb0cc20f35b96e472b24 100644 (file)
@@ -79,10 +79,6 @@ DEFINE_STACK(QANCollection_StackPerf,QANCollection_BaseColPerf,ItemType)
 DEFINE_SET(QANCollection_SetPerf,QANCollection_Key2BaseColPerf,Key2Type)
 DEFINE_HSET(QANCollection_HSetPerf,QANCollection_SetPerf)
 
-#include <NCollection_DefineSList.hxx>
-////////////////////////////////DEFINE_SLIST(QANCollection_SList,QANCollection_BaseCol,ItemType)
-DEFINE_SLIST(QANCollection_SListPerf,QANCollection_BaseColPerf,ItemType)
-
 #include <NCollection_DefineSequence.hxx>
 #include <NCollection_DefineHSequence.hxx>
 ////////////////////////////////DEFINE_SEQUENCE(QANCollection_Sequence,QANCollection_BaseCol,ItemType)
index 1f07b676ddc955b8e79344e7d15b34862482a4b1..189e9d2a81c98795a0ca9a8ef7067a8deb7667f7 100644 (file)
@@ -156,46 +156,6 @@ void TestSet (QANCollection_SetFunc& theS)
   aSet.Clear();
 }
 
-// ===================== Test methods of SList type ===========================
-////////////////////////////////void TestSList (QANCollection_SList&     theSL)
-void TestSList (QANCollection_SListFunc&     theSL)
-{
-  printf ("Info: testing SList\n");
-  ItemType anItem;
-  ////////////////////////////////QANCollection_SList aSL, aSL1;
-  QANCollection_SListFunc aSL, aSL1;
-
-  // Construct, Constructed, operator=, IsEmpty
-  Random(anItem);
-  aSL.Construct(anItem);
-  Random(anItem);
-  aSL1 = aSL.Constructed(anItem);
-  if (aSL.IsEmpty())
-    printf ("Error   : SList must not be empty\n");
-  printCollection(aSL1,"aSL1");
-  
-  Random(anItem);
-  aSL.Construct(anItem);
-  // SetTail
-  aSL.SetTail(aSL1);
-  printCollection(aSL,"aSL");
-
-  // ChangeValue
-  Random(aSL1.Tail().ChangeValue());
-  // ChangeTail, ToTail
-  Random(anItem);
-  theSL.Construct(anItem);
-  printCollection(theSL,"theSL");
-  theSL.ChangeTail() = aSL;
-  printCollection(theSL,"theSL");
-
-  // Assign
-  AssignCollection (aSL, theSL);
-
-  // Clear
-  aSL.Clear();
-}
-
 // ===================== Test methods of Sequence type ========================
 ////////////////////////////////void TestSequence (QANCollection_Sequence& theS)
 void TestSequence (QANCollection_SequenceFunc& theS)
index 8b95a9ea83aeeab268d2739b239ff12fdbe4cf6e..caba78e9d7b74fcd0f301a333d16e9a0069ed559 100644 (file)
@@ -36,7 +36,6 @@
 // Standard_EXPORT void TestList    (QANCollection_List&       theLi);
 // Standard_EXPORT void TestStack   (QANCollection_Stack&      theSt);
 // Standard_EXPORT void TestSet     (QANCollection_Set&        theSe);
-// Standard_EXPORT void TestSList   (QANCollection_SList&      theSL);
 // Standard_EXPORT void TestSequence(QANCollection_Sequence&   theSq);
 #include <QANCollection_FuncLists.hxx>
 
index b4fdcd57ce9ff75fd7b97d43ad15e96e698c9c8e..84b05479964c5c96cf81f178fafad478a3f875f6 100644 (file)
@@ -17,7 +17,6 @@
 #define QANCollection_PerfLists_HeaderFile
 
 #include <QANCollection_ListOfPnt.hxx>
-#include <QANCollection_SListOfPnt.hxx>
 #include <QANCollection_StackOfPnt.hxx>
 #include <TColgp_SequenceOfPnt.hxx>
 #include <TColStd_SetOfInteger.hxx>
@@ -273,78 +272,6 @@ void CompSet (const Standard_Integer theRep,
   PERF_PRINT_ALL
 }
 
-
-// ===================== Test perform of SList type ==========================
-void CompSList (const Standard_Integer theRep,
-                const Standard_Integer theSize)
-{
-  Standard_Integer i,j;
-
-  ////////////////////////////////Perf_Meter aNAppe ("NCollection_SList constructing",0);
-  ////////////////////////////////Perf_Meter aTAppe ("TCollection_SList constructing",0);
-  ////////////////////////////////Perf_Meter aNOper ("NCollection_SList operator=",0);
-  ////////////////////////////////Perf_Meter aTOper ("TCollection_SList operator=",0);
-  ////////////////////////////////Perf_Meter aNAssi ("NCollection_SList Assign",0);
-  ////////////////////////////////Perf_Meter aNClea ("NCollection_SList clearing",0);
-  ////////////////////////////////Perf_Meter aTClea ("TCollection_SList clearing",0);
-  for (i=0; i<theRep; i++)
-    {
-      ////////////////////////////////QANCollection_SList a1, a2;
-      QANCollection_SListPerf a1, a2;
-      ////////////////////////////////aNAppe.Start();
-      PERF_START_METER("NCollection_SList constructing")
-      for (j=1; j<=theSize; j++)
-      {
-        ItemType anItem;
-        Random(anItem);
-        a1.Construct(anItem);
-      }
-    ////////////////////////////////aNAppe.Stop();
-    PERF_STOP_METER("NCollection_SList constructing")
-    ////////////////////////////////aNOper.Start();
-    PERF_START_METER("NCollection_SList operator=")
-    a2 = a1;
-    ////////////////////////////////aNOper.Stop();
-    PERF_STOP_METER("NCollection_SList operator=")
-    ////////////////////////////////aNAssi.Start();
-    PERF_START_METER("NCollection_SList Assign")
-    a2.Assign(a1);
-    ////////////////////////////////aNAssi.Stop();
-    PERF_STOP_METER("NCollection_SList Assign")
-    ////////////////////////////////aNClea.Start();
-    PERF_START_METER("NCollection_SList clearing")
-    a2.Clear();
-    ////////////////////////////////aNClea.Stop();
-    PERF_STOP_METER("NCollection_SList clearing")
-  }
-
-  for (i=0; i<theRep; i++)
-    {
-      QANCollection_SListOfPnt a1, a2;
-      ////////////////////////////////aTAppe.Start();
-      PERF_START_METER("TCollection_SList constructing")
-      for (j=1; j<=theSize; j++)
-        {
-          ItemType anItem;
-          Random(anItem);
-          a1.Construct(anItem);
-        }
-      ////////////////////////////////aTAppe.Stop();
-      PERF_STOP_METER("TCollection_SList constructing")
-      ////////////////////////////////aTOper.Start();
-      PERF_START_METER("TCollection_SList operator=")
-      a2 = a1;
-      ////////////////////////////////aTOper.Stop();
-      PERF_STOP_METER("TCollection_SList operator=")
-      ////////////////////////////////aTClea.Start();
-      PERF_START_METER("TCollection_SList clearing")
-      a2.Clear();
-      ////////////////////////////////aTClea.Stop();
-      PERF_STOP_METER("TCollection_SList clearing")
-    }
-  PERF_PRINT_ALL
-}
-
 // ===================== Test perform of Sequence type ==========================
 void CompSequence (const Standard_Integer theRep,
                    const Standard_Integer theSize)
index 5c64cea3c45597f143276deda26bccd37088c0df..9a5728491c5dbfdc0a0b9cc18fddd201844389c2 100644 (file)
@@ -22,7 +22,7 @@
 --              Adding of modifying classes 
 --               - Sequence, HSequence
 --               - Set, HSet
---               - List, SList
+--               - List
 --               - Stack
 --               - BasicMap, BasicMapIterator
 --               - Map, DataMap, DoubleMap, IndexedMap, IndexedDataMap
@@ -58,9 +58,6 @@ is
     generic class List, ListNode, ListIterator;
        ---Purpose: A single list handled by value.
 
-    generic class SList,SListNode;
-       ---Purpose: A LISP like sharable list.
-
     class BaseSequence;
     class SeqNode;
     pointer SeqNodePtr to SeqNode from TCollection;
diff --git a/src/TCollection/TCollection_SList.cdl b/src/TCollection/TCollection_SList.cdl
deleted file mode 100644 (file)
index b0cb7e0..0000000
+++ /dev/null
@@ -1,202 +0,0 @@
--- Created on: 1993-02-26
--- Created by: Remi LEQUETTE
--- Copyright (c) 1993-1999 Matra Datavision
--- Copyright (c) 1999-2014 OPEN CASCADE SAS
---
--- This file is part of Open CASCADE Technology software library.
---
--- This library is free software; you can redistribute it and/or modify it under
--- the terms of the GNU Lesser General Public License version 2.1 as published
--- by the Free Software Foundation, with special exception defined in the file
--- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
--- distribution for complete text of the license and disclaimer of any warranty.
---
--- Alternatively, this file may be used under the terms of Open CASCADE
--- commercial license or contractual agreement.
-
-generic class SList from TCollection (Item as any)
-
-       ---Purpose: An SList is a LISP like list of Items.
-       -- An SList is :
-       --   . Empty.
-       --   . Or it has a Value and a  Tail  which is an other SList. 
-       -- 
-       -- The Tail of an empty list is an empty list.
-       -- SList are  shared.  It  means   that they  can  be
-       -- modified through other lists.
-       -- SList may  be used  as Iterators. They  have Next,
-       -- More, and value methods. To iterate on the content
-       -- of the list S just do.
-       -- 
-       -- SList Iterator;
-       -- for (Iterator = S; Iterator.More(); Iterator.Next())
-       --   X = Iterator.Value();
-       -- 
-        --  Memory usage  is  automatically managed for  SLists
-       --  (using reference counts).
-       ---Example:
-       -- If S1 and S2 are SLists :
-       -- if S1.Value() is X.
-       -- 
-       -- And the following is done :
-       -- S2 = S1;
-       -- S2.SetValue(Y);
-       -- 
-       -- S1.Value() becomes also Y.   So SList must be used
-       -- with   care.  Mainly  the SetValue()    method  is
-       -- dangerous. 
-
-raises
-    NoSuchObject from Standard
-    
-    class SListNode from TCollection
-    inherits TShared from MMgt
-    is
-       Create(I : Item; aTail :  SList from TCollection) returns mutable SListNode from TCollection;
-       ---C++:inline
-
-       Count(me) returns Integer;
-       ---C++:inline
-       ---C++: return &
-       
-       Tail(me) returns SList from TCollection;
-       ---C++:inline
-       ---C++: return &
-       
-       Value(me) returns Item;
-       ---C++:inline
-       ---C++: return &
-
-    fields
-       myTail :  SList from TCollection;
-       myValue : Item;
-    end;
-
-is
-    Create returns SList from TCollection;
-       ---Purpose: Creates an empty List.
-       
-    Create(anItem : Item; aTail : SList from TCollection)
-    returns SList from TCollection;
-       ---Purpose: Creates a List with <anItem> as value  and <aTail> as tail.
-       
-    Create(Other : SList from TCollection)
-    returns SList from TCollection;
-       ---Purpose: Creates a list from an other one. The lists  are shared. 
-       
-    Assign(me : in out; Other : SList from TCollection)
-    returns SList from TCollection
-        ---Level: Public
-       ---Purpose: Sets  a list  from  an  other  one. The  lists are
-       -- shared. The list itself is returned.
-       ---C++: alias operator =
-       ---C++: return &
-    is static;
-    
-    IsEmpty(me) returns Boolean
-        ---Level: Public
-       ---C++: inline
-    is static;
-    
-    Clear(me : in out)
-        ---Level: Public
-       ---Purpose: Sets the list to be empty.
-       ---C++: alias ~
-    is static;
-       
-    Value(me) returns any Item
-        ---Level: Public
-       ---Purpose: Returns the current value of the list. An error is
-       -- raised  if the list is empty.
-       ---C++: return const &
-    raises
-       NoSuchObject from Standard
-    is static;
-    
-    ChangeValue(me : in out) returns any Item
-        ---Level: Public
-       ---Purpose: Returns the current value of the list. An error is
-       -- raised if the  list  is empty.   This value may be
-       -- modified.   A   method modifying the  value can be
-       -- called. The value will be modified in the list.
-       ---Example: AList.ChangeValue().Modify()
-       ---C++: return &
-    raises
-       NoSuchObject from Standard
-    is static;
-    
-    SetValue(me : in out; anItem : Item)
-        ---Level: Public
-       ---Purpose: Changes the current value in the list. An error is
-       -- raised if the list is empty.
-    raises
-       NoSuchObject from Standard
-    is static;
-    
-    Tail(me) returns SList from TCollection
-        ---Level: Public
-       ---Purpose: Returns the current tail of  the list. On an empty
-       -- list the tail is the list itself.
-       ---C++: return const &
-    is static;
-    
-    ChangeTail(me : in out) returns SList from TCollection
-        ---Level: Public
-       ---Purpose: Returns the current  tail of the list.   This tail
-       -- may be modified.  A method modifying the  tail can
-       -- be called. The tail will be modified in the list.
-       ---Example: AList.ChangeTail().Modify()
-       ---C++: return &
-    is static;
-    
-    SetTail(me : in out; aList : SList from TCollection)
-        ---Level: Public
-       ---Purpose: Changes the current tail  in the list. On an empty
-       -- list SetTail is Assign.
-    is static;
-    
-    Construct(me : in out; anItem : Item)  
-        ---Level: Public
-       ---Purpose: Replaces the list by a list with <anItem> as Value
-       -- and the  list <me> as  tail.
-       ---C++: inline
-    is static;
-    
-    Constructed(me; anItem : Item) returns SList from TCollection
-        ---Level: Public
-       ---Purpose: Returns a new list  with  <anItem> as Value an the
-       -- list <me> as tail.
-       ---C++: inline
-    is static;
-    
-    ToTail(me :  in out)
-        ---Level: Public
-       ---Purpose: Replaces the list <me> by its tail.
-       ---C++: inline
-    is static;
-        
-    Initialize(me : in out; aList : SList from TCollection)
-        ---Level: Public
-       ---Purpose: Sets  the iterator  to iterate   on the content of
-       -- <aList>. This is Assign().
-       ---C++: inline
-    is static;
-    
-    More(me) returns Boolean
-        ---Level: Public
-       ---Purpose: Returns True if the iterator  has a current value.
-       -- This is !IsEmpty()
-       ---C++: inline
-    is static;
-    
-    Next(me : in out)
-        ---Level: Public
-       ---Purpose: Moves the iterator to the next object in the list.
-       -- If the iterator is empty it will  stay empty. This is ToTail()
-       ---C++: inline
-    is static;
-    
-fields
-    myNode : SListNode from TCollection;
-
-end SList;
diff --git a/src/TCollection/TCollection_SList.gxx b/src/TCollection/TCollection_SList.gxx
deleted file mode 100644 (file)
index f07f07b..0000000
+++ /dev/null
@@ -1,143 +0,0 @@
-// Created on: 1993-02-26
-// Created by: Remi LEQUETTE
-// Copyright (c) 1993-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-#include <Standard_NoSuchObject.hxx>
-
-//=======================================================================
-//function : TCollection_SList
-//purpose  : 
-//=======================================================================
-
-TCollection_SList::TCollection_SList()
-{}
-
-//=======================================================================
-//function : TCollection_SList
-//purpose  : 
-//=======================================================================
-
-TCollection_SList::TCollection_SList(const Item& anItem,
-                                    const TCollection_SList& aTail) : 
-       myNode(new TCollection_SListNode(anItem,aTail))
-{}
-
-//=======================================================================
-//function : TCollection_SList
-//purpose  : 
-//=======================================================================
-
-TCollection_SList::TCollection_SList(const TCollection_SList& Other) : 
-       myNode(Other.myNode)
-{
-}
-
-//=======================================================================
-//function : Assign
-//purpose  : 
-//=======================================================================
-
-TCollection_SList& TCollection_SList::Assign(const TCollection_SList& Other)
-{
-  if (this == &Other) return *this;
-  Clear();
-  myNode = Other.myNode;
-
-  return *this;
-}
-
-//=======================================================================
-//function : Clear
-//purpose  : 
-//=======================================================================
-
-void TCollection_SList::Clear()
-{
-  if (!myNode.IsNull()) {
-    myNode.Nullify();
-  }
-}
-
-//=======================================================================
-//function : Value
-//purpose  : 
-//=======================================================================
-
-const Item& TCollection_SList::Value() const
-{
-  Standard_NoSuchObject_Raise_if(myNode.IsNull(),"TCollection_SList::Value");
-  return myNode->Value();
-}
-
-//=======================================================================
-//function : ChangeValue
-//purpose  : 
-//=======================================================================
-
-Item& TCollection_SList::ChangeValue()
-{
-  Standard_NoSuchObject_Raise_if(myNode.IsNull(),"TCollection_SList::Value");
-  return myNode->Value();
-}
-
-//=======================================================================
-//function : SetValue
-//purpose  : 
-//=======================================================================
-
-void TCollection_SList::SetValue(const Item& anItem)
-{
-  Standard_NoSuchObject_Raise_if(myNode.IsNull(),"TCollection_SList::Value");
-  myNode->Value() = anItem;
-}
-
-//=======================================================================
-//function : Tail
-//purpose  : 
-//=======================================================================
-
-const TCollection_SList& TCollection_SList::Tail() const
-{
-  if (!myNode.IsNull()) 
-    return  myNode->Tail();
-  else
-    return *this;
-}
-
-//=======================================================================
-//function : ChangeTail
-//purpose  : 
-//=======================================================================
-
-TCollection_SList& TCollection_SList::ChangeTail()
-{
-  if (!myNode.IsNull()) 
-    return myNode->Tail();
-  else
-    return *this;
-}
-
-//=======================================================================
-//function : SetTail
-//purpose  : 
-//=======================================================================
-
-void TCollection_SList::SetTail(const TCollection_SList& aList)
-{
-  if (!myNode.IsNull())
-    myNode->Tail() = aList;
-  else
-    Assign(aList);
-}
diff --git a/src/TCollection/TCollection_SList.lxx b/src/TCollection/TCollection_SList.lxx
deleted file mode 100644 (file)
index 176f965..0000000
+++ /dev/null
@@ -1,90 +0,0 @@
-// Created on: 1993-02-26
-// Created by: Remi LEQUETTE
-// Copyright (c) 1993-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-//=======================================================================
-//function : IsEmpty
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean TCollection_SList::IsEmpty() const
-{
-  return myNode.IsNull();
-}
-
-//=======================================================================
-//function : Construct
-//purpose  : 
-//=======================================================================
-
-//=======================================================================
-//function : Construct
-//purpose  : 
-//=======================================================================
-
-inline void TCollection_SList::Construct(const Item& anItem)
-{
-  Assign(TCollection_SList(anItem,*this));
-}
-
-//=======================================================================
-//function : Constructed
-//purpose  : 
-//=======================================================================
-
-inline TCollection_SList TCollection_SList::Constructed(const Item& anItem) const
-{
-  return TCollection_SList(anItem,*this);
-}
-
-//=======================================================================
-//function : ToTail
-//purpose  : 
-//=======================================================================
-
-inline void TCollection_SList::ToTail()
-{
-  Assign(Tail());
-}
-
-//=======================================================================
-//function : Initialize
-//purpose  : 
-//=======================================================================
-
-inline void TCollection_SList::Initialize(const TCollection_SList& aList)
-{
-  Assign(aList);
-}
-
-//=======================================================================
-//function : More
-//purpose  : 
-//=======================================================================
-
-inline Standard_Boolean TCollection_SList::More() const
-{
-  return !IsEmpty();
-}
-
-//=======================================================================
-//function : Next
-//purpose  : 
-//=======================================================================
-
-inline void TCollection_SList::Next()
-{
-  ToTail();
-}
diff --git a/src/TCollection/TCollection_SListNode.gxx b/src/TCollection/TCollection_SListNode.gxx
deleted file mode 100644 (file)
index df42f61..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-// Copyright (c) 1998-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
diff --git a/src/TCollection/TCollection_SListNode.lxx b/src/TCollection/TCollection_SListNode.lxx
deleted file mode 100644 (file)
index 1d2c794..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-// Copyright (c) 1998-1999 Matra Datavision
-// Copyright (c) 1999-2014 OPEN CASCADE SAS
-//
-// This file is part of Open CASCADE Technology software library.
-//
-// This library is free software; you can redistribute it and/or modify it under
-// the terms of the GNU Lesser General Public License version 2.1 as published
-// by the Free Software Foundation, with special exception defined in the file
-// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
-// distribution for complete text of the license and disclaimer of any warranty.
-//
-// Alternatively, this file may be used under the terms of Open CASCADE
-// commercial license or contractual agreement.
-
-inline TCollection_SListNode::TCollection_SListNode(const Item& I, const TCollection_SList& T) 
-: myTail(T),myValue(I) 
-{
-}
-
-inline TCollection_SList& TCollection_SListNode::Tail() const
-{
-  return (TCollection_SList&)myTail;
-}
-
-inline Item& TCollection_SListNode::Value() const
-{
-  return (Item&)myValue;
-}
-
index 9a17cd95e2321d678a90137a4c6ec94cba13ff4b..17fa1e7c363df05bec9b3436c000038036aba7c4 100644 (file)
@@ -42,9 +42,8 @@ is
        ---Purpose: Used to implement  the Location. A  Datum3D with a
        --          power elevation.
        
-    private class SListOfItemLocation instantiates 
-       SList from TCollection(ItemLocation from TopLoc);
-       ---Purpose: Used to implement the Location.
+    private class SListOfItemLocation;
+    private class SListNodeOfItemLocation;
     
     class Location;
        ---Purpose: A  Local Coordinate System.   A list of elementary
diff --git a/src/TopLoc/TopLoc_SListNodeOfItemLocation.cdl b/src/TopLoc/TopLoc_SListNodeOfItemLocation.cdl
new file mode 100644 (file)
index 0000000..46d978b
--- /dev/null
@@ -0,0 +1,45 @@
+-- Created on: 1993-02-26
+-- Created by: Remi LEQUETTE
+-- Copyright (c) 1993-1999 Matra Datavision
+-- Copyright (c) 1999-2014 OPEN CASCADE SAS
+--
+-- This file is part of Open CASCADE Technology software library.
+--
+-- This library is free software; you can redistribute it and/or modify it under
+-- the terms of the GNU Lesser General Public License version 2.1 as published
+-- by the Free Software Foundation, with special exception defined in the file
+-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+-- distribution for complete text of the license and disclaimer of any warranty.
+--
+-- Alternatively, this file may be used under the terms of Open CASCADE
+-- commercial license or contractual agreement.
+
+private class SListNodeOfItemLocation from TopLoc inherits TShared from MMgt
+
+uses
+    SListOfItemLocation from TopLoc,
+    ItemLocation        from TopLoc
+    
+is
+   Create(I : ItemLocation from TopLoc; aTail :  SListOfItemLocation from TopLoc) returns mutable SListNodeOfItemLocation from TopLoc;
+   ---C++:inline
+
+   Count(me) returns Integer;
+   ---C++:inline
+   ---C++: return &
+   
+   Tail(me) returns SListOfItemLocation from TopLoc;
+   ---C++:inline
+   ---C++: return &
+   
+   Value(me) returns ItemLocation from TopLoc;
+   ---C++:inline
+   ---C++: return &
+
+fields
+
+    myTail :  SListOfItemLocation from TopLoc;
+    myValue : ItemLocation from TopLoc;
+    
+end;
+
diff --git a/src/TopLoc/TopLoc_SListNodeOfItemLocation.cxx b/src/TopLoc/TopLoc_SListNodeOfItemLocation.cxx
new file mode 100644 (file)
index 0000000..0dd683f
--- /dev/null
@@ -0,0 +1,16 @@
+// Copyright (c) 1998-1999 Matra Datavision
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#include <TopLoc_SListNodeOfItemLocation.ixx>
+
diff --git a/src/TopLoc/TopLoc_SListNodeOfItemLocation.lxx b/src/TopLoc/TopLoc_SListNodeOfItemLocation.lxx
new file mode 100644 (file)
index 0000000..87ef38d
--- /dev/null
@@ -0,0 +1,31 @@
+// Copyright (c) 1998-1999 Matra Datavision
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#include <TopLoc_ItemLocation.hxx>
+
+inline TopLoc_SListNodeOfItemLocation::TopLoc_SListNodeOfItemLocation(const TopLoc_ItemLocation& I, const TopLoc_SListOfItemLocation& T) 
+: myTail(T),myValue(I) 
+{
+}
+
+inline TopLoc_SListOfItemLocation& TopLoc_SListNodeOfItemLocation::Tail() const
+{
+  return (TopLoc_SListOfItemLocation&)myTail;
+}
+
+inline TopLoc_ItemLocation& TopLoc_SListNodeOfItemLocation::Value() const
+{
+  return (TopLoc_ItemLocation&)myValue;
+}
+
diff --git a/src/TopLoc/TopLoc_SListOfItemLocation.cdl b/src/TopLoc/TopLoc_SListOfItemLocation.cdl
new file mode 100644 (file)
index 0000000..d2386a4
--- /dev/null
@@ -0,0 +1,183 @@
+-- Created on: 1993-02-26
+-- Created by: Remi LEQUETTE
+-- Copyright (c) 1993-1999 Matra Datavision
+-- Copyright (c) 1999-2014 OPEN CASCADE SAS
+--
+-- This file is part of Open CASCADE Technology software library.
+--
+-- This library is free software; you can redistribute it and/or modify it under
+-- the terms of the GNU Lesser General Public License version 2.1 as published
+-- by the Free Software Foundation, with special exception defined in the file
+-- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+-- distribution for complete text of the license and disclaimer of any warranty.
+--
+-- Alternatively, this file may be used under the terms of Open CASCADE
+-- commercial license or contractual agreement.
+
+private class SListOfItemLocation from TopLoc
+
+       ---Purpose: An SListOfItemLocation is a LISP like list of Items.
+       -- An SListOfItemLocation is :
+       --   . Empty.
+       --   . Or it has a Value and a  Tail  which is an other SListOfItemLocation. 
+       -- 
+       -- The Tail of an empty list is an empty list.
+       -- SListOfItemLocation are  shared.  It  means   that they  can  be
+       -- modified through other lists.
+       -- SListOfItemLocation may  be used  as Iterators. They  have Next,
+       -- More, and value methods. To iterate on the content
+       -- of the list S just do.
+       -- 
+       -- SListOfItemLocation Iterator;
+       -- for (Iterator = S; Iterator.More(); Iterator.Next())
+       --   X = Iterator.Value();
+       -- 
+        --  Memory usage  is  automatically managed for  SListOfItemLocations
+       --  (using reference counts).
+       ---Example:
+       -- If S1 and S2 are SListOfItemLocations :
+       -- if S1.Value() is X.
+       -- 
+       -- And the following is done :
+       -- S2 = S1;
+       -- S2.SetValue(Y);
+       -- 
+       -- S1.Value() becomes also Y.   So SListOfItemLocation must be used
+       -- with   care.  Mainly  the SetValue()    method  is
+       -- dangerous. 
+
+uses
+    SListNodeOfItemLocation from TopLoc,
+    ItemLocation            from TopLoc
+    
+raises
+    NoSuchObject from Standard
+
+is
+    Create returns SListOfItemLocation from TopLoc;
+       ---Purpose: Creates an empty List.
+       
+    Create(anItem : ItemLocation from TopLoc; aTail : SListOfItemLocation from TopLoc)
+    returns SListOfItemLocation from TopLoc;
+       ---Purpose: Creates a List with <anItem> as value  and <aTail> as tail.
+       
+    Create(Other : SListOfItemLocation from TopLoc)
+    returns SListOfItemLocation from TopLoc;
+       ---Purpose: Creates a list from an other one. The lists  are shared. 
+       
+    Assign(me : in out; Other : SListOfItemLocation from TopLoc)
+    returns SListOfItemLocation from TopLoc
+        ---Level: Public
+       ---Purpose: Sets  a list  from  an  other  one. The  lists are
+       -- shared. The list itself is returned.
+       ---C++: alias operator =
+       ---C++: return &
+    is static;
+    
+    IsEmpty(me) returns Boolean
+        ---Level: Public
+       ---C++: inline
+    is static;
+    
+    Clear(me : in out)
+        ---Level: Public
+       ---Purpose: Sets the list to be empty.
+       ---C++: alias ~
+    is static;
+       
+    Value(me) returns any ItemLocation from TopLoc
+        ---Level: Public
+       ---Purpose: Returns the current value of the list. An error is
+       -- raised  if the list is empty.
+       ---C++: return const &
+    raises
+       NoSuchObject from Standard
+    is static;
+    
+    ChangeValue(me : in out) returns any ItemLocation from TopLoc
+        ---Level: Public
+       ---Purpose: Returns the current value of the list. An error is
+       -- raised if the  list  is empty.   This value may be
+       -- modified.   A   method modifying the  value can be
+       -- called. The value will be modified in the list.
+       ---Example: AList.ChangeValue().Modify()
+       ---C++: return &
+    raises
+       NoSuchObject from Standard
+    is static;
+    
+    SetValue(me : in out; anItem : ItemLocation from TopLoc)
+        ---Level: Public
+       ---Purpose: Changes the current value in the list. An error is
+       -- raised if the list is empty.
+    raises
+       NoSuchObject from Standard
+    is static;
+    
+    Tail(me) returns SListOfItemLocation from TopLoc
+        ---Level: Public
+       ---Purpose: Returns the current tail of  the list. On an empty
+       -- list the tail is the list itself.
+       ---C++: return const &
+    is static;
+    
+    ChangeTail(me : in out) returns SListOfItemLocation from TopLoc
+        ---Level: Public
+       ---Purpose: Returns the current  tail of the list.   This tail
+       -- may be modified.  A method modifying the  tail can
+       -- be called. The tail will be modified in the list.
+       ---Example: AList.ChangeTail().Modify()
+       ---C++: return &
+    is static;
+    
+    SetTail(me : in out; aList : SListOfItemLocation from TopLoc)
+        ---Level: Public
+       ---Purpose: Changes the current tail  in the list. On an empty
+       -- list SetTail is Assign.
+    is static;
+    
+    Construct(me : in out; anItem : ItemLocation from TopLoc)  
+        ---Level: Public
+       ---Purpose: Replaces the list by a list with <anItem> as Value
+       -- and the  list <me> as  tail.
+       ---C++: inline
+    is static;
+    
+    Constructed(me; anItem : ItemLocation from TopLoc) returns SListOfItemLocation from TopLoc
+        ---Level: Public
+       ---Purpose: Returns a new list  with  <anItem> as Value an the
+       -- list <me> as tail.
+       ---C++: inline
+    is static;
+    
+    ToTail(me :  in out)
+        ---Level: Public
+       ---Purpose: Replaces the list <me> by its tail.
+       ---C++: inline
+    is static;
+        
+    Initialize(me : in out; aList : SListOfItemLocation from TopLoc)
+        ---Level: Public
+       ---Purpose: Sets  the iterator  to iterate   on the content of
+       -- <aList>. This is Assign().
+       ---C++: inline
+    is static;
+    
+    More(me) returns Boolean
+        ---Level: Public
+       ---Purpose: Returns True if the iterator  has a current value.
+       -- This is !IsEmpty()
+       ---C++: inline
+    is static;
+    
+    Next(me : in out)
+        ---Level: Public
+       ---Purpose: Moves the iterator to the next object in the list.
+       -- If the iterator is empty it will  stay empty. This is ToTail()
+       ---C++: inline
+    is static;
+    
+fields
+    myNode : SListNodeOfItemLocation from TopLoc;
+
+end SListOfItemLocation;
diff --git a/src/TopLoc/TopLoc_SListOfItemLocation.cxx b/src/TopLoc/TopLoc_SListOfItemLocation.cxx
new file mode 100644 (file)
index 0000000..63fed01
--- /dev/null
@@ -0,0 +1,145 @@
+// Created on: 1993-02-26
+// Created by: Remi LEQUETTE
+// Copyright (c) 1993-1999 Matra Datavision
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+#include <TopLoc_SListOfItemLocation.ixx>
+
+#include <Standard_NoSuchObject.hxx>
+
+//=======================================================================
+//function : TopLoc_SListOfItemLocation
+//purpose  : 
+//=======================================================================
+
+TopLoc_SListOfItemLocation::TopLoc_SListOfItemLocation()
+{}
+
+//=======================================================================
+//function : TopLoc_SListOfItemLocation
+//purpose  : 
+//=======================================================================
+
+TopLoc_SListOfItemLocation::TopLoc_SListOfItemLocation(const TopLoc_ItemLocation& anItem,
+                                    const TopLoc_SListOfItemLocation& aTail) : 
+       myNode(new TopLoc_SListNodeOfItemLocation(anItem,aTail))
+{}
+
+//=======================================================================
+//function : TopLoc_SListOfItemLocation
+//purpose  : 
+//=======================================================================
+
+TopLoc_SListOfItemLocation::TopLoc_SListOfItemLocation(const TopLoc_SListOfItemLocation& Other) : 
+       myNode(Other.myNode)
+{
+}
+
+//=======================================================================
+//function : Assign
+//purpose  : 
+//=======================================================================
+
+TopLoc_SListOfItemLocation& TopLoc_SListOfItemLocation::Assign(const TopLoc_SListOfItemLocation& Other)
+{
+  if (this == &Other) return *this;
+  Clear();
+  myNode = Other.myNode;
+
+  return *this;
+}
+
+//=======================================================================
+//function : Clear
+//purpose  : 
+//=======================================================================
+
+void TopLoc_SListOfItemLocation::Clear()
+{
+  if (!myNode.IsNull()) {
+    myNode.Nullify();
+  }
+}
+
+//=======================================================================
+//function : Value
+//purpose  : 
+//=======================================================================
+
+const TopLoc_ItemLocation& TopLoc_SListOfItemLocation::Value() const
+{
+  Standard_NoSuchObject_Raise_if(myNode.IsNull(),"TopLoc_SListOfItemLocation::Value");
+  return myNode->Value();
+}
+
+//=======================================================================
+//function : ChangeValue
+//purpose  : 
+//=======================================================================
+
+TopLoc_ItemLocation& TopLoc_SListOfItemLocation::ChangeValue()
+{
+  Standard_NoSuchObject_Raise_if(myNode.IsNull(),"TopLoc_SListOfItemLocation::Value");
+  return myNode->Value();
+}
+
+//=======================================================================
+//function : SetValue
+//purpose  : 
+//=======================================================================
+
+void TopLoc_SListOfItemLocation::SetValue(const TopLoc_ItemLocation& anItem)
+{
+  Standard_NoSuchObject_Raise_if(myNode.IsNull(),"TopLoc_SListOfItemLocation::Value");
+  myNode->Value() = anItem;
+}
+
+//=======================================================================
+//function : Tail
+//purpose  : 
+//=======================================================================
+
+const TopLoc_SListOfItemLocation& TopLoc_SListOfItemLocation::Tail() const
+{
+  if (!myNode.IsNull()) 
+    return  myNode->Tail();
+  else
+    return *this;
+}
+
+//=======================================================================
+//function : ChangeTail
+//purpose  : 
+//=======================================================================
+
+TopLoc_SListOfItemLocation& TopLoc_SListOfItemLocation::ChangeTail()
+{
+  if (!myNode.IsNull()) 
+    return myNode->Tail();
+  else
+    return *this;
+}
+
+//=======================================================================
+//function : SetTail
+//purpose  : 
+//=======================================================================
+
+void TopLoc_SListOfItemLocation::SetTail(const TopLoc_SListOfItemLocation& aList)
+{
+  if (!myNode.IsNull())
+    myNode->Tail() = aList;
+  else
+    Assign(aList);
+}
diff --git a/src/TopLoc/TopLoc_SListOfItemLocation.lxx b/src/TopLoc/TopLoc_SListOfItemLocation.lxx
new file mode 100644 (file)
index 0000000..cfc2839
--- /dev/null
@@ -0,0 +1,90 @@
+// Created on: 1993-02-26
+// Created by: Remi LEQUETTE
+// Copyright (c) 1993-1999 Matra Datavision
+// Copyright (c) 1999-2014 OPEN CASCADE SAS
+//
+// This file is part of Open CASCADE Technology software library.
+//
+// This library is free software; you can redistribute it and/or modify it under
+// the terms of the GNU Lesser General Public License version 2.1 as published
+// by the Free Software Foundation, with special exception defined in the file
+// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
+// distribution for complete text of the license and disclaimer of any warranty.
+//
+// Alternatively, this file may be used under the terms of Open CASCADE
+// commercial license or contractual agreement.
+
+//=======================================================================
+//function : IsEmpty
+//purpose  : 
+//=======================================================================
+
+inline Standard_Boolean TopLoc_SListOfItemLocation::IsEmpty() const
+{
+  return myNode.IsNull();
+}
+
+//=======================================================================
+//function : Construct
+//purpose  : 
+//=======================================================================
+
+//=======================================================================
+//function : Construct
+//purpose  : 
+//=======================================================================
+
+inline void TopLoc_SListOfItemLocation::Construct(const TopLoc_ItemLocation& anItem)
+{
+  Assign(TopLoc_SListOfItemLocation(anItem,*this));
+}
+
+//=======================================================================
+//function : Constructed
+//purpose  : 
+//=======================================================================
+
+inline TopLoc_SListOfItemLocation TopLoc_SListOfItemLocation::Constructed(const TopLoc_ItemLocation& anItem) const
+{
+  return TopLoc_SListOfItemLocation(anItem,*this);
+}
+
+//=======================================================================
+//function : ToTail
+//purpose  : 
+//=======================================================================
+
+inline void TopLoc_SListOfItemLocation::ToTail()
+{
+  Assign(Tail());
+}
+
+//=======================================================================
+//function : Initialize
+//purpose  : 
+//=======================================================================
+
+inline void TopLoc_SListOfItemLocation::Initialize(const TopLoc_SListOfItemLocation& aList)
+{
+  Assign(aList);
+}
+
+//=======================================================================
+//function : More
+//purpose  : 
+//=======================================================================
+
+inline Standard_Boolean TopLoc_SListOfItemLocation::More() const
+{
+  return !IsEmpty();
+}
+
+//=======================================================================
+//function : Next
+//purpose  : 
+//=======================================================================
+
+inline void TopLoc_SListOfItemLocation::Next()
+{
+  ToTail();
+}