+++ /dev/null
-// Created on: 1991-09-10
-// Created by: Denis PASCAL
-// Copyright (c) 1991-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.
-
-// <dp>
-
-#include <Standard_NoSuchObject.hxx>
-#include <Standard_NoMoreObject.hxx>
-#include <GraphDS_DataMapIteratorOfEntityRoleMap.hxx>
-
-//=======================================================================
-//function : GraphDS_EntitiesIterator
-//purpose :
-//=======================================================================
-
-GraphDS_EntitiesIterator::GraphDS_EntitiesIterator ()
-{
-}
-
-//=======================================================================
-//function : GraphDS_EntitiesIterator
-//purpose :
-//=======================================================================
-
-GraphDS_EntitiesIterator::GraphDS_EntitiesIterator
- (const GraphDS_RelationGraph& G)
-{
- Initialize (G);
-}
-
-//=======================================================================
-//function : GraphDS_EntitiesIterator
-//purpose :
-//=======================================================================
-
-GraphDS_EntitiesIterator::GraphDS_EntitiesIterator
- (const GraphDS_RelationGraph& G,
- const Handle(GraphDS_Entity)& E)
-{
- Initialize (G,E);
-}
-
-
-//=======================================================================
-//function : GraphDS_EntitiesIterator
-//purpose :
-//=======================================================================
-
-GraphDS_EntitiesIterator::GraphDS_EntitiesIterator
- (const GraphDS_RelationGraph& G,
- const Handle(GraphDS_Relation)& R)
-{
- Initialize (G,R);
-}
-
-
-//=======================================================================
-//function : Initialize
-//purpose :
-//=======================================================================
-
-void GraphDS_EntitiesIterator::Initialize
- (const GraphDS_RelationGraph& G)
-{
- myEntities.Initialize(G.myEntities);
-}
-
-
-//=======================================================================
-//function : Initialize
-//purpose : adjacent entities search
-//=======================================================================
-
-void GraphDS_EntitiesIterator::Initialize
- (const GraphDS_RelationGraph&,
- const Handle(GraphDS_Entity)& E)
-{
- myMap.Clear();
-
- Handle(GraphDS_Relation) REL;
- GraphDS_DataMapIteratorOfEntityRoleMap itv;
- TColStd_MapIteratorOfMapOfTransient itr;
-
- for (itr.Initialize(E->GetRelations());itr.More();itr.Next()) {
- REL = Handle(GraphDS_Relation)::DownCast(itr.Key());
- if (REL->IsInput(E)) {
- for (itv.Initialize(REL->GetEntities());itv.More();itv.Next()) {
- if (itv.Value() != GraphDS_OnlyInput) {
- myMap.Add(itv.Key());
- }
- }
- }
- }
- myEntities.Initialize(myMap);
-}
-
-
-//=======================================================================
-//function : Initialize
-//purpose :
-//=======================================================================
-
-void GraphDS_EntitiesIterator::Initialize
- (const GraphDS_RelationGraph&,
- const Handle(GraphDS_Relation)& R)
-{
- myMap.Clear();
- GraphDS_DataMapIteratorOfEntityRoleMap itv;
- for (itv.Initialize(R->GetEntities());itv.More();itv.Next()) {
- myMap.Add(itv.Key());
- }
- myEntities.Initialize(myMap);
-}
-
-
-//=======================================================================
-//function : More
-//purpose :
-//=======================================================================
-
-Standard_Boolean GraphDS_EntitiesIterator::More () const
-{
- return myEntities.More();
-}
-
-
-//=======================================================================
-//function : Next
-//purpose :
-//=======================================================================
-
-void GraphDS_EntitiesIterator::Next ()
-{
- myEntities.Next();
-}
-
-
-//=======================================================================
-//function : Value
-//purpose :
-//=======================================================================
-
-const Handle(GraphDS_Entity)& GraphDS_EntitiesIterator::Value () const
-{
- return *((Handle(GraphDS_Entity)*)& myEntities.Key());
- //return Handle(GraphDS_Entity)::DownCast(myEntities.Key());
-}
-
-
-
-
-
-