diff options
author | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-12-07 10:20:41 +0100 |
---|---|---|
committer | wolfbeast <mcwerewolf@wolfbeast.com> | 2019-12-07 10:20:41 +0100 |
commit | 0fddf6e728ddea66a463e1ccd007aa9d48498905 (patch) | |
tree | 65e28a16bbfcf1747ca41a6a808136ee578735d9 /db/mork/src/morkYarn.cpp | |
parent | 210d6a87a2759887ce286288ab0815cbd0439e5a (diff) | |
parent | 18159927e8f37a1858f9757803b20744fcfff505 (diff) | |
download | UXP-0fddf6e728ddea66a463e1ccd007aa9d48498905.tar UXP-0fddf6e728ddea66a463e1ccd007aa9d48498905.tar.gz UXP-0fddf6e728ddea66a463e1ccd007aa9d48498905.tar.lz UXP-0fddf6e728ddea66a463e1ccd007aa9d48498905.tar.xz UXP-0fddf6e728ddea66a463e1ccd007aa9d48498905.zip |
Merge branch 'release' into Pale_Moon-release
Diffstat (limited to 'db/mork/src/morkYarn.cpp')
-rw-r--r-- | db/mork/src/morkYarn.cpp | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/db/mork/src/morkYarn.cpp b/db/mork/src/morkYarn.cpp new file mode 100644 index 000000000..ce52a741e --- /dev/null +++ b/db/mork/src/morkYarn.cpp @@ -0,0 +1,75 @@ +/* -*- 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 + +//3456789_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"); +} + +//3456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789 |