summaryrefslogtreecommitdiffstats
path: root/src/dabOutput/dabOutput.h
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2016-12-23 22:26:10 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2016-12-23 22:26:10 +0100
commit1d2c8bf95e8d9c7c6f282f266b149bc82f1c8371 (patch)
tree48c8748f103c254426bc2c8051b7f1e7b37b2c0e /src/dabOutput/dabOutput.h
parent0f158ac9c63c6770cea423c8486a5ff192b36366 (diff)
downloaddabmux-1d2c8bf95e8d9c7c6f282f266b149bc82f1c8371.tar.gz
dabmux-1d2c8bf95e8d9c7c6f282f266b149bc82f1c8371.tar.bz2
dabmux-1d2c8bf95e8d9c7c6f282f266b149bc82f1c8371.zip
Modernise Simul and ZMQ class declarations
Diffstat (limited to 'src/dabOutput/dabOutput.h')
-rw-r--r--src/dabOutput/dabOutput.h34
1 files changed, 5 insertions, 29 deletions
diff --git a/src/dabOutput/dabOutput.h b/src/dabOutput/dabOutput.h
index c10d358..a023da9 100644
--- a/src/dabOutput/dabOutput.h
+++ b/src/dabOutput/dabOutput.h
@@ -26,8 +26,7 @@
along with ODR-DabMux. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __DAB_OUTPUT_H
-#define __DAB_OUTPUT_H
+#pragma once
#include "UdpSocket.h"
#include "Log.h"
@@ -240,15 +239,6 @@ class DabOutputTcp : public DabOutput
class DabOutputSimul : public DabOutput
{
public:
- DabOutputSimul() {}
-
- DabOutputSimul(const DabOutputSimul& other)
- {
- startTime_ = other.startTime_;
- }
-
- ~DabOutputSimul() { }
-
int Open(const char* name);
int Write(void* buffer, int size);
int Close() { return 0; }
@@ -304,29 +294,22 @@ struct zmq_dab_message_t
class DabOutputZMQ : public DabOutput
{
public:
- DabOutputZMQ() :
- endpoint_(""),
- zmq_proto_(""), zmq_context_(1),
- zmq_pub_sock_(zmq_context_, ZMQ_PUB),
- zmq_message_ix(0)
- {
- throw std::runtime_error("ERROR: No ZMQ protocol specified !");
- }
-
- DabOutputZMQ(std::string zmq_proto) :
+ DabOutputZMQ(const std::string &zmq_proto) :
endpoint_(""),
zmq_proto_(zmq_proto), zmq_context_(1),
zmq_pub_sock_(zmq_context_, ZMQ_PUB),
zmq_message_ix(0)
{ }
+ DabOutputZMQ(const DabOutputZMQ& other) = delete;
+ DabOutputZMQ& operator=(const DabOutputZMQ& other) = delete;
~DabOutputZMQ()
{
zmq_pub_sock_.close();
}
- std::string get_info() const {
+ std::string get_info(void) const {
return "zmq: " + zmq_proto_ + "://" + endpoint_;
}
@@ -334,12 +317,6 @@ class DabOutputZMQ : public DabOutput
int Write(void* buffer, int size);
int Close();
private:
- DabOutputZMQ(const DabOutputZMQ& other) :
- zmq_proto_(other.zmq_proto_), zmq_context_(1),
- zmq_pub_sock_(zmq_context_, ZMQ_PUB)
- {
- /* Forbid copy constructor */
- }
std::string endpoint_;
std::string zmq_proto_;
@@ -352,4 +329,3 @@ class DabOutputZMQ : public DabOutput
#endif
-#endif