Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | File List | Namespace Members | Data Fields | Globals | Related Pages

RodOutList.cxx

00001 // File: RodOutList.cxx
00002 // $Header: /afs/cern.ch/user/s/sctpixel/private/cvsroot/RodDaq/RodCrate/RodOutList.cxx,v 1.3.6.1 2005/10/08 16:36:01 sctroddq Exp $
00003 //
00004 // Description:
00005 //  Class RodOutList contains the reply lists which are responses from a 
00006 //  primitive list.
00007 //
00008 // @author Tom Meyer (meyer@iastate.edu) - originator
00009 //
00010 
00011 // Namespace for the common routines for SCT and PIXEL ROD software.
00012 
00013 #include "RodOutList.h"
00014 
00015 namespace SctPixelRod {
00016 
00017 // Constructors
00018     /*
00019     The only constructor.
00020     */
00021     RodOutList::RodOutList( long length) {
00022       m_length = length;
00023       m_body = new unsigned long[length];
00024     }
00025 
00026     /*
00027     The copy constructor.
00028     */
00029     RodOutList::RodOutList( const RodOutList& rhs){
00030       if (this == &rhs) return;
00031       m_length = rhs.getLength();
00032       m_body = rhs.getBody();
00033       return;
00034     }
00035 
00036 // Destructor
00037     /*
00038     The destructor. We MUST be sure to delete the space allocated on the heap for m_body.
00039     For safety, we also set the pointer to zero to avoid pointers into la-la land.
00040     */
00041     RodOutList::~RodOutList() 
00042     {
00043       delete [] m_body;
00044       m_body = 0;
00045     }
00046 
00047 // Overload = operator
00048     /*
00049     Overload the assignment operator to allow us to equate objects of this class. Note the
00050     special case to handle assigning an object to itself (i.e. A=A).
00051     */
00052     RodOutList& RodOutList::operator=( const RodOutList& rhs)
00053     {
00054       if (this == &rhs) return *this;
00055       m_length = rhs.getLength();
00056       m_body = rhs.getBody();
00057       return *this;
00058     }
00059 
00060 
00061 } // End namespace SctPixelRod

Generated on Fri Dec 16 19:38:16 2005 for SCT DAQ/DCS Software - C++ by doxygen 1.3.5