Main Page   Class Hierarchy   File List  

cgiCalendar.h

00001 /*
00002   cgiCalendar.h
00003 
00004   Common Gateway Interface Class Definitions.
00005      Extended classes for cgi support
00006      -- generic calendar container
00007   copyright (c) 2002
00008 
00009   Open Connections LLC, Dalton, Ga.
00010 
00011   David McCombs davidmc@newcottage.com
00012 
00013   Nuclear Core Class Library
00014 
00015   freely re-usable, redistributable.
00016 
00017 */
00018 #ifndef cgiCALENDAR_H
00019 #define cgiCALENDAR_H
00020 #include <ctime>
00021 #include "cgiExtend.h"
00022 #include <map>
00023 
00024 /*
00025   dayItems
00026   --------
00027   A multimap of day of month integer value and itmes to put on the particular day.
00028   This used used to fill the calendar with items on particular days.
00029 
00030 */
00031 typedef multimap< int, string > dayItems;
00032 
00033 typedef enum { posTop, posBottom, posBoth } eHeaderPos;
00034 /*
00035   A generic html calendar
00036 
00037 */
00038 
00039 class cgiCalendar: public cgiCan
00040 {
00041 protected:
00042 
00043   tm     m_tm;
00044   string m_formatted;
00045   string header;
00046   eHeaderPos headerPos;
00047 
00048   bool fillDays ( dayItems & items );
00049   bool fillDay ( dayItems & items );
00050   bool dayAdd( void );
00051 
00052 public:
00053 
00054   cgiCalendar( aString & year, aString & month );
00055   virtual ~cgiCalendar();
00056 
00057   inline cgiCalendar & setHeaderPos( eHeaderPos inPos )
00058   {
00059     headerPos =  inPos;
00060     return *this;
00061   }
00062   bool fill( dayItems & items, const char * url = NULL );
00063   string & strYear( void );
00064   string & strMonth( void );
00065   int year ( void );
00066   int month( void );
00067 
00068 };
00069 
00070 
00071 #endif

Generated on Tue Jan 20 09:03:27 2004 for OpenTools by doxygen1.2.18