00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef __CH_File__
00020 #define __CH_File__
00021
00022 #include "CH_API.h"
00023 #include "CH_Manager.h"
00024
00025 class CH_API CH_File
00026 {
00027 public:
00028 enum Error
00029 {
00030 INVALID_FRAME_RANGE = -1,
00031 FILE_NOT_LOADED = -2,
00032 FILE_NOT_SAVED = -3,
00033 NO_DATA_IN_FILE = -4,
00034 NO_CHANNELS = -5,
00035 NO_PARAMETERS = -6,
00036 ALLOCATION_FAILED = -7
00037 };
00038
00039
00040
00041 static void getTimeRange(const float *from, const float *to,
00042 float &tstart, float &tend);
00043
00044
00045 static int loadRawChannels(CH_ChannelRefList *chrefs,
00046 const char *filename,
00047 CH_CollectionList &parents,
00048 const float *from = NULL, const float *to = NULL,
00049 bool full_replace = false);
00050
00051
00052 static int saveRawChannels(CH_ChannelList &list,
00053 const char *filename, bool binary,
00054 const float *from = NULL, const float *to = NULL);
00055 };
00056
00057 #endif
00058