1 /*--------------------------------------------------------------------------*/
3 * ( http://www.scilab.org/ ) - This file is part of Scilab
4 * Copyright (C) DIGITEO - 2009 - Allan CORNET
6 * This file must be used under the terms of the CeCILL.
7 * This source file is licensed as described in the file COPYING, which
8 * you should have received as part of this distribution. The terms
9 * are also available at
10 * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
13 /*--------------------------------------------------------------------------*/
16 /*--------------------------------------------------------------------------*/
18 #include "DiaryModesEnum.hxx"
19 /*--------------------------------------------------------------------------*/
23 std::wstring wfilename;
33 /* see DiaryModesEnum.hxx */
34 diary_prefix_time_format PrefixTimeFormat;
36 /* see DiaryModesEnum.hxx */
37 diary_prefix_time_filter PrefixIoModeFilter;
39 /* see DiaryModesEnum.hxx */
40 diary_filter IoModeFilter;
43 * used on Windows to replace carriage return
45 std::wstring replace(std::wstring text, std::wstring s, std::wstring replacement);
51 Diary(std::wstring _wfilename,int _mode,int ID);
59 * get filename of this diary
61 std::wstring getFilename(void);
66 void setIOMode(diary_filter _mode);
67 diary_filter getIOMode(void);
70 * get ID of this diary
75 * write a string in this diary
77 void write(std::wstring _wstr, bool bInput);
80 * write a line in this diary
82 void writeln(std::wstring _wstr, bool bInput);
85 * get & set Resume mode
87 bool setSuspendWrite(bool bWith);
88 bool getSuspendWrite(void);
91 * get & set Prefix mode
93 void setPrefixMode(diary_prefix_time_format iPrefixTimeFormat);
94 diary_prefix_time_format getPrefixMode(void);
97 * get & set IO mode filter
99 void setPrefixIoModeFilter(diary_prefix_time_filter mode);
100 diary_prefix_time_filter getPrefixIoModeFilter(void);
103 #endif /* __DIARY_HXX__ */
104 /*--------------------------------------------------------------------------*/
105 bool compareDiary(Diary first,Diary second);
106 /*--------------------------------------------------------------------------*/