00001 /* 00002 * 00003 * 00004 * Distributed under the OpenDDS License. 00005 * See: http://www.opendds.org/license.html 00006 */ 00007 00008 #ifndef OPENDDS_DCPS_COHERENT_CHANGE_CONTROL_H 00009 #define OPENDDS_DCPS_COHERENT_CHANGE_CONTROL_H 00010 00011 #ifndef OPENDDS_NO_OBJECT_MODEL_PROFILE 00012 00013 #include "Definitions.h" 00014 #include "GuidUtils.h" 00015 #include "Serializer.h" 00016 #include "dds/DdsDcpsInfoUtilsC.h" 00017 00018 #include "PoolAllocator.h" 00019 #include <iosfwd> 00020 00021 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00022 #pragma once 00023 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00024 00025 namespace OpenDDS { 00026 namespace DCPS { 00027 00028 struct WriterCoherentSample { 00029 WriterCoherentSample (ACE_UINT32 num_sample = 0, 00030 SequenceNumber last_sample = SequenceNumber()); 00031 00032 void reset (); 00033 ACE_UINT32 num_samples_; 00034 SequenceNumber last_sample_; 00035 }; 00036 00037 typedef OPENDDS_MAP_CMP(PublicationId, WriterCoherentSample, GUID_tKeyLessThan) GroupCoherentSamples; 00038 00039 /// End Coherent Change message. 00040 struct OpenDDS_Dcps_Export CoherentChangeControl { 00041 00042 WriterCoherentSample coherent_samples_; 00043 bool group_coherent_; 00044 RepoId publisher_id_; 00045 GroupCoherentSamples group_coherent_samples_; 00046 00047 /// Default constructor. 00048 CoherentChangeControl() ; 00049 00050 /// Similar to IDL compiler generated methods. 00051 size_t max_marshaled_size() ; 00052 00053 void reset (); 00054 }; 00055 00056 00057 /// Marshal/Insertion into a buffer. 00058 OpenDDS_Dcps_Export 00059 ACE_CDR::Boolean 00060 operator<< (OpenDDS::DCPS::Serializer& serializer, OpenDDS::DCPS::CoherentChangeControl& value); 00061 00062 OpenDDS_Dcps_Export 00063 ACE_CDR::Boolean 00064 operator>> (OpenDDS::DCPS::Serializer& serializer, OpenDDS::DCPS::CoherentChangeControl& value); 00065 00066 /// Message header insertion onto an ostream. 00067 OpenDDS_Dcps_Export 00068 std::ostream& operator<<(std::ostream& str, const OpenDDS::DCPS::CoherentChangeControl& value); 00069 00070 } // namespace DCPS 00071 } // namespace OpenDDS 00072 00073 #if defined(__ACE_INLINE__) 00074 #include "CoherentChangeControl.inl" 00075 #endif /* __ACE_INLINE__ */ 00076 00077 #endif 00078 00079 #endif /* OPENDDS_DCPS_COHERENT_CHANGE_CONTROL_H */