Files
Work/aladin/hold/logbook.cpp
2024-08-07 09:12:07 -04:00

36 lines
952 B
C++

#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;
}