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