////////////////////////////////////////////////////////////////////////// // // (C) Copyright 2002 by GATS, Inc. // 11864 Canon Blvd., STE 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. // /////////////////////////////////////////////////////////////////////////// // // // Class: SGI_FileReader // // Filename: SGI_FileReader.cpp // // Description: contains methods and variables to read SGI file. // Refer to header file for more details. // // Author: Y.Wang // (757)873-5920 // ////////////////////////////////////////////////////////////////////////// #include #include #include #include #include #include //#include //#include #include #include "SGI_FileReader.h" using namespace std; /////////////////////////////////////////////////////////////////////// // // Method: SGI_FileReader // // Description: Default constructor. // ////////////////////////////////////////////////////////////////////////// SGI_FileReader::SGI_FileReader() { BasicInitialize(); } /////////////////////////////////////////////////////////////////////// // // Method: SGI_FileReader // // Description: Class constructor. Gives the class the name of the file // to be read. // // Inputs: the_filename - The name of the file to be read. // ////////////////////////////////////////////////////////////////////////// SGI_FileReader::SGI_FileReader(const std::string &the_filename) { //cout<<"Input File Name: "<= RecordCounter + 1) { midRecord = (endRecord + RecordCounter)/2; // Read in Date from SGI record #midRecord index[0]= midRecord; if (NC_NOERR != nc_get_var1_long(ncid,0,index,&dateSGI)) { cerr<<"ERROR: Failed to read the Date from the SGI file."<