forked from M-griffin/EtherTerm
-
Notifications
You must be signed in to change notification settings - Fork 1
/
sequenceManager.hpp
60 lines (48 loc) · 1.2 KB
/
sequenceManager.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#ifndef SEQUENCEMANAGER_HPP
#define SEQUENCEMANAGER_HPP
// EtherTerm SVN: $Id$
// Source: $HeadURL$
// $LastChangedDate$
// $LastChangedRevision$
// $LastChangedBy$
#include "safeQueue.hpp"
#include "sequenceDecoder.hpp"
#include <iostream>
class SequenceManager :
private SequenceDecoder
{
public:
// Instantiate the Singleton
static SequenceManager* Instance()
{
if(!m_globalInstance)
{
m_globalInstance = new SequenceManager();
return m_globalInstance;
}
return m_globalInstance;
}
// Release And Clear the Singleton
static void ReleaseInstance()
{
if(m_globalInstance)
{
delete m_globalInstance;
m_globalInstance = nullptr;
}
return;
}
// Parse Queue and Waiting Messages
void update();
// Decode Input Received.
void decode(std::string input);
private:
static SequenceManager* m_globalInstance;
SequenceManager();
~SequenceManager();
SequenceManager(const SequenceManager&);
SequenceManager& operator=(const SequenceManager&);
};
//Setup the Class Type
typedef SequenceManager TheSequenceManager;
#endif // SEQUENCEMANAGER_HPP