summaryrefslogtreecommitdiff
path: root/CIAO/connectors/dds4ccm/impl/Coherent_Changes_Guard.cpp
blob: b31ecd8329b7309335a39fb12a88ed07e1d27f84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// $Id$

#include "dds4ccm/impl/Coherent_Changes_Guard.h"

CIAO::DDS4CCM::Coherent_Changes_Guard::Coherent_Changes_Guard (
  ::DDS::Publisher_ptr p,
  bool coherent_write) :
    p_ (::DDS::Publisher::_duplicate (p)),
    coherent_write_ (coherent_write)
{
  if (this->coherent_write_)
    {
      p_->begin_coherent_changes ();
    }
}

CIAO::DDS4CCM::Coherent_Changes_Guard::~Coherent_Changes_Guard ()
{
  if (this->coherent_write_)
    {
      this->p_->end_coherent_changes ();
    }
}