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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
24 // File : DataFlowBase_Service.hxx
25 // Author : Jean Rahuel, CEA
29 #ifndef _DATAFLOWBASE_SERVICE_HXX
30 #define _DATAFLOWBASE_SERVICE_HXX
32 #include "DataFlowBase_ServicesParameter.hxx"
34 ostream & operator<< (ostream & f ,const SALOME_ModuleCatalog::Service & s ) ;
38 class Service : public Base {
40 SALOME_ModuleCatalog::Service _Service ;
45 Service( const SALOME_ModuleCatalog::Service aService ) {
46 SetService( aService ) ;
47 cdebug << "GraphBase::Service::Service : " << _Service << endl ;
49 Service( const char * aServiceName ) {
50 _Service.ServiceName = CORBA::string_dup( aServiceName ) ;
51 cdebug << "GraphBase::Service::Service : " << _Service << endl ;
54 MESSAGE( "GraphBase::Service::~Service" );
57 void SetService( const SALOME_ModuleCatalog::Service aService ) ;
59 const SALOME_ModuleCatalog::Service * GetService() const {
60 cdebug << "GraphBase::Service::GetService : " << _Service << endl ;
61 return &_Service ; } ;
62 const char * ServiceName() const {
63 // cdebug << "ServiceName " << hex << (void *) _Service.ServiceName
64 // << dec << " = " << _Service.ServiceName << endl ;
65 return _Service.ServiceName ; } ;
66 const SALOME_ModuleCatalog::ListOfServicesParameter ServiceInParameter() const {
67 return _Service.ServiceinParameter ; } ;
68 const SALOME_ModuleCatalog::ListOfServicesParameter ServiceOutParameter() const {
69 return _Service.ServiceoutParameter ; } ;
71 const int Instances() const { return _Instance ; } ;
72 int NewInstance() { _Instance += 1 ;
73 return _Instance ; } ;
74 void Instance( int AddInst = 1 ) { if ( AddInst == 1 )
77 _Instance = AddInst ; } ;