/*----- PROTECTED REGION ID(TangoTest::ClassFactory.cpp) ENABLED START -----*/
/* clang-format on */
//=============================================================================
//
// file :        ClassFactory.cpp
//
// description : C++ source for the class_factory method of the DServer
//               device class. This method is responsible for the creation of
//               all class singleton for a device server. It is called
//               at device server startup.
//
// project :     TANGO Device Server for testing generic clients
//
// This file is part of Tango device class.
//
// Tango is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Tango is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Tango.  If not, see <http://www.gnu.org/licenses/>.
//
//
//
//=============================================================================
//                This file is generated by POGO
//        (Program Obviously used to Generate tango Object)
//=============================================================================

#include "ClassFactory.h"
#include "TangoTestClass.h"

//	Add class header files if needed
#if TANGO_VERSION >= TANGO_MAKE_VERSION(10, 3, 0)

namespace TangoTest_ns {

class DServerImpl : public Tango::DServer
{
  public:
    DServerImpl(Tango::DeviceClass *cl_ptr,
                const std::string &name,
                const std::string &desc,
                Tango::DevState state,
                const std::string &status) :
        DServer(cl_ptr, name.c_str(), desc.c_str(), state, status.c_str())
    {
    }

  private:
      void class_factory() override
      {
          add_class(TangoTestClass::init("TangoTest"));
      }
};

Tango::DServer *constructor(Tango::DeviceClass *cl_ptr,
                            const std::string &name,
                            const std::string &desc,
                            Tango::DevState state,
                            const std::string &status)
{
    return new DServerImpl(cl_ptr, name, desc, state, status);
}
}

#else

/**
 *	Create TangoTest Class singleton and store it in DServer object.
 */

void Tango::DServer::class_factory()
{
	//	Add method class init if needed
	add_class(TangoTest_ns::TangoTestClass::init("TangoTest"));
}
#endif
/* clang-format off */
/*----- PROTECTED REGION END -----*/	//	TangoTest::ClassFactory.cpp
