/** @class SolImageSample.cpp @author Brian Magill @datecreated 3/7/2006 $Date:$ $Revision:$ @copyright (©) Copyright 2006 by GATS Inc. 11864 Canon Blvd., Suite 101, Newport News, VA 23606 All Rights Reserved. No part of this software or publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise without the prior written permission of GATS Inc. @brief Solar Image data for a given instant in time */ //---------------------------------------------------------------------- // #include #include #include "SolImageSample.h" //#include "SOFIE_Exception.h" #include "SOFIE_namespace.h" using namespace SOFIE; using namespace std; SolImageSample& SolImageSample::operator = (const SolImageSample& rhs ) { if (this == &rhs) return *this; time = rhs.time; ImageData.resize(SolarImgSampleSize); ImageData = rhs.ImageData; return *this; } bool SolImageSample::operator < (const SolImageSample& rhs ) const { if ( time < rhs.time ) return true; else return false; } bool SolImageSample::operator > (const SolImageSample& rhs ) const { if ( time > rhs.time ) return true; else return false; } void SolImageSample::dump() const{ unsigned long Ind; cout << time; cout << ": "; for(Ind = 0; Ind < ImageData.size(); Ind++) cout << ImageData[Ind] << " "; cout << endl; } int SolImageSample::getImageData(unsigned long indx) const { // if (0 < indx && indx < ImageData.size() ) if (indx < ImageData.size() ) return ImageData[indx]; else throw runtime_error("SolImageSample::getImageData(): invalid image element"); }