nexception.cpp

00001 // LICENSE: (Please see the file COPYING for details)
00002 //
00003 // NUS - Nemesis Utilities System: A C++ application development framework 
00004 // Copyright (C) 2006, 2007 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 "nexception.h"
00023 
00024 DllDeclSpec const Flag NException::EX_NONE = 0;
00025 DllDeclSpec const Flag NException::EX_OUT_OF_BOUNDS = 1;
00026 
00027 NException::NException(void) : 
00028             m_description(),
00029             m_module(NOT_SET),
00030             m_flag(EX_NONE)
00031 { }
00032 
00033 
00034 NException::NException(const NString &description, Module module, Flag flag)
00035       : m_description(description),
00036       m_module(module),
00037       m_flag(flag)
00038 { 
00039       
00040 }
00041 
00042 
00043 NException::~NException(void) { }
00044 
00045 
00046 void NException::setDescription(const NString &desc) { 
00047       m_description = desc;
00048 }
00049 
00050 
00051 NString NException::getDescription(void) const { 
00052       return m_description;
00053 }
00054 
00055 
00056 void NException::setModule(NException::Module module) { 
00057       m_module = module;
00058 }
00059 
00060 
00061 NException::Module NException::getModule(void) const { 
00062       return m_module;
00063 }
00064 
00065 
00066 void NException::setFlag(Flag flag) { 
00067       m_flag = flag;
00068 }
00069 
00070 
00071 Flag NException::getFlag(void) const {
00072       return m_flag;
00073 }
00074 
00075 
00076 NException &NException::operator=(const NException &rhs) { 
00077       setDescription(rhs.getDescription());
00078       setModule(rhs.getModule());
00079       
00080       return *this;
00081 }

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