GlfRefSection.h

00001 /*
00002  *  Copyright (C) 2010  Regents of the University of Michigan
00003  *
00004  *   This program is free software: you can redistribute it and/or modify
00005  *   it under the terms of the GNU General Public License as published by
00006  *   the Free Software Foundation, either version 3 of the License, or
00007  *   (at your option) any later version.
00008  *
00009  *   This program is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *   GNU General Public License for more details.
00013  *
00014  *   You should have received a copy of the GNU General Public License
00015  *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016  */
00017 
00018 #ifndef __GLF_REFSECTION_H__
00019 #define __GLF_REFSECTION_H__
00020 
00021 #include <stdint.h>
00022 
00023 #include "InputFile.h" 
00024 #include "CharBuffer.h"
00025 
00026 class GlfRefSection
00027 {
00028 public:
00029     GlfRefSection();
00030     ~GlfRefSection();
00031 
00032     // Copy Constructor   
00033     GlfRefSection(const GlfRefSection& refSection);
00034 
00035     // Overload operator = to copy the passed in refSection into this refSection.
00036     GlfRefSection & operator = (const GlfRefSection& refSection);
00037 
00038     // Overload operator = to copy the passed in refSection into this refSection.
00039     bool copy(const GlfRefSection& refSection);
00040 
00041     void resetRefSection();
00042    
00043     // Read the refSection from the specified file.  Assumes the file is in
00044     // the correct position for reading the refSection.
00045     bool read(IFILE filePtr);
00046 
00047     // Write the refSection to the specified file.
00048     bool write(IFILE filePtr) const;
00049 
00051     // Accessors.
00052 
00053     //Get
00054     bool getName(std::string& name) const;
00055     uint32_t getRefLen() const;
00056 
00057     // Set
00058     bool setName(const std::string& name);
00059     bool setRefLen(uint32_t refLen);
00060 
00061     void print() const;
00062 
00063 private:
00064 
00065     CharBuffer myRefName;
00066     uint32_t myRefLen;
00067 };
00068 
00069 #endif
00070 
Generated on Tue Nov 9 16:11:49 2010 for StatGen Software by  doxygen 1.6.3