Initial
This commit is contained in:
35
aladin/hold/logbook.cpp
Normal file
35
aladin/hold/logbook.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
#include <aladin/logbook.hpp>
|
||||
#include <common/qsort.hpp>
|
||||
|
||||
LogBook::LogBook()
|
||||
{
|
||||
}
|
||||
|
||||
LogBook::~LogBook()
|
||||
{
|
||||
}
|
||||
|
||||
bool LogBook::readFrom(Array<BYTE> &array,CurrentStatus &status)
|
||||
{
|
||||
QuickSort<DiveLog> quickSort;
|
||||
int index=0x600;
|
||||
|
||||
remove();
|
||||
for(int logIndex=0;logIndex<37;logIndex++)
|
||||
{
|
||||
DiveLog diveLog;
|
||||
if(diveLog.readFrom(array,index))insert(&diveLog);
|
||||
}
|
||||
quickSort.sortItems(*this,SortOptions::Descending);
|
||||
/* for(index=0;index<size();index++)
|
||||
{
|
||||
DiveLog &diveLog=operator[](index);
|
||||
::OutputDebugString(String("Bottom Time:")+String().fromInt(diveLog.getBottomTime())+String(" "));
|
||||
::OutputDebugString(String("Max Depth:")+String().fromInt(diveLog.getMaxDepth())+String(" "));
|
||||
::OutputDebugString(String("Surface Time:")+diveLog.getSurfaceTime().toString()+String(" "));
|
||||
::OutputDebugString(String("Entry Time:")+diveLog.getEntryTime().toString()+String(" "));
|
||||
::OutputDebugString(String("\n"));
|
||||
} */
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user