nhash.cpp

Go to the documentation of this file.
00001 // LICENSE: (Please see the file COPYING for details)
00002 //
00003 // NUS - Nemesis Utilities System: A C++ application development framework 
00004 // Copyright (C) 2006, 2008 Otavio Rodolfo Piske
00005 //
00006 //  This file is part of NUS
00007 //
00008 //  This library is free software; you can redistribute it and/or
00009 //  modify it under the terms of the GNU Lesser General Public
00010 //  License as published by the Free Software Foundation version 2.1
00011 //  of the License.
00012 //
00013 //  This library is distributed in the hope that it will be useful,
00014 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016 //  Lesser General Public License for more details.
00017 //
00018 //  You should have received a copy of the GNU Lesser General Public
00019 //  License along with this library; if not, write to the Free Software
00020 //  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00021 //
00022 #include "nhash.h"
00023 
00028 NHash::NHash(const NString name, const NString &value)
00029       : m_name(name),
00030       m_value(value)
00031 {
00032 
00033 }
00034 
00035 
00036 NHash::NHash(const NHash &other)
00037       : m_name(other.m_name),
00038       m_value(other.m_value)
00039 {
00040 
00041 }
00042 
00043 NString NHash::getName(void) const {
00044       return m_name;
00045 }
00046 
00047 
00048 NString NHash::getValue(void) const {
00049       return m_value;
00050 }
00051 
00052 
00053 NHash &NHash::operator=(const NHash &rhs) {
00054       m_name = rhs.getName();
00055       m_value = rhs.getValue();
00056       
00057       return *this;
00058 }
00059 
00060 
00061 bool NHash::operator==(const NHash &rhs) {
00062       if (m_name != rhs.m_name) {
00063             return false;
00064       }
00065       
00066       if (m_value != rhs.m_value) {
00067             return false;
00068       }
00069       
00070       return true;
00071 }
00072 

Generated on Wed Mar 5 23:10:35 2008 for NemesisUtilitiesSystem by  doxygen 1.5.4