mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-05-16 10:54:53 +03:00
159 lines
4.1 KiB
Plaintext
Executable File
159 lines
4.1 KiB
Plaintext
Executable File
// Created on: 1991-05-29
|
|
// Created by: Denis PASCAL
|
|
// Copyright (c) 1991-1999 Matra Datavision
|
|
// Copyright (c) 1999-2012 OPEN CASCADE SAS
|
|
//
|
|
// The content of this file is subject to the Open CASCADE Technology Public
|
|
// License Version 6.5 (the "License"). You may not use the content of this file
|
|
// except in compliance with the License. Please obtain a copy of the License
|
|
// at http://www.opencascade.org and read it completely before using this file.
|
|
//
|
|
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
|
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
|
//
|
|
// The Original Code and all software distributed under the License is
|
|
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
|
// Initial Developer hereby disclaims all such warranties, including without
|
|
// limitation, any warranties of merchantability, fitness for a particular
|
|
// purpose or non-infringement. Please see the License for the specific terms
|
|
// and conditions governing the rights and limitations under the License.
|
|
|
|
// <dp>
|
|
|
|
|
|
//=======================================================================
|
|
//function : GraphTools_TopologicalSortIterator
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
GraphTools_TopologicalSortIterator::GraphTools_TopologicalSortIterator ()
|
|
{}
|
|
|
|
|
|
//=======================================================================
|
|
//function : GraphTools_TopologicalSortIterator
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
GraphTools_TopologicalSortIterator::GraphTools_TopologicalSortIterator
|
|
(const Graph& G)
|
|
{
|
|
FromGraph (G);
|
|
}
|
|
|
|
|
|
//=======================================================================
|
|
//function : FromVertex
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
void GraphTools_TopologicalSortIterator::FromVertex
|
|
(const Vertex& V)
|
|
{
|
|
myIterator.FromVertex(V);
|
|
}
|
|
|
|
|
|
//=======================================================================
|
|
//function : FromGraph
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
void GraphTools_TopologicalSortIterator::FromGraph
|
|
(const Graph& G)
|
|
{
|
|
for ( GIterator it (G); it.More(); it.Next() ) {
|
|
myIterator.FromVertex(it.Value());
|
|
}
|
|
}
|
|
|
|
|
|
//=======================================================================
|
|
//function : Perform
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
void GraphTools_TopologicalSortIterator::Perform
|
|
(const Graph& G,
|
|
const Standard_Boolean ignoreSelfLoops,
|
|
const Standard_Boolean processCycle)
|
|
{
|
|
myIterator.Perform(G,ignoreSelfLoops,processCycle);
|
|
}
|
|
|
|
|
|
//=======================================================================
|
|
//function : Reset
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
void GraphTools_TopologicalSortIterator::Reset ()
|
|
{
|
|
myIterator.Reset();
|
|
}
|
|
|
|
|
|
//=======================================================================
|
|
//function : More
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
Standard_Boolean GraphTools_TopologicalSortIterator::More () const
|
|
{
|
|
return myIterator.More();
|
|
}
|
|
|
|
|
|
//=======================================================================
|
|
//function : Next
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
void GraphTools_TopologicalSortIterator::Next ()
|
|
{
|
|
myIterator.Next();
|
|
}
|
|
|
|
|
|
//=======================================================================
|
|
//function : Value
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
const Vertex& GraphTools_TopologicalSortIterator::Value () const
|
|
{
|
|
return myIterator.Value();
|
|
}
|
|
|
|
|
|
//=======================================================================
|
|
//function : IsInCycle
|
|
//purpose :
|
|
//=======================================================================
|
|
|
|
Standard_Boolean GraphTools_TopologicalSortIterator::IsInCycle () const
|
|
{
|
|
return myIterator.IsInCycle();
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|