Commit d6952ded authored by Simon Giesecke's avatar Simon Giesecke

Problem: unused include directives and redundant forward declarations

Solution: removed
parent 04ec6aaf
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#define __ZMQ_CLIENT_HPP_INCLUDED__ #define __ZMQ_CLIENT_HPP_INCLUDED__
#include "socket_base.hpp" #include "socket_base.hpp"
#include "session_base.hpp"
#include "fq.hpp" #include "fq.hpp"
#include "lb.hpp" #include "lb.hpp"
...@@ -41,7 +40,6 @@ class ctx_t; ...@@ -41,7 +40,6 @@ class ctx_t;
class msg_t; class msg_t;
class pipe_t; class pipe_t;
class io_thread_t; class io_thread_t;
class socket_base_t;
class client_t : public socket_base_t class client_t : public socket_base_t
{ {
......
...@@ -57,11 +57,6 @@ ...@@ -57,11 +57,6 @@
#endif #endif
#if defined ZMQ_HAVE_OSX #if defined ZMQ_HAVE_OSX
#include <mach/clock.h>
#include <mach/mach.h>
#include <time.h>
#include <sys/time.h>
int alt_clock_gettime (int clock_id, timespec *ts) int alt_clock_gettime (int clock_id, timespec *ts)
{ {
clock_serv_t cclock; clock_serv_t cclock;
......
...@@ -33,17 +33,19 @@ ...@@ -33,17 +33,19 @@
#include "stdint.hpp" #include "stdint.hpp"
#if defined ZMQ_HAVE_OSX #if defined ZMQ_HAVE_OSX
#include <mach/clock.h> // TODO this is not required in this file, but condition_variable.hpp includes
#include <mach/mach.h> // clock.hpp to get these definitions
#include <time.h>
#include <sys/time.h>
int alt_clock_gettime (int clock_id, timespec *ts);
#ifndef CLOCK_REALTIME #ifndef CLOCK_REALTIME
#define CLOCK_REALTIME 0 #define CLOCK_REALTIME 0
#endif #endif
#ifndef HAVE_CLOCK_GETTIME #ifndef HAVE_CLOCK_GETTIME
#define HAVE_CLOCK_GETTIME #define HAVE_CLOCK_GETTIME
#endif #endif
#include <mach/clock.h>
#include <mach/mach.h>
#include <time.h>
#include <sys/time.h>
#endif #endif
namespace zmq namespace zmq
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#ifndef __ZMQ_CONDITON_VARIABLE_HPP_INCLUDED__ #ifndef __ZMQ_CONDITON_VARIABLE_HPP_INCLUDED__
#define __ZMQ_CONDITON_VARIABLE_HPP_INCLUDED__ #define __ZMQ_CONDITON_VARIABLE_HPP_INCLUDED__
#include "clock.hpp"
#include "err.hpp" #include "err.hpp"
#include "mutex.hpp" #include "mutex.hpp"
......
...@@ -37,7 +37,6 @@ ...@@ -37,7 +37,6 @@
#include "decoder_allocators.hpp" #include "decoder_allocators.hpp"
#include "err.hpp" #include "err.hpp"
#include "i_decoder.hpp" #include "i_decoder.hpp"
#include "msg.hpp"
#include "stdint.hpp" #include "stdint.hpp"
namespace zmq namespace zmq
......
...@@ -31,13 +31,12 @@ ...@@ -31,13 +31,12 @@
#define __ZMQ_DISH_HPP_INCLUDED__ #define __ZMQ_DISH_HPP_INCLUDED__
#include <string> #include <string>
#include <vector>
#include "socket_base.hpp" #include "socket_base.hpp"
#include "session_base.hpp" #include "session_base.hpp"
#include "dist.hpp" #include "dist.hpp"
#include "fq.hpp" #include "fq.hpp"
#include "trie.hpp" #include "msg.hpp"
namespace zmq namespace zmq
{ {
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <vector> #include <vector>
#include "array.hpp" #include "array.hpp"
#include "pipe.hpp"
namespace zmq namespace zmq
{ {
......
...@@ -42,8 +42,8 @@ ...@@ -42,8 +42,8 @@
#include <algorithm> #include <algorithm>
#include "err.hpp" #include "err.hpp"
#include "msg.hpp"
#include "i_encoder.hpp" #include "i_encoder.hpp"
#include "msg.hpp"
namespace zmq namespace zmq
{ {
......
...@@ -32,11 +32,12 @@ ...@@ -32,11 +32,12 @@
#include "array.hpp" #include "array.hpp"
#include "blob.hpp" #include "blob.hpp"
#include "pipe.hpp"
#include "msg.hpp"
namespace zmq namespace zmq
{ {
class msg_t;
class pipe_t;
// Class manages a set of inbound pipes. On receive it performs fair // Class manages a set of inbound pipes. On receive it performs fair
// queueing so that senders gone berserk won't cause denial of // queueing so that senders gone berserk won't cause denial of
// service for decent senders. // service for decent senders.
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#define __ZMQ_GATHER_HPP_INCLUDED__ #define __ZMQ_GATHER_HPP_INCLUDED__
#include "socket_base.hpp" #include "socket_base.hpp"
#include "session_base.hpp"
#include "fq.hpp" #include "fq.hpp"
namespace zmq namespace zmq
...@@ -39,7 +38,6 @@ namespace zmq ...@@ -39,7 +38,6 @@ namespace zmq
class ctx_t; class ctx_t;
class pipe_t; class pipe_t;
class msg_t; class msg_t;
class io_thread_t;
class gather_t : public socket_base_t class gather_t : public socket_base_t
{ {
......
...@@ -30,8 +30,6 @@ ...@@ -30,8 +30,6 @@
#ifndef __ZMQ_IO_THREAD_HPP_INCLUDED__ #ifndef __ZMQ_IO_THREAD_HPP_INCLUDED__
#define __ZMQ_IO_THREAD_HPP_INCLUDED__ #define __ZMQ_IO_THREAD_HPP_INCLUDED__
#include <vector>
#include "stdint.hpp" #include "stdint.hpp"
#include "object.hpp" #include "object.hpp"
#include "poller.hpp" #include "poller.hpp"
......
...@@ -31,10 +31,12 @@ ...@@ -31,10 +31,12 @@
#define __ZMQ_LB_HPP_INCLUDED__ #define __ZMQ_LB_HPP_INCLUDED__
#include "array.hpp" #include "array.hpp"
#include "pipe.hpp"
namespace zmq namespace zmq
{ {
class msg_t;
class pipe_t;
// This class manages a set of outbound pipes. On send it load balances // This class manages a set of outbound pipes. On send it load balances
// messages fairly among the pipes. // messages fairly among the pipes.
......
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
namespace zmq namespace zmq
{ {
class msg_t;
class mechanism_base_t : public mechanism_t class mechanism_base_t : public mechanism_t
{ {
protected: protected:
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
namespace zmq namespace zmq
{ {
class io_thread_t; class io_thread_t;
class msg_t;
class session_base_t; class session_base_t;
class norm_engine_t : public io_object_t, public i_engine class norm_engine_t : public io_object_t, public i_engine
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#include "err.hpp" #include "err.hpp"
#include "msg.hpp" #include "msg.hpp"
#include "session_base.hpp" #include "session_base.hpp"
#include "wire.hpp"
#include "null_mechanism.hpp" #include "null_mechanism.hpp"
zmq::null_mechanism_t::null_mechanism_t (session_base_t *session_, zmq::null_mechanism_t::null_mechanism_t (session_base_t *session_,
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include <string.h> #include <string.h>
#include <set>
#include "options.hpp" #include "options.hpp"
#include "err.hpp" #include "err.hpp"
......
...@@ -32,7 +32,6 @@ ...@@ -32,7 +32,6 @@
#include <string> #include <string>
#include <vector> #include <vector>
#include <set>
#include <map> #include <map>
#include "atomic_ptr.hpp" #include "atomic_ptr.hpp"
...@@ -41,6 +40,7 @@ ...@@ -41,6 +40,7 @@
#include "tcp_address.hpp" #include "tcp_address.hpp"
#if defined ZMQ_HAVE_SO_PEERCRED || defined ZMQ_HAVE_LOCAL_PEERCRED #if defined ZMQ_HAVE_SO_PEERCRED || defined ZMQ_HAVE_LOCAL_PEERCRED
#include <set>
#include <sys/types.h> #include <sys/types.h>
#endif #endif
#ifdef ZMQ_HAVE_LOCAL_PEERCRED #ifdef ZMQ_HAVE_LOCAL_PEERCRED
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#define __ZMQ_OWN_HPP_INCLUDED__ #define __ZMQ_OWN_HPP_INCLUDED__
#include <set> #include <set>
#include <algorithm>
#include "object.hpp" #include "object.hpp"
#include "options.hpp" #include "options.hpp"
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#ifndef __ZMQ_PIPE_HPP_INCLUDED__ #ifndef __ZMQ_PIPE_HPP_INCLUDED__
#define __ZMQ_PIPE_HPP_INCLUDED__ #define __ZMQ_PIPE_HPP_INCLUDED__
#include "msg.hpp"
#include "ypipe_base.hpp" #include "ypipe_base.hpp"
#include "config.hpp" #include "config.hpp"
#include "object.hpp" #include "object.hpp"
...@@ -40,7 +39,7 @@ ...@@ -40,7 +39,7 @@
namespace zmq namespace zmq
{ {
class object_t; class msg_t;
class pipe_t; class pipe_t;
// Create a pipepair for bi-directional transfer of messages. // Create a pipepair for bi-directional transfer of messages.
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#ifndef __ZMQ_PLAIN_SERVER_HPP_INCLUDED__ #ifndef __ZMQ_PLAIN_SERVER_HPP_INCLUDED__
#define __ZMQ_PLAIN_SERVER_HPP_INCLUDED__ #define __ZMQ_PLAIN_SERVER_HPP_INCLUDED__
#include "mechanism.hpp"
#include "options.hpp" #include "options.hpp"
#include "zap_client.hpp" #include "zap_client.hpp"
......
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
#include "poller.hpp" #include "poller.hpp"
#include "proxy.hpp" #include "proxy.hpp"
#include "likely.hpp" #include "likely.hpp"
#include "msg.hpp"
#if defined ZMQ_POLL_BASED_ON_POLL && !defined ZMQ_HAVE_WINDOWS \ #if defined ZMQ_POLL_BASED_ON_POLL && !defined ZMQ_HAVE_WINDOWS \
&& !defined ZMQ_HAVE_AIX && !defined ZMQ_HAVE_AIX
......
...@@ -36,14 +36,12 @@ ...@@ -36,14 +36,12 @@
#include "socket_base.hpp" #include "socket_base.hpp"
#include "session_base.hpp" #include "session_base.hpp"
#include "mtrie.hpp"
#include "array.hpp"
#include "dist.hpp" #include "dist.hpp"
#include "msg.hpp"
namespace zmq namespace zmq
{ {
class ctx_t; class ctx_t;
class msg_t;
class pipe_t; class pipe_t;
class io_thread_t; class io_thread_t;
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#ifndef __ZMQ_RAW_DECODER_HPP_INCLUDED__ #ifndef __ZMQ_RAW_DECODER_HPP_INCLUDED__
#define __ZMQ_RAW_DECODER_HPP_INCLUDED__ #define __ZMQ_RAW_DECODER_HPP_INCLUDED__
#include "err.hpp"
#include "msg.hpp" #include "msg.hpp"
#include "i_decoder.hpp" #include "i_decoder.hpp"
#include "stdint.hpp" #include "stdint.hpp"
......
...@@ -30,8 +30,7 @@ ...@@ -30,8 +30,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "encoder.hpp" #include "encoder.hpp"
#include "raw_encoder.hpp" #include "raw_encoder.hpp"
#include "likely.hpp" #include "msg.hpp"
#include "wire.hpp"
zmq::raw_encoder_t::raw_encoder_t (size_t bufsize_) : zmq::raw_encoder_t::raw_encoder_t (size_t bufsize_) :
encoder_base_t<raw_encoder_t> (bufsize_) encoder_base_t<raw_encoder_t> (bufsize_)
......
...@@ -33,11 +33,8 @@ ...@@ -33,11 +33,8 @@
#include <stddef.h> #include <stddef.h>
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <algorithm>
#include "err.hpp" #include "encoder.hpp"
#include "msg.hpp"
#include "i_encoder.hpp"
namespace zmq namespace zmq
{ {
......
...@@ -48,7 +48,6 @@ ...@@ -48,7 +48,6 @@
#include "ctx.hpp" #include "ctx.hpp"
#include "fd.hpp" #include "fd.hpp"
#include "thread.hpp"
#include "poller_base.hpp" #include "poller_base.hpp"
namespace zmq namespace zmq
......
...@@ -36,12 +36,12 @@ ...@@ -36,12 +36,12 @@
#include "session_base.hpp" #include "session_base.hpp"
#include "stdint.hpp" #include "stdint.hpp"
#include "blob.hpp" #include "blob.hpp"
#include "msg.hpp"
#include "fq.hpp" #include "fq.hpp"
namespace zmq namespace zmq
{ {
class ctx_t; class ctx_t;
class msg_t;
class pipe_t; class pipe_t;
// TODO: This class uses O(n) scheduling. Rewrite it to use O(1) algorithm. // TODO: This class uses O(n) scheduling. Rewrite it to use O(1) algorithm.
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#ifndef __ZMQ_SESSION_BASE_HPP_INCLUDED__ #ifndef __ZMQ_SESSION_BASE_HPP_INCLUDED__
#define __ZMQ_SESSION_BASE_HPP_INCLUDED__ #define __ZMQ_SESSION_BASE_HPP_INCLUDED__
#include <string>
#include <stdarg.h> #include <stdarg.h>
#include "own.hpp" #include "own.hpp"
...@@ -41,9 +40,7 @@ ...@@ -41,9 +40,7 @@
namespace zmq namespace zmq
{ {
class pipe_t;
class io_thread_t; class io_thread_t;
class socket_base_t;
struct i_engine; struct i_engine;
struct address_t; struct address_t;
......
...@@ -39,10 +39,8 @@ ...@@ -39,10 +39,8 @@
#include "blob.hpp" #include "blob.hpp"
#include "stdint.hpp" #include "stdint.hpp"
#include "poller.hpp" #include "poller.hpp"
#include "atomic_counter.hpp"
#include "i_poll_events.hpp" #include "i_poll_events.hpp"
#include "i_mailbox.hpp" #include "i_mailbox.hpp"
#include "stdint.hpp"
#include "clock.hpp" #include "clock.hpp"
#include "pipe.hpp" #include "pipe.hpp"
......
...@@ -47,7 +47,6 @@ ...@@ -47,7 +47,6 @@
#endif #endif
#include <vector> #include <vector>
#include <algorithm>
#include "socket_base.hpp" #include "socket_base.hpp"
#include "signaler.hpp" #include "signaler.hpp"
......
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
#include "options.hpp" #include "options.hpp"
#include "socket_base.hpp" #include "socket_base.hpp"
#include "metadata.hpp" #include "metadata.hpp"
#include "msg.hpp"
namespace zmq namespace zmq
{ {
...@@ -51,7 +52,6 @@ enum ...@@ -51,7 +52,6 @@ enum
}; };
class io_thread_t; class io_thread_t;
class msg_t;
class session_base_t; class session_base_t;
class mechanism_t; class mechanism_t;
......
...@@ -35,6 +35,8 @@ ...@@ -35,6 +35,8 @@
#include <netinet/in.h> #include <netinet/in.h>
#endif #endif
#include <string>
#include "ip_resolver.hpp" #include "ip_resolver.hpp"
namespace zmq namespace zmq
......
...@@ -40,9 +40,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. ...@@ -40,9 +40,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif #endif
#endif #endif
#include "udp_address.hpp"
#include "udp_engine.hpp" #include "udp_engine.hpp"
#include "session_base.hpp" #include "session_base.hpp"
#include "v2_protocol.hpp"
#include "err.hpp" #include "err.hpp"
#include "ip.hpp" #include "ip.hpp"
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
#include "io_object.hpp" #include "io_object.hpp"
#include "i_engine.hpp" #include "i_engine.hpp"
#include "address.hpp" #include "address.hpp"
#include "udp_address.hpp"
#include "msg.hpp" #include "msg.hpp"
#define MAX_UDP_MSG 8192 #define MAX_UDP_MSG 8192
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "encoder.hpp" #include "encoder.hpp"
#include "v1_encoder.hpp" #include "v1_encoder.hpp"
#include "likely.hpp" #include "msg.hpp"
#include "wire.hpp" #include "wire.hpp"
zmq::v1_encoder_t::v1_encoder_t (size_t bufsize_) : zmq::v1_encoder_t::v1_encoder_t (size_t bufsize_) :
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include "precompiled.hpp" #include "precompiled.hpp"
#include "v2_protocol.hpp" #include "v2_protocol.hpp"
#include "v2_encoder.hpp" #include "v2_encoder.hpp"
#include "msg.hpp"
#include "likely.hpp" #include "likely.hpp"
#include "wire.hpp" #include "wire.hpp"
......
...@@ -31,12 +31,10 @@ ...@@ -31,12 +31,10 @@
#define __ZMQ_XPUB_HPP_INCLUDED__ #define __ZMQ_XPUB_HPP_INCLUDED__
#include <deque> #include <deque>
#include <string>
#include "socket_base.hpp" #include "socket_base.hpp"
#include "session_base.hpp" #include "session_base.hpp"
#include "mtrie.hpp" #include "mtrie.hpp"
#include "array.hpp"
#include "dist.hpp" #include "dist.hpp"
namespace zmq namespace zmq
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment