//=========================================================================
//  Copyright (c) Kitware, Inc.
//  All rights reserved.
//  See LICENSE.txt for details.
//
//  This software is distributed WITHOUT ANY WARRANTY; without even
//  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
//  PURPOSE.  See the above copyright notice for more information.
//=========================================================================

#include "pqSMTKAutoStart@_smtk_plugin_autostart_name@.h"

#include "@_smtk_plugin_REGISTRAR_HEADER@"

#include "smtk/plugin/Client.txx"

#include <memory>

pqSMTKAutoStart@_smtk_plugin_autostart_name@::pqSMTKAutoStart@_smtk_plugin_autostart_name@(QObject* parent)
  : QObject(parent)
{
}

pqSMTKAutoStart@_smtk_plugin_autostart_name@::~pqSMTKAutoStart@_smtk_plugin_autostart_name@() = default;

typedef smtk::plugin::Client<@_smtk_plugin_REGISTRAR@
  , @_smtk_plugin_managers@
  > Client;

static std::shared_ptr<Client> myClient;

void pqSMTKAutoStart@_smtk_plugin_autostart_name@::startup()
{
  myClient = std::dynamic_pointer_cast<Client>(Client::create());
}

void pqSMTKAutoStart@_smtk_plugin_autostart_name@::shutdown()
{
  myClient = nullptr;
}
