DataIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
EIDOLTwoReader.h
Go to the documentation of this file.
1 #ifndef EIDOL_TWO_READER_H
2 #define EIDOL_TWO_READER_H
3 
4 #include <string>
5 #include "dataio/DataIODefines.h"
6 
7 struct ETariffUnit
8 {
9  short m_BusStopFrom;
10  short m_BusStopTo;
11  short m_TariffUnitCount;
12 
13  long LoadData( FILE *dataFile );
14 };
15 
17 {
18 public:
19  // return values { 0 = all ok ; 1 = some error; 2 = from not found; 3 = to not found }
20  static long FindTariffUnitCount( short &tariffUnitCount, short busStopFrom, short busStopTo, const char* idolTwoFileName );
21 
22  static long GetTariffUnitByIdx( short &tariffUnitCount, short &busStopFrom, short &busStopTo, int idx, const char* idolTwoFileName );
23 
24  static long GetTariffUnitCount( const char* idolTwoFileName );
25 
26  static ETariffUnit* GetAllUnits( int &count, const char* idolTwoFileName);
27 
28  static short GetReaderVersion();
29 
30  static long IdolTwoHeader( short &fileVersion1, std::string &fileVersion2, std::string &validityDate, const char* idolTwoFileName );
31 
32 private:
33  static long Find( FILE* file, long startPos, long endPos, short busStopFrom, short busStopTo, short &result, short recordSize );
34 };
35 
36 #endif
short m_BusStopTo
Definition: EIDOLTwoReader.h:10
long LoadData(FILE *dataFile)
Definition: EIDOLTwoReader.cpp:25
short m_TariffUnitCount
Definition: EIDOLTwoReader.h:11
short m_BusStopFrom
Definition: EIDOLTwoReader.h:9
Definition: EIDOLTwoReader.h:7
Definition: EIDOLTwoReader.h:16
#define DATAIO_API
Definition: DataIODefines.h:10