Fix bugs in previous commit that caused FTBFS in synfig and ETL FTBFS with older...
[synfig.git] / ETL / tags / ETL_0_04_10_rc2 / ETL / _status.h
1 #ifdef THIS_CODE_IS_NOT_USED
2 /*! ========================================================================
3 ** Extended Template Library
4 ** Status Callback Class Implementation
5 ** $Id$
6 **
7 ** Copyright (c) 2002 Robert B. Quattlebaum Jr.
8 ** Copyright (c) 2007 Chris Moore
9 **
10 ** This package is free software; you can redistribute it and/or
11 ** modify it under the terms of the GNU General Public License as
12 ** published by the Free Software Foundation; either version 2 of
13 ** the License, or (at your option) any later version.
14 **
15 ** This package is distributed in the hope that it will be useful,
16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18 ** General Public License for more details.
19 **
20 ** === N O T E S ===========================================================
21 **
22 ** This is an internal header file, included by other ETL headers.
23 ** You should not attempt to use it directly.
24 **
25 ** ========================================================================= */
26
27 /* === S T A R T =========================================================== */
28
29 #ifndef __ETL_STATUS_H
30 #define __ETL_STATUS_H
31
32 /* === H E A D E R S ======================================================= */
33
34 /* === M A C R O S ========================================================= */
35
36 /* === T Y P E D E F S ===================================================== */
37
38 /* === C L A S S E S & S T R U C T S ======================================= */
39
40 _ETL_BEGIN_NAMESPACE
41
42 class status
43 {
44 public:
45         virtual ~ProgressCallback() { }
46
47         virtual bool task(const std::string &task) { return true; }
48
49 #warning this task(task) thing looks wrong, but the code isn't used, so let's not worry
50         virtual void push_task(const std::string &task,int start=0, int end=100, int total=100)
51                 { task(task); }
52         virtual void pop_task() { return; }
53
54         virtual void warning(const std::string &warn) { return; }
55         virtual void error(const std::string &err) { return; }
56
57         virtual bool amount_complete(int current, int total) { return true; }
58         virtual bool amount_complete(float percent)
59                 { return amount_complete((int)(percent*10000),10000); }
60 };
61
62 _ETL_END_NAMESPACE
63
64 /* === E X T E R N S ======================================================= */
65
66 /* === E N D =============================================================== */
67
68 #endif
69 #endif /* THIS_CODE_IS_NOT_USED */