diff options
author | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-10-07 22:33:50 +0200 |
---|---|---|
committer | Jannis M. Hoffmann <jannis@fehcom.de> | 2023-10-08 11:35:51 +0200 |
commit | 1978c49bea5b439d993067c055cec47e70db8fd6 (patch) | |
tree | 255caea96a13f95564e6b631be9a4ac55ce33cd9 /src/mailbox.cc | |
parent | 3b1278f5459514a6d6364f068ff97b8a0432057b (diff) |
minor refactoring
Diffstat (limited to 'src/mailbox.cc')
-rw-r--r-- | src/mailbox.cc | 31 |
1 files changed, 7 insertions, 24 deletions
diff --git a/src/mailbox.cc b/src/mailbox.cc index fd83276..23ed2a5 100644 --- a/src/mailbox.cc +++ b/src/mailbox.cc @@ -1,104 +1,87 @@ -/** -------------------------------------------------------------------- +/** * @file mailbox.cc * @brief Implementation of the Mailbox class. * @author Andreas Aardal Hanssen * @date 2002-2005 - * ----------------------------------------------------------------- **/ + */ + #include "mailbox.h" #include "message.h" #include <string> -using namespace ::std; using namespace Binc; -//------------------------------------------------------------------------ Mailbox::BaseIterator::BaseIterator(int sqn) { sqnr = sqn; } -//------------------------------------------------------------------------ Mailbox::BaseIterator::~BaseIterator(void) {} -//------------------------------------------------------------------------ Mailbox::Mailbox(void) : readOnly(false) {} -//------------------------------------------------------------------------ Mailbox::~Mailbox(void) {} -//------------------------------------------------------------------------ bool Mailbox::isReadOnly(void) const { return readOnly; } -//------------------------------------------------------------------------ void Mailbox::setReadOnly(bool readOnly) { this->readOnly = readOnly; } -//------------------------------------------------------------------------ Mailbox::iterator::iterator(BaseIterator &i) : realIterator(i) {} -//------------------------------------------------------------------------ Message &Mailbox::iterator::operator*(void) { return *realIterator; } -//------------------------------------------------------------------------ void Mailbox::iterator::operator++(void) { ++realIterator; } -//------------------------------------------------------------------------ bool Mailbox::iterator::operator==(const iterator &i) const { return realIterator == i.realIterator; } -//------------------------------------------------------------------------ bool Mailbox::iterator::operator!=(const iterator &i) const { return realIterator != i.realIterator; } -//------------------------------------------------------------------------ void Mailbox::iterator::erase(void) { realIterator.erase(); } -//------------------------------------------------------------------------ unsigned int Mailbox::iterator::getSqnr(void) const { return realIterator.sqnr; } -//------------------------------------------------------------------------ -void Mailbox::setName(const string &name) +void Mailbox::setName(const std::string &name) { this->name = name; } -//------------------------------------------------------------------------ -const string Mailbox::getName(void) const +const std::string Mailbox::getName(void) const { return name; } -//------------------------------------------------------------------------ -const string &Mailbox::getLastError(void) const +const std::string &Mailbox::getLastError(void) const { return lastError; } -//------------------------------------------------------------------------ -void Mailbox::setLastError(const string &error) const +void Mailbox::setLastError(const std::string &error) const { lastError = error; } |