src/GraphBase/DataFlowBase_Service.hxx

Go to the documentation of this file.
00001 //  SUPERV GraphBase : contains fondamental classes for Services, Input Ports, Output Ports Links and Nodes.
00002 //
00003 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
00005 // 
00006 //  This library is free software; you can redistribute it and/or 
00007 //  modify it under the terms of the GNU Lesser General Public 
00008 //  License as published by the Free Software Foundation; either 
00009 //  version 2.1 of the License. 
00010 // 
00011 //  This library is distributed in the hope that it will be useful, 
00012 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
00013 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
00014 //  Lesser General Public License for more details. 
00015 // 
00016 //  You should have received a copy of the GNU Lesser General Public 
00017 //  License along with this library; if not, write to the Free Software 
00018 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
00019 // 
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 //
00023 //
00024 //  File   : DataFlowBase_Service.hxx
00025 //  Author : Jean Rahuel, CEA
00026 //  Module : SUPERV
00027 //  $Header:
00028 
00029 #ifndef _DATAFLOWBASE_SERVICE_HXX
00030 #define _DATAFLOWBASE_SERVICE_HXX
00031 
00032 #include "DataFlowBase_ServicesParameter.hxx"
00033 
00034 ostream & operator<< (ostream & f ,const SALOME_ModuleCatalog::Service & s ) ;
00035 
00036 namespace GraphBase {
00037 
00038   class Service : public Base {
00039 
00040     private:
00041 
00042       SALOME_ModuleCatalog::Service _Service ;
00043 //      int                           _Instance ;
00044 
00045     public:   
00046 
00047       Service( const SALOME_ModuleCatalog::Service aService ) {
00048              SetService( aService ) ;
00049 //             MESSAGE( "GraphBase::Service::Service : " << _Service ) ;
00050 //             cout << "GraphBase::Service::Service : " << _Service << endl ;
00051              cdebug << "GraphBase::Service::Service : " << _Service << endl ;
00052              } ;
00053       Service( const char * aServiceName ) {
00054                _Service.ServiceName = CORBA::string_dup( aServiceName ) ;
00055                cdebug << "GraphBase::Service::Service : " << _Service << endl ; } ;
00056 //               _Instance = 0 ; } ;
00057       virtual ~Service() {
00058               cdebug << "GraphBase::Service::~Service" << endl ; } ;
00059 
00060       void SetService( const SALOME_ModuleCatalog::Service aService ) ;
00061 
00062       const SALOME_ModuleCatalog::Service * GetService() const {
00063             cdebug << "GraphBase::Service::GetService : " << _Service << endl ;
00064             return &_Service ; } ;
00065       const char * ServiceName() const {
00066 //            cdebug << "ServiceName " << hex << (void *) _Service.ServiceName
00067 //                   << dec << " = " << _Service.ServiceName << endl ;
00068             return _Service.ServiceName ; } ;
00069       const SALOME_ModuleCatalog::ListOfServicesParameter ServiceInParameter() const {
00070             return _Service.ServiceinParameter ; } ;
00071       const SALOME_ModuleCatalog::ListOfServicesParameter ServiceOutParameter() const {
00072             return _Service.ServiceoutParameter ; } ;
00073       const SALOME_ModuleCatalog::ListOfServicesDataStreamParameter ServiceInStreamParameter() const {
00074             return _Service.ServiceinDataStreamParameter ; } ;
00075       const SALOME_ModuleCatalog::ListOfServicesDataStreamParameter ServiceOutStreamParameter() const {
00076             return _Service.ServiceoutDataStreamParameter ; } ;
00077 
00078 //      const int Instances() const { return _Instance ; } ;
00079 //      int NewInstance() { _Instance += 1 ;
00080 //                          return _Instance ; } ;
00081 //      void Instance( int Inst = 1 ) { if ( Inst == 1 )
00082 //                                        _Instance += 1 ;
00083 //                                      else
00084 //                                        _Instance = Inst ; } ; } ;
00085     } ;
00086 
00087 } ;
00088 
00089 #endif