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 "SequenceNumber.h" 00017 #include "RepoIdTypes.h" 00018 #include "dds/DdsDcpsInfoUtilsC.h" 00019 00020 #include "PoolAllocator.h" 00021 #include <iosfwd> 00022 00023 #if !defined (ACE_LACKS_PRAGMA_ONCE) 00024 #pragma once 00025 #endif /* ACE_LACKS_PRAGMA_ONCE */ 00026 00027 OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL 00028 00029 namespace OpenDDS { 00030 namespace DCPS { 00031 00032 struct WriterCoherentSample { 00033 WriterCoherentSample (ACE_UINT32 num_sample = 0, 00034 SequenceNumber last_sample = SequenceNumber()); 00035 00036 void reset (); 00037 ACE_UINT32 num_samples_; 00038 SequenceNumber last_sample_; 00039 }; 00040 00041 typedef OPENDDS_MAP_CMP(PublicationId, WriterCoherentSample, GUID_tKeyLessThan) GroupCoherentSamples; 00042 00043 /// End Coherent Change message. 00044 struct OpenDDS_Dcps_Export CoherentChangeControl { 00045 00046 WriterCoherentSample coherent_samples_; 00047 bool group_coherent_; 00048 RepoId publisher_id_; 00049 GroupCoherentSamples group_coherent_samples_; 00050 00051 CoherentChangeControl() ; 00052 00053 /// Similar to IDL compiler generated methods. 00054 size_t max_marshaled_size() ; 00055 00056 void reset (); 00057 }; 00058 00059 00060 /// Marshal/Insertion into a buffer. 00061 OpenDDS_Dcps_Export 00062 ACE_CDR::Boolean 00063 operator<< (OpenDDS::DCPS::Serializer& serializer, OpenDDS::DCPS::CoherentChangeControl& value); 00064 00065 OpenDDS_Dcps_Export 00066 ACE_CDR::Boolean 00067 operator>> (OpenDDS::DCPS::Serializer& serializer, OpenDDS::DCPS::CoherentChangeControl& value); 00068 00069 /// Message header insertion onto an ostream. 00070 OpenDDS_Dcps_Export 00071 std::ostream& operator<<(std::ostream& str, const OpenDDS::DCPS::CoherentChangeControl& value); 00072 00073 } // namespace DCPS 00074 } // namespace OpenDDS 00075 00076 OPENDDS_END_VERSIONED_NAMESPACE_DECL 00077 00078 #if defined(__ACE_INLINE__) 00079 #include "CoherentChangeControl.inl" 00080 #endif /* __ACE_INLINE__ */ 00081 00082 #endif 00083 00084 #endif /* OPENDDS_DCPS_COHERENT_CHANGE_CONTROL_H */