00001 #ifndef QUATERNIONDCPS_IMPL_H_ 00002 #define QUATERNIONDCPS_IMPL_H_ 00003 00004 #include "ccpp.h" 00005 #include "ccpp_Quaternion.h" 00006 #include "ccpp_TypeSupport_impl.h" 00007 #include "ccpp_DataWriter_impl.h" 00008 #include "ccpp_DataReader_impl.h" 00009 #include "ccpp_DataReaderView_impl.h" 00010 00011 00012 class QuaternionTypeSupportFactory : public ::DDS::TypeSupportFactory_impl 00013 { 00014 public: 00015 QuaternionTypeSupportFactory() {} 00016 virtual ~QuaternionTypeSupportFactory() {} 00017 private: 00018 ::DDS::DataWriter_ptr 00019 create_datawriter (gapi_dataWriter handle); 00020 00021 ::DDS::DataReader_ptr 00022 create_datareader (gapi_dataReader handle); 00023 00024 ::DDS::DataReaderView_ptr 00025 create_view (gapi_dataReaderView handle); 00026 }; 00027 00028 class QuaternionTypeSupport : public virtual QuaternionTypeSupportInterface, 00029 public ::DDS::TypeSupport_impl 00030 { 00031 public: 00032 virtual ::DDS::ReturnCode_t register_type( 00033 ::DDS::DomainParticipant_ptr participant, 00034 const char * type_name) THROW_ORB_EXCEPTIONS; 00035 00036 virtual char * get_type_name() THROW_ORB_EXCEPTIONS; 00037 00038 QuaternionTypeSupport (void); 00039 virtual ~QuaternionTypeSupport (void); 00040 00041 private: 00042 QuaternionTypeSupport (const QuaternionTypeSupport &); 00043 void operator= (const QuaternionTypeSupport &); 00044 00045 static const char *metaDescriptor; 00046 }; 00047 00048 typedef QuaternionTypeSupportInterface_var QuaternionTypeSupport_var; 00049 typedef QuaternionTypeSupportInterface_ptr QuaternionTypeSupport_ptr; 00050 00051 class QuaternionDataWriter_impl : public virtual QuaternionDataWriter, 00052 public ::DDS::DataWriter_impl 00053 { 00054 public: 00055 00056 virtual ::DDS::InstanceHandle_t register_instance( 00057 const Quaternion & instance_data) THROW_ORB_EXCEPTIONS; 00058 00059 virtual ::DDS::InstanceHandle_t register_instance_w_timestamp( 00060 const Quaternion & instance_data, 00061 const ::DDS::Time_t & source_timestamp) THROW_ORB_EXCEPTIONS; 00062 00063 virtual ::DDS::ReturnCode_t unregister_instance( 00064 const Quaternion & instance_data, 00065 ::DDS::InstanceHandle_t handle) THROW_ORB_EXCEPTIONS; 00066 00067 virtual ::DDS::ReturnCode_t unregister_instance_w_timestamp( 00068 const Quaternion & instance_data, 00069 ::DDS::InstanceHandle_t handle, 00070 const ::DDS::Time_t & source_timestamp) THROW_ORB_EXCEPTIONS; 00071 00072 virtual ::DDS::ReturnCode_t write( 00073 const Quaternion & instance_data, 00074 ::DDS::InstanceHandle_t handle) THROW_ORB_EXCEPTIONS; 00075 00076 virtual ::DDS::ReturnCode_t write_w_timestamp( 00077 const Quaternion & instance_data, 00078 ::DDS::InstanceHandle_t handle, 00079 const ::DDS::Time_t & source_timestamp) THROW_ORB_EXCEPTIONS; 00080 00081 virtual ::DDS::ReturnCode_t dispose( 00082 const Quaternion & instance_data, 00083 ::DDS::InstanceHandle_t handle) THROW_ORB_EXCEPTIONS; 00084 00085 virtual ::DDS::ReturnCode_t dispose_w_timestamp( 00086 const Quaternion & instance_data, 00087 ::DDS::InstanceHandle_t handle, 00088 const ::DDS::Time_t & source_timestamp) THROW_ORB_EXCEPTIONS; 00089 00090 virtual ::DDS::ReturnCode_t writedispose( 00091 const Quaternion & instance_data, 00092 ::DDS::InstanceHandle_t handle) THROW_ORB_EXCEPTIONS; 00093 00094 virtual ::DDS::ReturnCode_t writedispose_w_timestamp( 00095 const Quaternion & instance_data, 00096 ::DDS::InstanceHandle_t handle, 00097 const ::DDS::Time_t & source_timestamp) THROW_ORB_EXCEPTIONS; 00098 00099 virtual ::DDS::ReturnCode_t get_key_value( 00100 Quaternion & key_holder, 00101 ::DDS::InstanceHandle_t handle) THROW_ORB_EXCEPTIONS; 00102 00103 virtual ::DDS::InstanceHandle_t lookup_instance( 00104 const Quaternion & instance_data) THROW_ORB_EXCEPTIONS; 00105 00106 00107 QuaternionDataWriter_impl ( 00108 gapi_dataWriter handle 00109 ); 00110 00111 virtual ~QuaternionDataWriter_impl (void); 00112 00113 private: 00114 QuaternionDataWriter_impl(const QuaternionDataWriter_impl &); 00115 void operator= (const QuaternionDataWriter &); 00116 }; 00117 00118 class QuaternionDataReader_impl : public virtual QuaternionDataReader, 00119 public ::DDS::DataReader_impl 00120 { 00121 friend class QuaternionDataReaderView_impl; 00122 public: 00123 virtual ::DDS::ReturnCode_t read( 00124 QuaternionSeq & received_data, 00125 ::DDS::SampleInfoSeq & info_seq, 00126 CORBA::Long max_samples, 00127 ::DDS::SampleStateMask sample_states, 00128 ::DDS::ViewStateMask view_states, 00129 ::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS; 00130 00131 virtual ::DDS::ReturnCode_t take( 00132 QuaternionSeq & received_data, 00133 ::DDS::SampleInfoSeq & info_seq, 00134 CORBA::Long max_samples, 00135 ::DDS::SampleStateMask sample_states, 00136 ::DDS::ViewStateMask view_states, 00137 ::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS; 00138 00139 virtual ::DDS::ReturnCode_t read_w_condition( 00140 QuaternionSeq & received_data, 00141 ::DDS::SampleInfoSeq & info_seq, 00142 CORBA::Long max_samples, 00143 ::DDS::ReadCondition_ptr a_condition) THROW_ORB_EXCEPTIONS; 00144 00145 virtual ::DDS::ReturnCode_t take_w_condition( 00146 QuaternionSeq & received_data, 00147 ::DDS::SampleInfoSeq & info_seq, 00148 CORBA::Long max_samples, 00149 ::DDS::ReadCondition_ptr a_condition) THROW_ORB_EXCEPTIONS; 00150 00151 virtual ::DDS::ReturnCode_t read_next_sample( 00152 Quaternion & received_data, 00153 ::DDS::SampleInfo & sample_info) THROW_ORB_EXCEPTIONS; 00154 00155 virtual ::DDS::ReturnCode_t take_next_sample( 00156 Quaternion & received_data, 00157 ::DDS::SampleInfo & sample_info) THROW_ORB_EXCEPTIONS; 00158 00159 virtual ::DDS::ReturnCode_t read_instance( 00160 QuaternionSeq & received_data, 00161 ::DDS::SampleInfoSeq & info_seq, 00162 CORBA::Long max_samples, 00163 ::DDS::InstanceHandle_t a_handle, 00164 ::DDS::SampleStateMask sample_states, 00165 ::DDS::ViewStateMask view_states, 00166 ::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS; 00167 00168 virtual ::DDS::ReturnCode_t take_instance( 00169 QuaternionSeq & received_data, 00170 ::DDS::SampleInfoSeq & info_seq, 00171 CORBA::Long max_samples, 00172 ::DDS::InstanceHandle_t a_handle, 00173 ::DDS::SampleStateMask sample_states, 00174 ::DDS::ViewStateMask view_states, 00175 ::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS; 00176 00177 virtual ::DDS::ReturnCode_t read_next_instance( 00178 QuaternionSeq & received_data, 00179 ::DDS::SampleInfoSeq & info_seq, 00180 CORBA::Long max_samples, 00181 ::DDS::InstanceHandle_t a_handle, 00182 ::DDS::SampleStateMask sample_states, 00183 ::DDS::ViewStateMask view_states, 00184 ::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS; 00185 00186 virtual ::DDS::ReturnCode_t take_next_instance( 00187 QuaternionSeq & received_data, 00188 ::DDS::SampleInfoSeq & info_seq, 00189 CORBA::Long max_samples, 00190 ::DDS::InstanceHandle_t a_handle, 00191 ::DDS::SampleStateMask sample_states, 00192 ::DDS::ViewStateMask view_states, 00193 ::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS; 00194 00195 virtual ::DDS::ReturnCode_t read_next_instance_w_condition( 00196 QuaternionSeq & received_data, 00197 ::DDS::SampleInfoSeq & info_seq, 00198 CORBA::Long max_samples, 00199 ::DDS::InstanceHandle_t a_handle, 00200 ::DDS::ReadCondition_ptr a_condition) THROW_ORB_EXCEPTIONS; 00201 00202 virtual ::DDS::ReturnCode_t take_next_instance_w_condition( 00203 QuaternionSeq & received_data, 00204 ::DDS::SampleInfoSeq & info_seq, 00205 CORBA::Long max_samples, 00206 ::DDS::InstanceHandle_t a_handle, 00207 ::DDS::ReadCondition_ptr a_condition) THROW_ORB_EXCEPTIONS; 00208 00209 virtual ::DDS::ReturnCode_t return_loan( 00210 QuaternionSeq & received_data, 00211 ::DDS::SampleInfoSeq & info_seq) THROW_ORB_EXCEPTIONS; 00212 00213 virtual ::DDS::ReturnCode_t get_key_value( 00214 Quaternion & key_holder, 00215 ::DDS::InstanceHandle_t handle) THROW_ORB_EXCEPTIONS; 00216 00217 virtual ::DDS::InstanceHandle_t lookup_instance( 00218 const Quaternion & instance) THROW_ORB_EXCEPTIONS; 00219 00220 QuaternionDataReader_impl ( 00221 gapi_dataReader handle 00222 ); 00223 00224 virtual ~QuaternionDataReader_impl(void); 00225 00226 private: 00227 QuaternionDataReader_impl(const QuaternionDataReader &); 00228 void operator= (const QuaternionDataReader &); 00229 00230 static ::DDS::ReturnCode_t check_preconditions( 00231 QuaternionSeq & received_data, 00232 ::DDS::SampleInfoSeq & info_seq, 00233 CORBA::Long max_samples 00234 ); 00235 }; 00236 00237 class QuaternionDataReaderView_impl : public virtual QuaternionDataReaderView, 00238 public ::DDS::DataReaderView_impl 00239 { 00240 public: 00241 virtual ::DDS::ReturnCode_t read( 00242 QuaternionSeq & received_data, 00243 ::DDS::SampleInfoSeq & info_seq, 00244 CORBA::Long max_samples, 00245 ::DDS::SampleStateMask sample_states, 00246 ::DDS::ViewStateMask view_states, 00247 ::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS; 00248 00249 virtual ::DDS::ReturnCode_t take( 00250 QuaternionSeq & received_data, 00251 ::DDS::SampleInfoSeq & info_seq, 00252 CORBA::Long max_samples, 00253 ::DDS::SampleStateMask sample_states, 00254 ::DDS::ViewStateMask view_states, 00255 ::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS; 00256 00257 virtual ::DDS::ReturnCode_t read_w_condition( 00258 QuaternionSeq & received_data, 00259 ::DDS::SampleInfoSeq & info_seq, 00260 CORBA::Long max_samples, 00261 ::DDS::ReadCondition_ptr a_condition) THROW_ORB_EXCEPTIONS; 00262 00263 virtual ::DDS::ReturnCode_t take_w_condition( 00264 QuaternionSeq & received_data, 00265 ::DDS::SampleInfoSeq & info_seq, 00266 CORBA::Long max_samples, 00267 ::DDS::ReadCondition_ptr a_condition) THROW_ORB_EXCEPTIONS; 00268 00269 virtual ::DDS::ReturnCode_t read_next_sample( 00270 Quaternion & received_data, 00271 ::DDS::SampleInfo & sample_info) THROW_ORB_EXCEPTIONS; 00272 00273 virtual ::DDS::ReturnCode_t take_next_sample( 00274 Quaternion & received_data, 00275 ::DDS::SampleInfo & sample_info) THROW_ORB_EXCEPTIONS; 00276 00277 virtual ::DDS::ReturnCode_t read_instance( 00278 QuaternionSeq & received_data, 00279 ::DDS::SampleInfoSeq & info_seq, 00280 CORBA::Long max_samples, 00281 ::DDS::InstanceHandle_t a_handle, 00282 ::DDS::SampleStateMask sample_states, 00283 ::DDS::ViewStateMask view_states, 00284 ::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS; 00285 00286 virtual ::DDS::ReturnCode_t take_instance( 00287 QuaternionSeq & received_data, 00288 ::DDS::SampleInfoSeq & info_seq, 00289 CORBA::Long max_samples, 00290 ::DDS::InstanceHandle_t a_handle, 00291 ::DDS::SampleStateMask sample_states, 00292 ::DDS::ViewStateMask view_states, 00293 ::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS; 00294 00295 virtual ::DDS::ReturnCode_t read_next_instance( 00296 QuaternionSeq & received_data, 00297 ::DDS::SampleInfoSeq & info_seq, 00298 CORBA::Long max_samples, 00299 ::DDS::InstanceHandle_t a_handle, 00300 ::DDS::SampleStateMask sample_states, 00301 ::DDS::ViewStateMask view_states, 00302 ::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS; 00303 00304 virtual ::DDS::ReturnCode_t take_next_instance( 00305 QuaternionSeq & received_data, 00306 ::DDS::SampleInfoSeq & info_seq, 00307 CORBA::Long max_samples, 00308 ::DDS::InstanceHandle_t a_handle, 00309 ::DDS::SampleStateMask sample_states, 00310 ::DDS::ViewStateMask view_states, 00311 ::DDS::InstanceStateMask instance_states) THROW_ORB_EXCEPTIONS; 00312 00313 virtual ::DDS::ReturnCode_t read_next_instance_w_condition( 00314 QuaternionSeq & received_data, 00315 ::DDS::SampleInfoSeq & info_seq, 00316 CORBA::Long max_samples, 00317 ::DDS::InstanceHandle_t a_handle, 00318 ::DDS::ReadCondition_ptr a_condition) THROW_ORB_EXCEPTIONS; 00319 00320 virtual ::DDS::ReturnCode_t take_next_instance_w_condition( 00321 QuaternionSeq & received_data, 00322 ::DDS::SampleInfoSeq & info_seq, 00323 CORBA::Long max_samples, 00324 ::DDS::InstanceHandle_t a_handle, 00325 ::DDS::ReadCondition_ptr a_condition) THROW_ORB_EXCEPTIONS; 00326 00327 virtual ::DDS::ReturnCode_t return_loan( 00328 QuaternionSeq & received_data, 00329 ::DDS::SampleInfoSeq & info_seq) THROW_ORB_EXCEPTIONS; 00330 00331 virtual ::DDS::ReturnCode_t get_key_value( 00332 Quaternion & key_holder, 00333 ::DDS::InstanceHandle_t handle) THROW_ORB_EXCEPTIONS; 00334 00335 virtual ::DDS::InstanceHandle_t lookup_instance( 00336 const Quaternion & instance) THROW_ORB_EXCEPTIONS; 00337 00338 QuaternionDataReaderView_impl ( 00339 gapi_dataReader handle 00340 ); 00341 00342 virtual ~QuaternionDataReaderView_impl(void); 00343 00344 private: 00345 QuaternionDataReaderView_impl(const QuaternionDataReaderView &); 00346 void operator= (const QuaternionDataReaderView &); 00347 }; 00348 00349 #endif