DarkflameServer/dDatabase/Tables/CDMissionEmailTable.h

56 lines
1.0 KiB
C
Raw Permalink Normal View History

#pragma once
// Custom Classes
#include "CDTable.h"
/*!
\file CDMissionEmailTable.hpp
\brief Contains data for the MissionEmail table
*/
//! MissionEmail Entry Struct
struct CDMissionEmail {
2022-07-28 13:39:57 +00:00
unsigned int ID;
unsigned int messageType;
unsigned int notificationGroup;
unsigned int missionID;
unsigned int attachmentLOT;
bool localize;
unsigned int locStatus;
std::string gate_version;
};
//! MissionEmail table
class CDMissionEmailTable : public CDTable {
private:
2022-07-28 13:39:57 +00:00
std::vector<CDMissionEmail> entries;
public:
2022-07-28 13:39:57 +00:00
//! Constructor
CDMissionEmailTable(void);
//! Destructor
~CDMissionEmailTable(void);
//! Returns the table's name
/*!
\return The table name
*/
std::string GetName(void) const override;
//! Queries the table with a custom "where" clause
/*!
\param predicate The predicate
*/
std::vector<CDMissionEmail> Query(std::function<bool(CDMissionEmail)> predicate);
//! Gets all the entries in the table
/*!
\return The entries
*/
std::vector<CDMissionEmail> GetEntries(void) const;
};