00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef _DATA_SHORT_PORT_PROVIDES_HXX_
00027 #define _DATA_SHORT_PORT_PROVIDES_HXX_
00028
00029 #include <SALOMEconfig.h>
00030
00031 #include <iostream>
00032 #include "SALOME_Ports.hh"
00033 #include "provides_port.hxx"
00034 #include <pthread.h>
00035
00040 class data_short_port_provides :
00041 public virtual POA_Ports::Data_Short_Port,
00042 public virtual provides_port
00043 {
00044 public :
00045 data_short_port_provides();
00046 virtual ~data_short_port_provides();
00047
00052 virtual void put(CORBA::Short data);
00053
00060 virtual CORBA::Short get();
00061
00067 virtual Ports::Port_ptr get_port_ref();
00068
00069 private :
00070 CORBA::Short _val;
00071 pthread_mutex_t * short_mutex;
00072 pthread_cond_t * short_condition;
00073 bool short_termine;
00074 pthread_mutex_t * short_mutex_cp;
00075 pthread_cond_t * short_condition_cp;
00076 bool short_termine_cp;
00077
00078 };
00079
00080 #endif