/*
 * SPDX-FileCopyrightText: 2004 Copyright contributors to the cppTango project
 *
 * SPDX-License-Identifier: LGPL-3.0-or-later
 */

#ifndef TANGO_SERVER_NOSYNCMODELTANGOMONITOR_H
#define TANGO_SERVER_NOSYNCMODELTANGOMONITOR_H

#include <tango/common/omnithread_wrapper.h>

namespace Tango
{
class DeviceImpl;
class TangoMonitor;

//---------------------------------------------------------------------------------------------------------------------
//
// class :
//        NoSyncModelTangoMonitor
//
// description :
//        This class is only a helper class used to get a TangoMonitor object during its construction and to
//        it during its destruction only if the device server process is in NO_SYNC synchronisation model
//
//--------------------------------------------------------------------------------------------------------------------

class NoSyncModelTangoMonitor
{
  public:
    NoSyncModelTangoMonitor(Tango::DeviceImpl *dev);

    ~NoSyncModelTangoMonitor();

  private:
    TangoMonitor *mon;
    omni_thread::ensure_self auto_self;
};

} // namespace Tango

#endif /* AUTO_TANGO_MONITOR */
