From 5f9e7bc673025ffdc953d254be0d0c65c70ee908 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Thu, 17 Apr 2014 20:19:56 +0200 Subject: Remove using directives from .h files --- src/DabMux.h | 5 ----- src/MuxElements.h | 50 ++++++++++++++++++++++++-------------------------- src/ParserCmdline.cpp | 2 ++ src/ParserCmdline.h | 2 +- src/ParserConfigfile.h | 4 ++-- src/dabInputZmq.cpp | 6 +++++- src/dabInputZmq.h | 10 ++++++---- src/utils.cpp | 1 + src/utils.h | 8 ++++---- 9 files changed, 45 insertions(+), 43 deletions(-) (limited to 'src') diff --git a/src/DabMux.h b/src/DabMux.h index 3c03add..d54d818 100644 --- a/src/DabMux.h +++ b/src/DabMux.h @@ -28,9 +28,6 @@ #ifndef _DABMUX_H #define _DABMUX_H -#include -#include -#include #include #include "dabOutput/dabOutput.h" #include "dabInput.h" @@ -66,8 +63,6 @@ #define DEFAULT_SERVICE_ID 50 #define DEFAULT_PACKET_ADDRESS 0 -using namespace std; - /***************************************************************************** ***************** Definition of FIG structures **************************** diff --git a/src/MuxElements.h b/src/MuxElements.h index 82e839d..e6752e5 100644 --- a/src/MuxElements.h +++ b/src/MuxElements.h @@ -38,8 +38,6 @@ #include "RemoteControl.h" #include "Eti.h" -using namespace std; - struct dabOutput { dabOutput(const char* proto, const char* name) : outputProto(proto), outputName(name), output(NULL) { } @@ -75,7 +73,7 @@ class DabLabel const char* text() const { return m_text; } uint16_t flag() const { return m_flag; } - const string short_label() const; + const std::string short_label() const; private: // In the DAB standard, the label is 16 chars. @@ -100,11 +98,11 @@ class dabEnsemble : public RemoteControllable { } /* Remote control */ - virtual void set_parameter(const string& parameter, - const string& value); + virtual void set_parameter(const std::string& parameter, + const std::string& value); /* Getting a parameter always returns a string. */ - virtual const string get_parameter(const string& parameter) const; + virtual const std::string get_parameter(const std::string& parameter) const; /* all fields are public, since this was a struct before */ uint16_t id; @@ -115,9 +113,9 @@ class dabEnsemble : public RemoteControllable { // range: -24 to +24 int international_table; - vector services; - vector components; - vector subchannels; + std::vector services; + std::vector components; + std::vector subchannels; }; @@ -210,14 +208,14 @@ class DabComponent : public RemoteControllable dabPacketComponent packet; }; - bool isPacketComponent(vector& subchannels); + bool isPacketComponent(std::vector& subchannels); /* Remote control */ - virtual void set_parameter(const string& parameter, - const string& value); + virtual void set_parameter(const std::string& parameter, + const std::string& value); /* Getting a parameter always returns a string. */ - virtual const string get_parameter(const string& parameter) const; + virtual const std::string get_parameter(const std::string& parameter) const; virtual ~DabComponent() {} @@ -243,16 +241,16 @@ class DabService : public RemoteControllable bool program; unsigned char getType(dabEnsemble* ensemble); - unsigned char nbComponent(vector& components); + unsigned char nbComponent(std::vector& components); DabLabel label; /* Remote control */ - virtual void set_parameter(const string& parameter, - const string& value); + virtual void set_parameter(const std::string& parameter, + const std::string& value); /* Getting a parameter always returns a string. */ - virtual const string get_parameter(const string& parameter) const; + virtual const std::string get_parameter(const std::string& parameter) const; virtual ~DabService() {} @@ -261,21 +259,21 @@ class DabService : public RemoteControllable DabService(const DabService& other); }; -vector::iterator getSubchannel( - vector& subchannels, int id); +std::vector::iterator getSubchannel( + std::vector& subchannels, int id); -vector::iterator getComponent( - vector& components, +std::vector::iterator getComponent( + std::vector& components, uint32_t serviceId, - vector::iterator current); + std::vector::iterator current); -vector::iterator getComponent( - vector& components, +std::vector::iterator getComponent( + std::vector& components, uint32_t serviceId); -vector::iterator getService( +std::vector::iterator getService( DabComponent* component, - vector& services); + std::vector& services); unsigned short getSizeCu(dabSubchannel* subchannel); diff --git a/src/ParserCmdline.cpp b/src/ParserCmdline.cpp index 60ce118..69f4c4d 100644 --- a/src/ParserCmdline.cpp +++ b/src/ParserCmdline.cpp @@ -91,6 +91,8 @@ typedef DWORD32 uint32_t; # include #endif +using namespace std; + bool parse_cmdline(char **argv, int argc, vector &outputs, diff --git a/src/ParserCmdline.h b/src/ParserCmdline.h index 61d90fc..fc12490 100644 --- a/src/ParserCmdline.h +++ b/src/ParserCmdline.h @@ -33,7 +33,7 @@ bool parse_cmdline(char **argv, int argc, - vector &outputs, + std::vector &outputs, dabEnsemble* ensemble, bool* enableTist, unsigned* FICL, diff --git a/src/ParserConfigfile.h b/src/ParserConfigfile.h index 5c8546f..75f4f13 100644 --- a/src/ParserConfigfile.h +++ b/src/ParserConfigfile.h @@ -34,7 +34,7 @@ #include void parse_configfile(std::string configuration_file, - vector &outputs, + std::vector &outputs, dabEnsemble* ensemble, bool* enableTist, unsigned* FICL, @@ -46,7 +46,7 @@ void parse_configfile(std::string configuration_file, void setup_subchannel_from_ptree(dabSubchannel* subchan, boost::property_tree::ptree &pt, dabEnsemble* ensemble, - string subchanuid, + std::string subchanuid, BaseRemoteController* rc); #endif diff --git a/src/dabInputZmq.cpp b/src/dabInputZmq.cpp index 1106fee..368d646 100644 --- a/src/dabInputZmq.cpp +++ b/src/dabInputZmq.cpp @@ -3,7 +3,7 @@ Research Center Canada) Copyright (C) 2013, 2014 Matthias P. Braendli - http://mpb.li + http://www.opendigitalradio.org ZeroMQ input. see www.zeromq.org for more info @@ -11,6 +11,8 @@ For the MPEG input, each zeromq message must contain one frame. + Encryption is provided by zmq_curve, see the corresponding manpage. + From the ZeroMQ manpage 'zmq': The 0MQ lightweight messaging kernel is a library which extends the standard @@ -61,6 +63,8 @@ # define bzero(s, n) memset(s, 0, n) #endif +using namespace std; + extern StatsServer* global_stats; /***** Common functions (MPEG and AAC) ******/ diff --git a/src/dabInputZmq.h b/src/dabInputZmq.h index a052815..f41defa 100644 --- a/src/dabInputZmq.h +++ b/src/dabInputZmq.h @@ -3,7 +3,7 @@ Research Center Canada) Copyright (C) 2013, 2014 Matthias P. Braendli - http://mpb.li + http://www.opendigitalradio.org ZeroMQ input. see www.zeromq.org for more info @@ -11,6 +11,8 @@ For the MPEG input, each zeromq message must contain one frame. + Encryption is provided by zmq_curve, see the corresponding manpage. + From the ZeroMQ manpage 'zmq': The 0MQ lightweight messaging kernel is a library which extends the standard @@ -94,11 +96,11 @@ class DabInputZmqBase : public DabInputBase, public RemoteControllable { virtual int close(); /* Remote control */ - virtual void set_parameter(const string& parameter, - const string& value); + virtual void set_parameter(const std::string& parameter, + const std::string& value); /* Getting a parameter always returns a string. */ - virtual const string get_parameter(const string& parameter) const; + virtual const std::string get_parameter(const std::string& parameter) const; protected: virtual int readFromSocket(size_t framesize) = 0; diff --git a/src/utils.cpp b/src/utils.cpp index 5d67595..d81ec71 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -27,6 +27,7 @@ #include "DabMux.h" #include "utils.h" +using namespace std; time_t getDabTime() { diff --git a/src/utils.h b/src/utils.h index 2a91dbc..ee2340f 100644 --- a/src/utils.h +++ b/src/utils.h @@ -49,13 +49,13 @@ void printUsageConfigfile(char *name, FILE* out = stderr); /* The following four utility functions display a * description of all outputs, services, components * resp. subchannels*/ -void printOutputs(vector& outputs); +void printOutputs(std::vector& outputs); -void printServices(vector& services); +void printServices(std::vector& services); -void printComponents(vector& components); +void printComponents(std::vector& components); -void printSubchannels(vector& subchannels); +void printSubchannels(std::vector& subchannels); /* Print information about the whole ensemble */ void printEnsemble(dabEnsemble* ensemble); -- cgit v1.2.3