Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/etc/Games/HiScore.inl

Go to the documentation of this file.
00001 #ifndef __J2K__JHiScore_INL__
00002 #define __J2K__JHiScore_INL__
00003 
00004 #include <j2k/etc/Games/HiScore.hpp>
00005 
00006 inline JHiScore::JHiScore()
00007   : max( 10 ), entry( NULL ) 
00008 {
00009   clear();
00010 }
00011 
00012 inline JHiScore::JHiScore( UINT Max )
00013   : max( Max ), entry( NULL ) 
00014 {
00015   clear();
00016 }
00017 
00018 inline JHiScore::~JHiScore() 
00019 {
00020   if ( entry != NULL ) 
00021   {
00022     delete [] entry;
00023   }
00024 }
00025 
00026 inline Score* JHiScore::getScore( UINT pos ) 
00027 {
00028    if ( pos >= max ) return &entry[ max-1 ];
00029    return &entry[ pos ];
00030 }
00031 
00032 inline void enter( const JScore& s ) 
00033 {
00034   entry[ max ] = s;
00035   sort();
00036 }
00037 
00038 #endif
00039 

Generated on Sun Oct 14 18:46:31 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001