Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

Bookkeeper.h

Go to the documentation of this file.
00001 /* Bookkeeper - coin tracking. */ 00002 00003 #ifndef Bookkeeper_H 00004 #define Bookkeeper_H 00005 00006 #include "DateTime.h" 00007 00008 00009 class Bookkeeper 00010 { 00011 public: 00012 Bookkeeper(); 00013 ~Bookkeeper(); 00014 00015 void ClearAll(); 00016 00017 void CoinInserted(); 00018 void UpdateLastSeenTime(); 00019 00020 void GetCoinsLastDays( int coins[NUM_LAST_DAYS] ); 00021 void GetCoinsLastWeeks( int coins[NUM_LAST_WEEKS] ); 00022 void GetCoinsByDayOfWeek( int coins[DAYS_IN_WEEK] ); 00023 void GetCoinsByHour( int coins[HOURS_IN_DAY] ); 00024 00025 void ReadFromDisk(); 00026 void WriteToDisk(); 00027 00028 private: 00029 00030 int GetCoinsForDay( int iDayOfYear ); 00031 00032 int m_iLastSeenTime; 00033 int m_iCoinsByHourForYear[DAYS_IN_YEAR][HOURS_IN_DAY]; 00034 }; 00035 00036 00037 extern Bookkeeper* BOOKKEEPER; // global and accessable from anywhere in our program 00038 00039 #endif 00040 00041 /* 00042 * (c) 2003-2004 Chris Danford 00043 * All rights reserved. 00044 * 00045 * Permission is hereby granted, free of charge, to any person obtaining a 00046 * copy of this software and associated documentation files (the 00047 * "Software"), to deal in the Software without restriction, including 00048 * without limitation the rights to use, copy, modify, merge, publish, 00049 * distribute, and/or sell copies of the Software, and to permit persons to 00050 * whom the Software is furnished to do so, provided that the above 00051 * copyright notice(s) and this permission notice appear in all copies of 00052 * the Software and that both the above copyright notice(s) and this 00053 * permission notice appear in supporting documentation. 00054 * 00055 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00056 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00057 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00058 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00059 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00060 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00061 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00062 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00063 * PERFORMANCE OF THIS SOFTWARE. 00064 */

Generated on Thu Jan 27 20:57:18 2005 for StepMania by doxygen 1.3.7