diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /comm/mailnews/db/mork/morkYarn.cpp | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'comm/mailnews/db/mork/morkYarn.cpp')
-rw-r--r-- | comm/mailnews/db/mork/morkYarn.cpp | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/comm/mailnews/db/mork/morkYarn.cpp b/comm/mailnews/db/mork/morkYarn.cpp new file mode 100644 index 0000000000..013b36c754 --- /dev/null +++ b/comm/mailnews/db/mork/morkYarn.cpp @@ -0,0 +1,70 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +#ifndef _MDB_ +# include "mdb.h" +#endif + +#ifndef _MORK_ +# include "mork.h" +#endif + +#ifndef _MORKNODE_ +# include "morkNode.h" +#endif + +#ifndef _MORKENV_ +# include "morkEnv.h" +#endif + +#ifndef _MORKYARN_ +# include "morkYarn.h" +#endif + +// 456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789 + +// ````` ````` ````` ````` ````` +// { ===== begin morkNode interface ===== + +/*public virtual*/ void morkYarn::CloseMorkNode( + morkEnv* ev) /*i*/ // CloseYarn() only if open +{ + if (this->IsOpenNode()) { + this->MarkClosing(); + this->CloseYarn(ev); + this->MarkShut(); + } +} + +/*public virtual*/ +morkYarn::~morkYarn() /*i*/ // assert CloseYarn() executed earlier +{ + MORK_ASSERT(mYarn_Body.mYarn_Buf == 0); +} + +/*public non-poly*/ +morkYarn::morkYarn(morkEnv* ev, /*i*/ + const morkUsage& inUsage, nsIMdbHeap* ioHeap) + : morkNode(ev, inUsage, ioHeap) { + if (ev->Good()) mNode_Derived = morkDerived_kYarn; +} + +/*public non-poly*/ void morkYarn::CloseYarn( + morkEnv* ev) /*i*/ // called by CloseMorkNode(); +{ + if (this->IsNode()) + this->MarkShut(); + else + this->NonNodeError(ev); +} + +// } ===== end morkNode methods ===== +// ````` ````` ````` ````` ````` + +/*static*/ void morkYarn::NonYarnTypeError(morkEnv* ev) { + ev->NewError("non morkYarn"); +} + +// 456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789 |