1.修复小bug
2.增加Node到Terminal的映射。 Signed-off-by: facat@lab.com <facat@lab.com>
This commit is contained in:
19
testHasttable/nodetoterminal.h
Normal file
19
testHasttable/nodetoterminal.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#ifndef NODETOTERMINAL_H
|
||||
#define NODETOTERMINAL_H
|
||||
//一个通过Node检索Terminal的表,做成单例形式
|
||||
#include <QHash>
|
||||
#include <QString>
|
||||
class NodeToTerminal
|
||||
{
|
||||
public:
|
||||
explicit NodeToTerminal();
|
||||
~NodeToTerminal();
|
||||
void add(const QString& key,const QString& value);
|
||||
bool contains(const QString& key);
|
||||
QString value(const QString& key);
|
||||
private:
|
||||
static QHash<QString,QString> *ht;
|
||||
|
||||
|
||||
};
|
||||
#endif // NODETOTERMINAL_H
|
||||
Reference in New Issue
Block a user