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

82 lines
1.7 KiB
C++

#ifndef _ALADIN_ALADIN_HPP_
#define _ALADIN_ALADIN_HPP_
#ifndef _PROTO_STATUS_HPP_
#include <aladin/status.hpp>
#endif
#ifndef _ALADIN_INFORMATION_HPP_
#include <aladin/information.hpp>
#endif
#ifndef _ALADIN_PROFILES_HPP_
#include <aladin/profiles.hpp>
#endif
#ifndef _ALADIN_PROFILEDATA_HPP_
#include <aladin/profiledata.hpp>
#endif
#ifndef _ALADIN_LOGBOOK_HPP_
#include <aladin/logbook.hpp>
#endif
class CommControl;
class GUIWindow;
class Progress;
class Worksheet;
class Aladin
{
public:
Aladin();
virtual ~Aladin();
bool openFile(const String &strPathFileName);
bool openDevice(const String &port,GUIWindow &parent);
bool saveRaw(const String &strPathFileName);
bool saveWorksheet(const String &strPathFileName);
bool saveText(const String &strPathFileName);
const CurrentStatus &getStatus(void)const;
const Information &getInformation(void)const;
const Profiles &getProfile(void)const;
const LogBook &getLogBook(void)const;
bool isMerged(void)const;
void isMerged(bool bMerged);
void clear(void);
bool isOkay(void)const;
private:
bool readRaw(Array<BYTE> &body);
bool getControlData(CommControl &control,Progress &progress);
void addProfile(Worksheet &worksheet,const Profiles &profiles,int startRow,int startCol);
void addDiveLog(Worksheet &worksheet,const LogBook &logBook,int startRow,int startCol);
CurrentStatus mStatus;
Information mInformation;
Profiles mProfiles;
LogBook mLogBook;
Array<BYTE> mRawData;
bool mIsMerged;
bool mIsOkay;
};
inline
bool Aladin::isOkay(void)const
{
return mIsOkay;
}
inline
bool Aladin::isMerged(void)const
{
return mIsMerged;
}
inline
void Aladin::isMerged(bool bMerged)
{
mIsMerged=bMerged;
}
inline
void Aladin::clear(void)
{
mIsMerged=false;
mProfiles.remove();
mLogBook.remove();
}
#endif