cimforreduceloss/testHasttable/nodetoterminal.h

20 lines
444 B
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#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