diff options
author | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2000-02-19 18:00:00 +0100 |
---|---|---|
committer | Klaus Schmidinger <kls (at) cadsoft (dot) de> | 2000-02-19 18:00:00 +0100 |
commit | c475c637aba78366763cb122673ff836dd9e7e85 (patch) | |
tree | 84548734048499e913f200e1359acec4fa441fb0 /tools.h | |
download | vdr-patch-lnbsharing-c475c637aba78366763cb122673ff836dd9e7e85.tar.gz vdr-patch-lnbsharing-c475c637aba78366763cb122673ff836dd9e7e85.tar.bz2 |
Version 0.01 (Initial revision).vdr_osm-0.01
Diffstat (limited to 'tools.h')
-rw-r--r-- | tools.h | 54 |
1 files changed, 54 insertions, 0 deletions
@@ -0,0 +1,54 @@ +/* + * tools.h: Various tools + * + * See the main source file 'osm.c' for copyright information and + * how to reach the author. + * + * $Id: tools.h 1.1 2000/02/19 13:36:48 kls Exp $ + */ + +#ifndef __TOOLS_H +#define __TOOLS_H + +#include <syslog.h> + +//TODO +#define dsyslog syslog +#define esyslog syslog +#define isyslog syslog + +class cListObject { +private: + cListObject *prev, *next; +public: + cListObject(void); + virtual ~cListObject(); + void Append(cListObject *Object); + void Unlink(void); + int Index(void); + cListObject *Prev(void) { return prev; } + cListObject *Next(void) { return next; } + }; + +class cListBase { +protected: + cListObject *objects, *lastObject; + cListBase(void); +public: + virtual ~cListBase(); + void Add(cListObject *Object); + void Del(cListObject *Object); + void Clear(void); + cListObject *Get(int Index); + int Count(void); + }; + +template<class T> class cList : public cListBase { +public: + T *Get(int Index) { return (T *)cListBase::Get(Index); } + T *First(void) { return (T *)objects; } + }; + +int time_ms(void); + +#endif //__TOOLS_H |