00001 /*************************************************************************** 00002 * Copyright (C) 2002 by Yann Hodique * 00003 * Yann.Hodique@lifl.fr * 00004 * * 00005 * This program is free software; you can redistribute it and/or modify * 00006 * it under the terms of the GNU General Public License as published by * 00007 * the Free Software Foundation; either version 2 of the License, or * 00008 * (at your option) any later version. * 00009 ***************************************************************************/ 00010 00011 #include "MtpContext.h" 00012 00013 00014 MtpContext::MtpContext() {} 00015 00016 00017 MtpContext::~MtpContext() {} 00018 00019 void MtpContext::setVar(const QString& name, const QString& value) { 00020 var_map.insert(name,value); 00021 } 00022 00023 void MtpContext::unsetVar(const QString& name) { 00024 var_map.remove(name); 00025 } 00026 00027 QString MtpContext::getValue(const QString& name) { 00028 QMap<QString,QString>::Iterator it; 00029 if ((it = var_map.find(name)) != var_map.end()) 00030 return *it; 00031 else 00032 return QString::null; 00033 }