Garmin Fleet Management Controller
2.19.0
|
Inbox List Item. More...
#include <InboxListItem.h>
Public Types | |
typedef MessageId | key_type |
Public Member Functions | |
void | commitName () |
Commit the item name. More... | |
CString | getCurrentName () const |
Get the current name of this item. More... | |
const key_type & | getId () const |
Get the ID associated with this item. More... | |
BOOL | isValid () const |
Check whether this item is valid. More... | |
void | readFromStream (std::istream &aStream) |
Read an InboxListItem from an istream. More... | |
void | setId (const key_type &aId) |
Set the ID associated with this item. More... | |
void | setId (const key_type &aId) |
Set item's ID. More... | |
void | setParent (FileBackedMap< InboxListItem > *aParent) |
Set the parent of this item. More... | |
void | setParent (FileBackedMap< ClientListItem > *aParent) |
Set the parent. More... | |
void | setUpdateName (CString aName) |
Set pending name. More... | |
void | setValid (BOOL aValid=TRUE) |
Set this item as valid. More... | |
void | writeToStream (std::ofstream &aStream) |
Write an InboxListItem to an output stream. More... | |
virtual void | writeToStream (std::ofstream &aStream) const |
Write a ClientListItem to an output stream. More... | |
Protected Member Functions | |
virtual void | save () |
Save this item. More... | |
Protected Attributes | |
CString | mCurrentName |
The last name acknowledged by the client. More... | |
key_type | mId |
The unique ID of this item. More... | |
BOOL | mIsValid |
True if this list item is mIsValid. More... | |
CString | mUpdateName |
The last name entered by the user. More... | |
Private Attributes | |
MessageId | messageId |
FileBackedMap< InboxListItem > * | mParent |
Inbox List Item.
Definition at line 19 of file InboxListItem.h.
typedef MessageId InboxListItem::key_type |
Definition at line 22 of file InboxListItem.h.
|
inherited |
Commit the item name.
Commit the item name and set the ClientListItem as valid
Definition at line 29 of file ClientListItem.cpp.
References ClientListItem::mCurrentName, ClientListItem::mUpdateName, and ClientListItem::setValid().
Referenced by FmiApplicationLayer::rx().
|
inherited |
Get the current name of this item.
Definition at line 39 of file ClientListItem.cpp.
References ClientListItem::mCurrentName.
Referenced by CDriverIdAndStatusDlg::OnLbnSelchangeStatuslist(), FmiApplicationLayer::procDriverStatusUpdate(), CSendSensorDlg::RefreshList(), and FmiApplicationLayer::rx().
const InboxListItem::key_type & InboxListItem::getId | ( | ) | const |
Get the ID associated with this item.
Definition at line 29 of file InboxListItem.cpp.
References messageId, and setParent().
|
inherited |
Check whether this item is valid.
Definition at line 58 of file ClientListItem.cpp.
References ClientListItem::mIsValid, and ClientListItem::readFromStream().
Referenced by CFileTransferDlg::AddPSRtoStopList(), CAobrdDriversDlg::OnBnClickedSet(), FmiApplicationLayer::procDriverStatusUpdate(), and FmiApplicationLayer::rx().
|
virtual |
Read an InboxListItem from an istream.
aStream | The stream to read from |
Reimplemented from ClientListItem.
Definition at line 51 of file InboxListItem.cpp.
References messageId, ClientListItem::mIsValid, TRUE, and writeToStream().
Referenced by setParent().
|
protectedvirtualinherited |
Save this item.
Invokes parent to save all items
Reimplemented in AobrdDriverItem, WaypointListItem, and DriverLoginItem.
Definition at line 172 of file ClientListItem.cpp.
References ClientListItem::mParent, and FileBackedMap< T >::save().
Referenced by ClientListItem::setValid().
void InboxListItem::setId | ( | const key_type & | aId | ) |
Set the ID associated with this item.
aId | The item's ID |
Definition at line 18 of file InboxListItem.cpp.
|
inherited |
Set item's ID.
aId | The item's ID |
Definition at line 101 of file ClientListItem.cpp.
References ClientListItem::mId, and ClientListItem::setParent().
Referenced by CSendSensorDlg::OnBnClickedCreate(), CStopNewDlg::OnBnClickedOk(), ClientListItem::readFromStream(), SensorListItem::readFromStream(), and FmiApplicationLayer::sendCannedMessage().
void InboxListItem::setParent | ( | FileBackedMap< InboxListItem > * | aParent | ) |
Set the parent of this item.
aParent | The item's parent |
Definition at line 39 of file InboxListItem.cpp.
References mParent, and readFromStream().
Referenced by getId().
|
inherited |
Set the parent.
aParent | The FileBackedMap that contains this item |
Definition at line 113 of file ClientListItem.cpp.
References ClientListItem::mParent, and ClientListItem::setUpdateName().
Referenced by ClientListItem::setId().
|
inherited |
Set pending name.
Set the pending name of this ClientListItem. This does not become the item's name until commitName is called.
aName | The pending name to set |
Definition at line 127 of file ClientListItem.cpp.
References ClientListItem::mUpdateName, and ClientListItem::setValid().
Referenced by FmiApplicationLayer::sendCannedMessage(), FmiApplicationLayer::sendCannedResponse(), FmiApplicationLayer::sendCreateWaypointCat(), FmiApplicationLayer::sendDriverStatusListItem(), FmiApplicationLayer::sendWaypoint(), and ClientListItem::setParent().
|
inherited |
Set this item as valid.
Set the valid flag. If this item is part of a FileBackedMap, save the map.
aValid | If TRUE, the item is valid. |
Definition at line 141 of file ClientListItem.cpp.
References ClientListItem::mIsValid, ClientListItem::save(), and ClientListItem::writeToStream().
Referenced by CFileTransferDlg::AddPSRtoStopList(), CMapViewerDlg::addStopToCatalog(), ClientListItem::commitName(), CSendSensorDlg::OnBnClickedCreate(), CStopNewDlg::OnBnClickedOk(), SensorListItem::readFromStream(), FmiApplicationLayer::rx(), FmiApplicationLayer::sendA603Stop(), FmiApplicationLayer::sendDeleteWaypointCat(), CMapViewerDlg::sendRouteToDevice(), AobrdDriverItem::setCarrierID(), AobrdDriverItem::setCarrierName(), AobrdDriverItem::setFirstName(), AobrdDriverItem::setLastName(), AobrdDriverItem::setLoadTypeRuleset(), AobrdDriverItem::setLongTermRuleset(), DriverLoginItem::setPassword(), AobrdDriverItem::setPassword(), AobrdDriverItem::setTimeZone(), and ClientListItem::setUpdateName().
void InboxListItem::writeToStream | ( | std::ofstream & | aStream | ) |
Write an InboxListItem to an output stream.
aStream | The stream to write to |
Definition at line 83 of file InboxListItem.cpp.
References MessageId::getId(), MessageId::getIdSize(), and messageId.
Referenced by readFromStream().
|
virtualinherited |
Write a ClientListItem to an output stream.
Append id and current name to the output stream.
aStream | The stream to write to |
Reimplemented in AobrdDriverItem, DriverLoginItem, and WaypointListItem.
Definition at line 155 of file ClientListItem.cpp.
References ClientListItem::mCurrentName, and ClientListItem::mId.
Referenced by ClientListItem::setValid(), WaypointListItem::writeToStream(), and SensorListItem::writeToStream().
|
protectedinherited |
The last name acknowledged by the client.
Definition at line 75 of file ClientListItem.h.
Referenced by ClientListItem::ClientListItem(), ClientListItem::commitName(), ClientListItem::getCurrentName(), ClientListItem::readFromStream(), StopListItem::setCurrentName(), SensorListItem::setCurrentName(), and ClientListItem::writeToStream().
|
private |
Definition at line 39 of file InboxListItem.h.
Referenced by getId(), readFromStream(), and writeToStream().
|
protectedinherited |
The unique ID of this item.
Definition at line 84 of file ClientListItem.h.
Referenced by ClientListItem::getId(), ClientListItem::readFromStream(), ClientListItem::setId(), and ClientListItem::writeToStream().
|
protectedinherited |
True if this list item is mIsValid.
Definition at line 81 of file ClientListItem.h.
Referenced by ClientListItem::ClientListItem(), ClientListItem::isValid(), readFromStream(), DriverLoginItem::readFromStream(), ClientListItem::readFromStream(), AobrdDriverItem::readFromStream(), and ClientListItem::setValid().
|
private |
Definition at line 38 of file InboxListItem.h.
Referenced by setParent().
|
protectedinherited |
The last name entered by the user.
Definition at line 78 of file ClientListItem.h.
Referenced by ClientListItem::ClientListItem(), ClientListItem::commitName(), ClientListItem::readFromStream(), and ClientListItem::setUpdateName().