1 // SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes.
3 // Copyright (C) 2003 CEA/DEN, EDF R&D
7 // File : DataFlowBase_InDataStreamPort.cxx
8 // Author : Jean Rahuel
14 #include "DataFlowBase_InDataStreamPort.hxx"
16 GraphBase::InDataStreamPort::InDataStreamPort() :
17 GraphBase::InPort::InPort() {
18 _KindOfSchema = SUPERV::SCHENULL ;
19 _KindOfInterpolation = SUPERV::INTERNULL ;
20 _KindOfExtrapolation = SUPERV::EXTRANULL ;
21 cdebug << "GraphBase::InDataStreamPort::InDataStreamPort " << this << " " << PortName() << " " << _KindOfSchema << " " << _KindOfInterpolation
22 << " " << _KindOfExtrapolation << endl ;
25 GraphBase::InDataStreamPort::InDataStreamPort(
26 const char *const * NodeName ,
27 const SALOME_ModuleCatalog::ServicesParameter aserviceParameter ,
28 const SALOME_ModuleCatalog::DataStreamDependency aDependency ,
29 const SUPERV::KindOfSchema aKindOfSchema ,
30 const SUPERV::KindOfInterpolation aKindOfInterpolation ,
31 const SUPERV::KindOfExtrapolation aKindOfExtrapolation ) :
32 InPort( NodeName , aserviceParameter , SUPERV::DataStreamParameter , aDependency ) {
33 if ( aDependency == SALOME_ModuleCatalog::DATASTREAM_TEMPORAL ) {
34 _KindOfSchema = aKindOfSchema ;
35 _KindOfInterpolation = aKindOfInterpolation ;
36 _KindOfExtrapolation = aKindOfExtrapolation ;
39 _KindOfSchema = SUPERV::SCHENULL ;
40 _KindOfInterpolation = SUPERV::INTERNULL ;
41 _KindOfExtrapolation = SUPERV::EXTRANULL ;
43 cdebug << "GraphBase::InDataStreamPort::InDataStreamPort " << this << " " << PortName() << " " << _KindOfSchema << " " << _KindOfInterpolation
44 << " " << _KindOfExtrapolation << endl ;
47 GraphBase::InDataStreamPort::~InDataStreamPort() {
48 cdebug << "GraphBase::InDataStreamPort::~InDataStreamPort " << this << endl ;
51 bool GraphBase::InDataStreamPort::SetParams( const SUPERV::KindOfSchema aKindOfSchema ,
52 const SUPERV::KindOfInterpolation aKindOfInterpolation ,
53 const SUPERV::KindOfExtrapolation aKindOfExtrapolation ) {
55 if ( Dependency() == SALOME_ModuleCatalog::DATASTREAM_TEMPORAL ) {
56 _KindOfSchema = aKindOfSchema ;
57 _KindOfInterpolation = aKindOfInterpolation ;
58 _KindOfExtrapolation = aKindOfExtrapolation ;
61 _KindOfSchema = SUPERV::SCHENULL ;
62 _KindOfInterpolation = SUPERV::INTERNULL ;
63 _KindOfExtrapolation = SUPERV::EXTRANULL ;
66 cdebug << "GraphBase::InDataStreamPort::SetParams RetVal " << RetVal << " " << PortName() << " " << _KindOfSchema << " "
67 << _KindOfInterpolation << " " << _KindOfExtrapolation << endl ;
71 void GraphBase::InDataStreamPort::Params( SUPERV::KindOfSchema & aKindOfSchema ,
72 SUPERV::KindOfInterpolation & aKindOfInterpolation ,
73 SUPERV::KindOfExtrapolation & aKindOfExtrapolation ) const {
74 aKindOfSchema = _KindOfSchema ;
75 aKindOfInterpolation = _KindOfInterpolation ;
76 aKindOfExtrapolation = _KindOfExtrapolation ;
77 cdebug << "GraphBase::InDataStreamPort::Params " << PortName() << " " << _KindOfSchema << " " << _KindOfInterpolation << " "
78 << _KindOfExtrapolation << endl ;
81 ostream & operator<< (ostream & f ,const SUPERV::KindOfSchema & s ) {
83 case SUPERV::SCHENULL :
96 f << "UndefinedKindOfSchema";
103 ostream & operator<< (ostream & f ,const SUPERV::KindOfInterpolation & s ) {
105 case SUPERV::INTERNULL :
115 f << "UndefinedKindOfInterpolation";
122 ostream & operator<< (ostream & f ,const SUPERV::KindOfExtrapolation & s ) {
124 case SUPERV::EXTRANULL :
134 f << "UndefinedKindOfExtrapolation";