diff options
author | Patrick Williams <iawillia@us.ibm.com> | 2012-05-23 13:36:26 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-06-07 14:21:56 -0500 |
commit | e9ac3a3dbf5277e879970c9f07f10e6f75180642 (patch) | |
tree | 6d72ce3eaf983fcf994b531a49508ef49a609f23 /src/usr/util/utilstream.C | |
parent | 870a420dde20aff736d4a6e38517e9104b35ffce (diff) | |
download | talos-hostboot-e9ac3a3dbf5277e879970c9f07f10e6f75180642.tar.gz talos-hostboot-e9ac3a3dbf5277e879970c9f07f10e6f75180642.zip |
Port UtilStream, UtilMem, UtilFile from FSP.
Change-Id: Id17617544a8c4ed646aa8410cb968ba9376dea68
RTC: 41638
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1097
Tested-by: Jenkins Server
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/util/utilstream.C')
-rw-r--r-- | src/usr/util/utilstream.C | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/src/usr/util/utilstream.C b/src/usr/util/utilstream.C new file mode 100644 index 000000000..69a5fe1e0 --- /dev/null +++ b/src/usr/util/utilstream.C @@ -0,0 +1,82 @@ +/* IBM_PROLOG_BEGIN_TAG + * This is an automatically generated prolog. + * + * $Source: src/usr/util/utilstream.C $ + * + * IBM CONFIDENTIAL + * + * COPYRIGHT International Business Machines Corp. 2003-2012 + * + * p1 + * + * Object Code Only (OCO) source materials + * Licensed Internal Code Source Materials + * IBM HostBoot Licensed Internal Code + * + * The source code for this program is not published or other- + * wise divested of its trade secrets, irrespective of what has + * been deposited with the U.S. Copyright Office. + * + * Origin: 30 + * + * IBM_PROLOG_END_TAG + */ +/** + * @file utilstream.C + * + * @brief Stream manipulation + * + * Used for creating and manipulating streams +*/ + +/*****************************************************************************/ +// I n c l u d e s +/*****************************************************************************/ +#include <util/utilstream.H> + + +/*****************************************************************************/ +// Default Constructor +/*****************************************************************************/ +UtilStream::UtilStream() +: iv_eof( false ), iv_lastError( 0 ) +{ +} + + +/*****************************************************************************/ +// Assignment operator +/*****************************************************************************/ +UtilStream & UtilStream::operator= ( const UtilStream & i_right ) +{ + if ( &i_right != this ) + { + delete iv_lastError; + + iv_eof = false; + iv_lastError = 0; + + } + + return *this; +} + + +/*****************************************************************************/ +// Default destructor +/*****************************************************************************/ +UtilStream::~UtilStream() +{ + delete iv_lastError; +} + + +/*****************************************************************************/ +// Set the last Error Log +/*****************************************************************************/ +void UtilStream::setLastError( errlHndl_t i_error ) +{ + delete iv_lastError; + iv_lastError = i_error; +} + |