Garmin Fleet Management Controller
2.19.0
|
Tracks a waypoint that has been sent to the client. More...
#include <WaypointListItem.h>
Public Types | |
typedef uint32 | key_type |
Public Member Functions | |
WaypointListItem () | |
Constructor. More... | |
void | commitName () |
Commit the item name. More... | |
uint16 | getCategories () const |
Get categories that this waypoint is part of. More... | |
CString | getCurrentName () const |
Get the current name of this item. More... | |
const key_type & | getId () const |
Get item's ID. More... | |
BOOL | isValid () const |
Check whether this item is valid. More... | |
virtual void | readFromStream (std::istream &aStream) |
Read a ClientListItem from an input stream. More... | |
void | setCategories (uint16 val) |
Set the waypoint's categories. More... | |
void | setId (const key_type &aId) |
Set item's ID. More... | |
void | setParent (FileBackedMap< WaypointListItem > *aParent) |
Set the parent. 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... | |
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 | |
uint16 | mCategories |
The categories that this waypoint is part of. (bit mapped) More... | |
FileBackedMap< WaypointListItem > * | mParent |
The map that this item belongs to, or NULL if none. More... | |
Tracks a waypoint that has been sent to the client.
Definition at line 19 of file WaypointListItem.h.
typedef uint32 WaypointListItem::key_type |
Definition at line 22 of file WaypointListItem.h.
WaypointListItem::WaypointListItem | ( | ) |
Constructor.
Definition at line 16 of file WaypointListItem.cpp.
|
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().
uint16 WaypointListItem::getCategories | ( | ) | const |
Get categories that this waypoint is part of.
Definition at line 25 of file WaypointListItem.cpp.
References mCategories, and readFromStream().
|
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().
|
inherited |
Get item's ID.
Get the unique ID of this item
Definition at line 49 of file ClientListItem.cpp.
References ClientListItem::mId.
Referenced by FmiApplicationLayer::rx().
|
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 a ClientListItem from an input stream.
Read id and current name from the input stream, and updates the member variables appropriately.
aStream | The stream to read from |
Reimplemented from ClientListItem.
Definition at line 31 of file WaypointListItem.cpp.
References mCategories, ClientListItem::readFromStream(), and setCategories().
Referenced by getCategories().
|
protectedvirtual |
Save this item.
Invokes parent to save all items
Reimplemented from ClientListItem.
Definition at line 78 of file WaypointListItem.cpp.
References mParent, and FileBackedMap< T >::save().
void WaypointListItem::setCategories | ( | uint16 | aCategories | ) |
Set the waypoint's categories.
aCategories | The categories that this waypoint is part of |
Definition at line 46 of file WaypointListItem.cpp.
References mCategories, and setParent().
Referenced by readFromStream(), and FmiApplicationLayer::sendWaypoint().
|
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 WaypointListItem::setParent | ( | FileBackedMap< WaypointListItem > * | aParent | ) |
Set the parent.
aParent | The FileBackedMap that contains this item |
Definition at line 58 of file WaypointListItem.cpp.
References mParent, and writeToStream().
Referenced by setCategories().
|
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().
|
virtual |
Write a ClientListItem to an output stream.
Append id and current name to the output stream.
aStream | The stream to write to |
Reimplemented from ClientListItem.
Definition at line 66 of file WaypointListItem.cpp.
References mCategories, and ClientListItem::writeToStream().
Referenced by setParent().
|
private |
The categories that this waypoint is part of. (bit mapped)
Definition at line 53 of file WaypointListItem.h.
Referenced by getCategories(), readFromStream(), setCategories(), and 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().
|
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(), InboxListItem::readFromStream(), DriverLoginItem::readFromStream(), ClientListItem::readFromStream(), AobrdDriverItem::readFromStream(), and ClientListItem::setValid().
|
private |
The map that this item belongs to, or NULL if none.
Definition at line 50 of file WaypointListItem.h.
Referenced by save(), and 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().