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 // MESSAGE( "GraphBase::Service::Service : " << _Service ) ;
48 // cout << "GraphBase::Service::Service : " << _Service << endl ;
49 cdebug << "GraphBase::Service::Service : " << _Service << endl ;
51 Service( const char * aServiceName ) {
52 _Service.ServiceName = CORBA::string_dup( aServiceName ) ;
53 cdebug << "GraphBase::Service::Service : " << _Service << endl ;
56 cdebug << "GraphBase::Service::~Service" << endl ;
59 void SetService( const SALOME_ModuleCatalog::Service aService ) ;
61 const SALOME_ModuleCatalog::Service * GetService() const {
62 cdebug << "GraphBase::Service::GetService : " << _Service << endl ;
63 return &_Service ; } ;
64 const char * ServiceName() const {
65 // cdebug << "ServiceName " << hex << (void *) _Service.ServiceName
66 // << dec << " = " << _Service.ServiceName << endl ;
67 return _Service.ServiceName ; } ;
68 const SALOME_ModuleCatalog::ListOfServicesParameter ServiceInParameter() const {
69 return _Service.ServiceinParameter ; } ;
70 const SALOME_ModuleCatalog::ListOfServicesParameter ServiceOutParameter() const {
71 return _Service.ServiceoutParameter ; } ;
73 const int Instances() const { return _Instance ; } ;
74 int NewInstance() { _Instance += 1 ;
75 return _Instance ; } ;
76 void Instance( int AddInst = 1 ) { if ( AddInst == 1 )
79 _Instance = AddInst ; } ;