Contains necessary classes and functions for ELEC351

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers dateAndTime.hpp Source File

dateAndTime.hpp

00001 #ifndef __dateAndTime__ //Inclusion safeguards
00002 #define __dateAndTime__
00003 
00004 
00005 typedef struct __attribute__ ((packed)) { // Store one after another
00006 
00007     int day, mnt, yr;   // Current Date
00008     int sec, min, hr;   // Current Time
00009    
00010 } TDS_DT;               // Type Def Struct _ Date Time
00011 
00012 
00013 class C_DT              // Class _ Date Time
00014 {
00015 
00016     // Constructorless class - constructor not needed
00017 
00018 private:
00019     TDS_DT date_time;           // TDS_DT format of storing Date & Time
00020 
00021 public:
00022     TDS_DT getDT();             // Get Date & Time
00023     void setD(int, int, int);   // set Date
00024     void setT(int, int, int);   // Set Time
00025 
00026 };
00027 
00028 #endif