AppCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cardeventcreator.h
Go to the documentation of this file.
1 #ifndef __CARDEVENTCREATOR_H
2 #define __CARDEVENTCREATOR_H
3 
4 #include "appcore/cardevent/cardeventdatfilemanager.h"
5 #include "appcore/cardevent/eventpurse.h"
6 #include "appcore/cardevent/EventPrepaidTicket.h"
7 #include "appcore/cardevent/eventblacklist.h"
8 #include "appcore/cardevent/EventPrepaidTicketZone.h"
9 #include "appcore/cardevent/EventPrepaidTicketRange.h"
10 #include "appcore/cardevent/deletedevent.h"
11 
12 #ifdef _WINDOWS
13 #pragma pack( push, 1 )
14 #endif
16 {
17  long long SNR;
18  unsigned long CardEventID;
19 }
20 #ifdef _WINDOWS
21 #pragma pack(pop)
22 #else
23 __attribute__ ((packed))
24 #endif
25 ;
26 
28 
34 {
35 private:
36  CardEventCreatorPr __EDATAPTR d;
37 
38 public:
41 
42  void Init( __ESTRING path );
43 
48  void AddCardEvent( CardEvent __EDATAPTR cardEvent );
49 
50  void Write();
51 
55  void GetBytes( __EBYTEARR __EDATAPTR __EVALREF idxFileBuffer, __EBYTEARR __EDATAPTR __EVALREF datFileBuffer, unsigned long __EVALREF idxFileSize, unsigned long __EVALREF datFileSize );
56 
64  unsigned long GetBytes( __EBYTEARR __EDATAPTR __EVALREF idx_dat_FileBuffer );
65 
74  static int MergeCumulative( __ESTRING pathOld, __ESTRING pathUpd, unsigned long &maxEventNumberInUpdate );
75 
83  static bool CleanEventFile( __ESTRING path );
84 
90  unsigned long GetValidFrom();
91 
97  unsigned long GetValidTo();
98 
104  void SetValidFrom( unsigned long from );
105 
111  void SetValidTo( unsigned long to );
112 
120  void SetFileType( char type );
121 };
122 
123 #endif //__CARDEVENTCREATOR_H
#define __ECLASS
Definition: managed_defines.h:17
#define __EVALREF
Definition: managed_defines.h:15
unsigned long GetValidTo()
#define LIBCARDEVENT_API
Definition: LibCardEvent.h:13
unsigned long CardEventID
Definition: cardeventcreator.h:18
void AddCardEvent(CardEvent __EDATAPTR cardEvent)
Definition: cardeventcreator.cpp:115
~CardEventCreator()
Definition: cardeventcreator.cpp:87
struct DeletedEvents __attribute__((packed))
EEventTripTicketPr __EDATAPTR d
Definition: EEventTripTicket.h:96
#define __EBYTEARR
Definition: managed_defines.h:22
#define __ESTRING
Definition: managed_defines.h:16
void SetValidFrom(unsigned long from)
__EPUBLIC __ECLASS LIBCARDEVENT_API CardEventCreator
Class for composing event files. You can add events and then export as binary file.
Definition: cardeventcreator.h:34
__ECLASS CardEventCreatorPr
Definition: cardeventcreator.h:27
#define __EPUBLIC
Definition: managed_defines.h:20
void Write()
__EPUBLIC __ECLASS LIBCARDEVENT_API CardEvent
The ancestor of all events. Contains common information for all events.
Definition: cardevent.h:17
static bool CleanEventFile(__ESTRING path)
void SetValidTo(unsigned long to)
void SetFileType(char type)
long long SNR
Definition: cardeventcreator.h:17
#define __EDATAPTR
Definition: managed_defines.h:14
static int MergeCumulative(__ESTRING pathOld, __ESTRING pathUpd, unsigned long &maxEventNumberInUpdate)
unsigned long GetValidFrom()
Definition: cardeventcreator.h:15
void GetBytes(__EBYTEARR __EDATAPTR __EVALREF idxFileBuffer, __EBYTEARR __EDATAPTR __EVALREF datFileBuffer, unsigned long __EVALREF idxFileSize, unsigned long __EVALREF datFileSize)
Definition: cardeventcreator.cpp:162
void Init(__ESTRING path)