1 // SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes.
3 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : DataFlowBase_InDataStreamPort.cxx
23 // Author : Jean Rahuel
28 #include "DataFlowBase_InDataStreamPort.hxx"
30 GraphBase::InDataStreamPort::InDataStreamPort() :
31 GraphBase::InPort::InPort() {
32 _KindOfSchema = SUPERV::SCHENULL ;
33 _KindOfInterpolation = SUPERV::INTERNULL ;
34 _KindOfExtrapolation = SUPERV::EXTRANULL ;
35 cdebug << "GraphBase::InDataStreamPort::InDataStreamPort " << this << " " << PortName() << " " << _KindOfSchema << " " << _KindOfInterpolation
36 << " " << _KindOfExtrapolation << endl ;
39 GraphBase::InDataStreamPort::InDataStreamPort(
40 const char *const * NodeName ,
41 const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ,
42 const SALOME_ModuleCatalog::DataStreamDependency aDependency ,
43 const SUPERV::KindOfSchema aKindOfSchema ,
44 const SUPERV::KindOfInterpolation aKindOfInterpolation ,
45 const SUPERV::KindOfExtrapolation aKindOfExtrapolation ) :
46 InPort( NodeName , aserviceParameter , SUPERV::DataStreamParameter , aDependency ) {
47 if ( aDependency == SALOME_ModuleCatalog::DATASTREAM_TEMPORAL ) {
48 _KindOfSchema = aKindOfSchema ;
49 _KindOfInterpolation = aKindOfInterpolation ;
50 _KindOfExtrapolation = aKindOfExtrapolation ;
53 _KindOfSchema = SUPERV::SCHENULL ;
54 _KindOfInterpolation = SUPERV::INTERNULL ;
55 _KindOfExtrapolation = SUPERV::EXTRANULL ;
57 cdebug << "GraphBase::InDataStreamPort::InDataStreamPort " << this << " " << PortName() << " " << _KindOfSchema << " " << _KindOfInterpolation
58 << " " << _KindOfExtrapolation << endl ;
61 GraphBase::InDataStreamPort::~InDataStreamPort() {
62 cdebug << "GraphBase::InDataStreamPort::~InDataStreamPort " << this << endl ;
65 bool GraphBase::InDataStreamPort::SetParams( const SUPERV::KindOfSchema aKindOfSchema ,
66 const SUPERV::KindOfInterpolation aKindOfInterpolation ,
67 const SUPERV::KindOfExtrapolation aKindOfExtrapolation ) {
69 if ( Dependency() == SALOME_ModuleCatalog::DATASTREAM_TEMPORAL ) {
70 _KindOfSchema = aKindOfSchema ;
71 _KindOfInterpolation = aKindOfInterpolation ;
72 _KindOfExtrapolation = aKindOfExtrapolation ;
75 _KindOfSchema = SUPERV::SCHENULL ;
76 _KindOfInterpolation = SUPERV::INTERNULL ;
77 _KindOfExtrapolation = SUPERV::EXTRANULL ;
80 cdebug << "GraphBase::InDataStreamPort::SetParams RetVal " << RetVal << " " << PortName() << " " << _KindOfSchema << " "
81 << _KindOfInterpolation << " " << _KindOfExtrapolation << endl ;
85 void GraphBase::InDataStreamPort::Params( SUPERV::KindOfSchema & aKindOfSchema ,
86 SUPERV::KindOfInterpolation & aKindOfInterpolation ,
87 SUPERV::KindOfExtrapolation & aKindOfExtrapolation ) const {
88 aKindOfSchema = _KindOfSchema ;
89 aKindOfInterpolation = _KindOfInterpolation ;
90 aKindOfExtrapolation = _KindOfExtrapolation ;
91 cdebug << "GraphBase::InDataStreamPort::Params " << PortName() << " " << _KindOfSchema << " " << _KindOfInterpolation << " "
92 << _KindOfExtrapolation << endl ;
95 ostream & operator<< (ostream & f ,const SUPERV::KindOfSchema & s ) {
97 case SUPERV::SCHENULL :
110 f << "UndefinedKindOfSchema";
117 ostream & operator<< (ostream & f ,const SUPERV::KindOfInterpolation & s ) {
119 case SUPERV::INTERNULL :
129 f << "UndefinedKindOfInterpolation";
136 ostream & operator<< (ostream & f ,const SUPERV::KindOfExtrapolation & s ) {
138 case SUPERV::EXTRANULL :
148 f << "UndefinedKindOfExtrapolation";