Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals

MRAmp.h

Go to the documentation of this file.
00001 // MRAmp.h
00002 //////////////////////////////////////////////////////////////////////
00003 //          (c) Copyright 2002 Brown Deer Technology, LLC.
00004 //                        All rights reserved.
00005 //////////////////////////////////////////////////////////////////////
00006 
00007 #ifndef MRAMP_H
00008 #define MRAMP_H
00009 
00010 #ifdef USE_STD
00011 #include <iostream>
00012 using namespace std;
00013 #else
00014 #include <iostream.h>
00015 #endif
00016 
00017 #include "Buffer.h"
00018 #include "MRAmpBase.h"
00019 
00020 class MRAmp : public MRAmpBase
00021 {
00022    public:
00023 
00024       MRAmp();
00025       MRAmp( const MRAmp& );
00026       MRAmp( const MRAmpEncode& mpenc );
00027 
00028       ~MRAmp();
00029 
00030       MRAmp& copy( const MRAmp& );
00031       MRAmp& operator = ( const MRAmp& );
00032 
00033 };
00034 
00035 inline
00036 MRAmp::MRAmp() : MRAmpBase( new Buffer ) {}
00037 
00038 inline
00039 MRAmp::MRAmp( const MRAmp& mp )
00040   : MRAmpBase( mp , new Buffer( *dynamic_cast<Buffer*>(mp._ptbuffer) ) )
00041 {}
00042 
00043 inline
00044 MRAmp::MRAmp( const MRAmpEncode& mpenc ) : MRAmpBase( mpenc, new Buffer ) {}
00045 
00046 inline
00047 MRAmp::~MRAmp() 
00048 {
00049 //   if ( _ptbuffer != 0 ) { delete _ptbuffer; _ptbuffer = 0; }
00050 }
00051 
00052 inline
00053 MRAmp& MRAmp::copy( const MRAmp& mp )
00054 {
00055 //   dynamic_cast<MRAmpBase&>(this) 
00056 //     = dynamic_cast<MRAmpBase&>(mp);
00057 
00058 //   MRAmpBase::copy(mp);
00059    if ( _ptbuffer != 0 ) { delete _ptbuffer; _ptbuffer = 0; }
00060    _ptbuffer = new Buffer( *dynamic_cast<Buffer*>(mp._ptbuffer) );
00061    MRAmpBase::copy(mp);
00062 
00063    return *this;
00064 }
00065 
00066 inline
00067 MRAmp& MRAmp::operator = ( const MRAmp& rhs ) { return copy(rhs); }
00068 
00069 #endif
00070 

Generated on Mon May 31 21:38:50 2004 for SR2k4 Assembler by doxygen 1.3.6