Commit b7532089 authored by Marco De Marco's avatar Marco De Marco
Browse files

Client class hierarchy added

parent 015f7524
Loading
Loading
Loading
Loading

src/Client.cpp

0 → 100644
+38 −0
Original line number Diff line number Diff line
#include <Client.h>

namespace MetadataImporter_ns
{

//==============================================================================
//      Client::Client()
//==============================================================================
Client::Client(Tango::DeviceImpl* deviceImpl_p) : Tango::LogAdapter(deviceImpl_p)
{
    DEBUG_STREAM << "Client::Client()" << endl;
}

//==============================================================================
//      Client::~Client()
//==============================================================================
Client::~Client()
{
    DEBUG_STREAM << "Client::~Client()" << endl;
}

//==============================================================================
//      Client::start()
//==============================================================================
void Client::start()
{
    DEBUG_STREAM << "Client::start()" << endl;
}

//==============================================================================
//      Client::stop()
//==============================================================================
void Client::stop()
{
    DEBUG_STREAM << "Client::stop()" << endl;
}

}   //namespace
 No newline at end of file

src/Client.h

0 → 100644
+50 −0
Original line number Diff line number Diff line
#ifndef CLIENT_H
#define	CLIENT_H

#include <tango.h>

#include <boost/asio.hpp>

namespace MetadataImporter_ns
{

class Client : public Tango::LogAdapter
{
public:
//------------------------------------------------------------------------------
//  [Public] Shared pointer typedef
//------------------------------------------------------------------------------
    typedef boost::shared_ptr<Client> SP;

protected:
//------------------------------------------------------------------------------
//      [Protected] Constructor destructor
//------------------------------------------------------------------------------
    Client(Tango::DeviceImpl*);

    virtual ~Client();

public:
//------------------------------------------------------------------------------
//      [Public] Users methods
//------------------------------------------------------------------------------
    virtual void start();

    virtual void stop();

protected:
//------------------------------------------------------------------------------
//  [Protected] Utilities methods
//------------------------------------------------------------------------------
    //virtual boost::asio::ip::tcp::endpoint resolveEndpoint();

//------------------------------------------------------------------------------
//      [Protected] Class variables
//------------------------------------------------------------------------------

};

}   //End of namespace

#endif	/* CLIENT_H */
+23 −21
Original line number Diff line number Diff line
@@ -42,6 +42,8 @@ static const char *RcsId = "$Id: $";

#include <MetadataImporter.h>
#include <MetadataImporterClass.h>
#include <PlainClient.h>
#include <SSLClient.h>

/*----- PROTECTED REGION END -----*/	//	MetadataImporter.cpp

+11 −6
Original line number Diff line number Diff line
@@ -40,6 +40,7 @@

#include <tango.h>

#include <Client.h>

/*----- PROTECTED REGION END -----*/	//	MetadataImporter.h

@@ -61,7 +62,11 @@ class MetadataImporter : public TANGO_BASE_CLASS

/*----- PROTECTED REGION ID(MetadataImporter::Data Members) ENABLED START -----*/

//	Add your own data members
//------------------------------------------------------------------------------
//  [Private] Class variables
//------------------------------------------------------------------------------
    Client::SP m_client_sp;


/*----- PROTECTED REGION END -----*/	//	MetadataImporter::Data Members

src/PlainClient.cpp

0 → 100644
+48 −0
Original line number Diff line number Diff line
#include <PlainClient.h>

namespace MetadataImporter_ns
{

//==============================================================================
//      PlainClient::PlainClient()
//==============================================================================
PlainClient::PlainClient(Tango::DeviceImpl* deviceImpl_p) : Client(deviceImpl_p)
{
    DEBUG_STREAM << "PlainClient::PlainClient()" << endl;
}

//==============================================================================
//      PlainClient::~PlainClient()
//==============================================================================
PlainClient::~PlainClient()
{
    DEBUG_STREAM << "PlainClient::~PlainClient()" << endl;
}

//==============================================================================
//      PlainClient::create()
//==============================================================================
Client::SP PlainClient::create(Tango::DeviceImpl* deviceImpl_p)
{
    Client::SP c_sp(new PlainClient(deviceImpl_p), PlainClient::Deleter());

    return c_sp;
}

//==============================================================================
//      PlainClient::start()
//==============================================================================
void PlainClient::start()
{
    DEBUG_STREAM << "PlainClient::start()" << endl;
}

//==============================================================================
//      PlainClient::stop()
//==============================================================================
void PlainClient::stop()
{
    DEBUG_STREAM << "PlainClient::stop()" << endl;
}

}   //namespace
Loading