@@ -1,10 +1,13 @@
|
||||
#include "nodetoterminal.h"
|
||||
#include <iostream>
|
||||
QHash<QString,QString> *NodeToTerminal::ht=NULL;
|
||||
NodeToTerminal::NodeToTerminal()
|
||||
{
|
||||
if(!NodeToTerminal::ht)
|
||||
{
|
||||
// std::cout<<"create"<<std::endl;
|
||||
NodeToTerminal::ht=new QHash<QString,QString>;
|
||||
// std::cout<<this->value("").toStdString()<<std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,14 +23,24 @@ bool NodeToTerminal::contains(const QString& key)
|
||||
|
||||
QString NodeToTerminal::value(const QString& key)
|
||||
{
|
||||
// if(NodeToTerminal::ht)
|
||||
// {
|
||||
// //return NodeToTerminal::ht->value(key);
|
||||
// return "not null";
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// return "null";
|
||||
// }
|
||||
// return "";
|
||||
return NodeToTerminal::ht->value(key);
|
||||
}
|
||||
|
||||
NodeToTerminal::~NodeToTerminal()
|
||||
{
|
||||
if(NodeToTerminal::ht)
|
||||
{
|
||||
delete NodeToTerminal::ht;
|
||||
NodeToTerminal::ht=NULL;
|
||||
}
|
||||
// if(NodeToTerminal::ht)
|
||||
// {
|
||||
// delete NodeToTerminal::ht;
|
||||
// NodeToTerminal::ht=NULL;
|
||||
// }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user