6 #include <lib/base/object.h>
12 static std::list<std::pair<int,eAutoInit*> > *cl;
13 friend class eAutoInit;
18 static void setRunlevel(int rlev);
19 static void add(int trl, eAutoInit *c);
20 static void remove(int trl, eAutoInit *c);
26 virtual void initNow()=0;
27 virtual void closeNow()=0;
30 const char *description;
32 eAutoInit(int rl, const char *description): rl(rl), description(description)
36 const char *getDescription() const { return description; };
39 template<class T1, class T2> class
40 eAutoInitP1: protected eAutoInit
57 eAutoInitP1(const T2 &arg, int runl, const char *description): eAutoInit(runl, description), arg(arg)
63 eInit::remove(rl, this);
67 template<class T1> class
68 eAutoInitP0: protected eAutoInit
88 eAutoInitP0(int runl, const char *description): eAutoInit(runl, description)
94 eInit::remove(rl, this);
98 template<class T1> class
99 eAutoInitPtr: protected eAutoInit
119 eAutoInitPtr(int runl, const char *description): eAutoInit(runl, description)
121 eInit::add(rl, this);
125 eInit::remove(rl, this);