Blame view

server/kernel/src/File/FileWriterAbstract.h 1004 Bytes
346b85c6   Benjamin Renard   First commit with...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef FILEWRITERABSTRACT_H
#define FILEWRITERABSTRACT_H

#include "../Common/TREPSTypes.h"
#include "../Application/Application.h"
#include "../DataRecord/DataRecordList.h"

using namespace TREPS::Common;
using namespace TREPS::Application;
using namespace TREPS::DataRecord;

namespace TREPS
{
	namespace File
	{
		class FileWriterAbstractClass
		{
			public :
				FileWriterAbstractClass(void);

				virtual ~FileWriterAbstractClass(void) = 0;

				//file creation + write general attributes
				virtual bool init(const char *file_path, const map<string,string> *attributes) = 0;

				//write fields and data
				virtual bool writeData(const DataRecordListClass *data, t_TimeFormat timeFormat,
							const char *timePattern, const t_FieldList *fields) = 0;

				//save the file
				virtual bool save(void) = 0;

				//close the file
				virtual bool close(void) = 0;

				//test if the file is opened
				virtual bool isOpened(void) = 0;

			protected :
				ApplicationClass *app;
		};
	}
}

#endif