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

#ifndef TANGO_SERVER_DSERVERCLASS_H
#define TANGO_SERVER_DSERVERCLASS_H

#include <tango/server/Command.h>

#include <string>

namespace Tango
{

//=============================================================================
//
//            The DServerClass class
//
// description :    This class is a singleton ( The constructor is
//            protected and the _instance data member is static)
//            It contains all properties and methods
//            which the DServer objects requires only once e.g. the
//            commands.
//
//=============================================================================

class DServerClass : public DeviceClass
{
  public:
    static DServerClass *instance();
    static DServerClass *init();
    static void cleanup();

    ~DServerClass() override { }

    void command_factory() override;
    void device_factory(const Tango::DevVarStringArray *devlist) override;

  protected:
    DServerClass(const std::string &);
    TANGO_IMP static DServerClass *_instance;
};

} // namespace Tango

#endif // TANGO_SERVER_DSERVERCLASS_H
