summaryrefslogtreecommitdiff
path: root/src/syncQueue.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/syncQueue.h')
-rw-r--r--src/syncQueue.h37
1 files changed, 20 insertions, 17 deletions
diff --git a/src/syncQueue.h b/src/syncQueue.h
index 8da82b9..e5eb8d7 100644
--- a/src/syncQueue.h
+++ b/src/syncQueue.h
@@ -11,7 +11,7 @@
* tunneling and relaying of packets of any protocol.
*
*
- * Copyright (C) 2007-2009 Othmar Gsenger, Erwin Nindl,
+ * Copyright (C) 2007-2009 Othmar Gsenger, Erwin Nindl,
* Christian Pointner <satp@wirdorange.org>
*
* This file is part of Anytun.
@@ -45,28 +45,31 @@
class SyncQueue
{
public:
- SyncQueue():syncServer_(NULL) {};
- ~SyncQueue() {};
+ SyncQueue():syncServer_(NULL) {};
+ ~SyncQueue() {};
static SyncQueue& instance();
- void setSyncServerPtr(SyncServer *);
- void push(const std::string & );
- void push(const SyncCommand & );
- std::string pop();
- bool empty();
+ void setSyncServerPtr(SyncServer*);
+ void push(const std::string&);
+ void push(const SyncCommand&);
+ std::string pop();
+ bool empty();
private:
static Mutex instMutex;
- static SyncQueue* inst;
- class instanceCleaner {
- public: ~instanceCleaner() {
- if(SyncQueue::inst != 0)
- delete SyncQueue::inst;
- }
+ static SyncQueue* inst;
+ class instanceCleaner
+ {
+ public:
+ ~instanceCleaner() {
+ if(SyncQueue::inst != 0) {
+ delete SyncQueue::inst;
+ }
+ }
};
- SyncQueue(const SyncQueue &s);
- void operator=(const SyncQueue &s);
+ SyncQueue(const SyncQueue& s);
+ void operator=(const SyncQueue& s);
Mutex mutex_;
- SyncServer * syncServer_;
+ SyncServer* syncServer_;
};
extern SyncQueue& gSyncQueue;