00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef _AGFIO_H_
00010 #define _AGFIO_H_
00011
00012 #include <string>
00013 #include <map>
00014 #include <AGTypes.h>
00015 #include "agfioError.h"
00016
00017 using namespace std;
00018
00020 class DllExport agfio
00021 {
00022 public:
00023
00025 class LoadError : public agfioError
00026 {
00027 public:
00028 LoadError(const string &s);
00029 };
00030
00032 class StoreError : public agfioError
00033 {
00034 public:
00035 StoreError(const string &);
00036 };
00037
00038
00039 private:
00040
00042 class IdError : public agfioError
00043 {
00044 public:
00045 IdError(const string &s);
00046 };
00047
00048 void
00049 idcheck(const string& id);
00050
00051 virtual bool
00052 is_id_required() = 0;
00053
00054 virtual AGIds
00055 load() = 0;
00056
00057
00058 protected:
00059
00060 string annotationFile;
00061 AGSetId agsetId;
00062 AGIds agIds;
00063 AGId agId;
00064 TimelineId timelineId;
00065 SignalId signalId;
00066
00067 map<string,string>* signalInfo;
00068 map<string,string>* options;
00069
00070
00071 public:
00072
00074
00195 AGIds
00196 load(const string& annotationFile,
00197 const string& id = "",
00198 map<string,string>* signalInfo = NULL,
00199 map<string,string>* options = NULL);
00200
00202
00210 virtual void
00211 store(const string& filename,
00212 const AGIds& agIds = "",
00213 map<string,string>* options = NULL)
00214 {}
00215
00216 AGSetId
00217 get_agsetid()
00218 { return agsetId; }
00219
00220 };
00221
00222 #endif