calendar.h

Go to the documentation of this file.
00001 // Copyright (C) 2006 Bryan Jacobson <bryanjacobson@users.sourceforge.net>
00002 // This program is licensed under the terms of the GNU General Public License
00003 // version 2, as published by the Free Software Foundation.
00004 // This program is distributed in the hope that it will be useful,
00005 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00006 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
00007 
00011 
00012 #ifndef CALENDAR_H
00013 #define CALENDAR_H
00014 
00016 class CalNode
00017 {
00018   public:
00019              CalNode(void *p, CalNode *n = NULL) { mpData = p; mpNext = n; }
00020     CalNode *GetNext() { return mpNext; }
00021     void    *GetData() { return mpData; }
00022     void     Dump(OnDisk *pOnDisk); 
00023   private:
00024     void    *mpData;
00025     CalNode *mpNext;
00026 };
00027 
00028 class CalImpl;
00029 
00031 class Calendar
00032 {
00033   public:
00034              Calendar(); 
00035     void     Add(double date, void *p);
00036     CalNode *Get(double date);
00037     int      Dump(OnDisk *pOnDisk); 
00038   private:
00039     CalImpl *mpImpl;    
00040 };
00041 
00043 class CalendarDisk
00044 {
00045   public:
00046     class CalData
00047     {
00048       public:
00049         void    *GetData(); 
00050         CalData *GetNext(); 
00051       private:
00052         char *mpLocation;
00053     };
00054     class DateIter
00055     {
00056       public:
00057         double    GetDate(); 
00058         CalData  *GetData(); 
00059         DateIter *GetNext(); 
00060       private:
00061         char *mpLocation;
00062     };
00063 
00065     CalendarDisk(char *p);
00066 
00068     DateIter *GetFirstDate();
00069   private:
00070     DateIter *mpImpl;  
00071 };
00072 
00073 #endif // CALENDAR_H

Generated on Sun Oct 8 09:32:09 2006 for gabbie by  doxygen 1.4.6