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