Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Fourier/Unimodal/unimodal.cpp

Go to the documentation of this file.
00001 #include "unimodal.h"
00002 #include <stdio.h>
00003 
00004 //----------------------------------------------------------------------------
00005 //------------------------- public getDataName() -----------------------------
00006 //----------------------------------------------------------------------------
00007 
00008 const char *vu171::getDataName(void) const
00009 {
00010     return m_DataName.c_str();
00011 }
00012 
00013 //----------------------------------------------------------------------------
00014 //------------------------- protected read() ---------------------------------
00015 //----------------------------------------------------------------------------
00016 
00017 bool vu171::read(FILE *file)
00018 {
00019     int ret = 0;
00020     int len = 0;
00021 
00022     bool success = vu17::read(file);
00023     if (!success) return false;
00024 
00025     //Read in the modality of the data
00026     ret = fscanf(file,"UNIMODAL %n",&len);
00027     if (len < 9) return setInvalidFormatError();
00028 
00029     return true;
00030 }
00031 
00032 //----------------------------------------------------------------------------
00033 //------------------------- protected write() --------------------------------
00034 //----------------------------------------------------------------------------
00035 
00036 bool vu171::write(FILE *file)
00037 {
00038     int ret = 0;
00039 
00040     bool success = vu17::write(file);
00041     if (!success) return false;
00042 
00043     //Write the modality of the data
00044     ret = fprintf(file,"UNIMODAL\n");
00045 
00046     if (ret > 0)
00047         return true;
00048     else
00049         return setWriteError();
00050 }

Generated on Wed Dec 15 21:20:32 2004 for vuVolume by  doxygen 1.3.9.1