14 #define CURRENT_VERSION 1 15 #define RECORD_SEPARATOR 30 47 MultiByteToWideChar( CP_UTF8, 0,
mDriverId.c_str(), -1, tcharName, 50 );
48 driverId.SetString( tcharName );
70 CString driverPassword;
72 MultiByteToWideChar( CP_UTF8, 0,
mDriverPassword.c_str(), -1, tcharName, 50 );
73 driverPassword.SetString( tcharName );
75 return driverPassword;
87 MultiByteToWideChar( CP_UTF8, 0,
mFirstName.c_str(), -1, tcharValue, 50 );
88 value.SetString( tcharValue );
101 TCHAR tcharValue[50];
102 MultiByteToWideChar( CP_UTF8, 0,
mLastName.c_str(), -1, tcharValue, 50 );
103 value.SetString( tcharValue );
116 TCHAR tcharValue[50];
117 MultiByteToWideChar( CP_UTF8, 0,
mCarrierName.c_str(), -1, tcharValue, 50 );
118 value.SetString( tcharValue );
131 TCHAR tcharValue[50];
132 MultiByteToWideChar( CP_UTF8, 0,
mCarrierID.c_str(), -1, tcharValue, 50 );
133 value.SetString( tcharValue );
208 std::istream &aStream
211 #if( FMI_SUPPORT_A615 ) 219 version = aStream.get();
226 while( aStream.peek() !=
'\0' && !aStream.eof() )
228 aStream.read( &temp, 1 );
235 while( aStream.peek() !=
'\0' && !aStream.eof() )
237 aStream.read( &temp, 1 );
244 while( aStream.peek() !=
'\0' && !aStream.eof() )
246 aStream.read( &temp, 1 );
253 while( aStream.peek() !=
'\0' && !aStream.eof() )
255 aStream.read( &temp, 1 );
262 while( aStream.peek() !=
'\0' && !aStream.eof() )
264 aStream.read( &temp, 1 );
271 while( aStream.peek() !=
'\0' && !aStream.eof() )
273 aStream.read( &temp, 1 );
284 #if( FMI_SUPPORT_A615 ) 304 uint32 shipmentCount = aStream.get();
306 for(
uint32 i=0; i<shipmentCount; i++ )
366 const std::string & aPassword
381 const std::string & aFirstName
396 const std::string & aLastName
411 const std::string & aCarrierName
426 const std::string & aCarrierID
449 #if( FMI_SUPPORT_A615 ) 498 std::ofstream &aStream
501 #if( FMI_SUPPORT_A615 ) 511 #if( FMI_SUPPORT_A615 ) 518 aStream.put(shipmentCount);
520 for(
uint8 i=0; i<shipmentCount; i++ )
virtual ~AobrdDriverItem()
Destructor.
CString getPassword() const
Get item's password.
std::string mFirstName
The driver first name, UTF8 encoded.
void readFromStream(std::istream &aStream)
Read a AobrdDriverItem from an input stream.
void deleteShipment(int index)
Delete a shipment.
void setFirstName(const std::string &aFirstName)
Set the first name of this driver.
Data structure to holds an AOBRD shipment info. Used by the FmiApplicationLayer to provision shipment...
const key_type & getId() const
Get item's ID.
void setLoadTypeRuleset(const uint16 aRuleset)
Set the load type ruleset of this driver.
uint16 getTimeZone() const
Get item's time zone.
void setCarrierID(const std::string &aCarrierID)
Set the carrier ID of this driver.
CString getDriverId() const
Get the driver ID as a CString.
CString getFirstName() const
Get item's first name.
std::string mDriverPassword
The driver password, UTF8 encoded.
AobrdDriverItem()
Constructor.
uint16 mLongTermRuleset
The driver long term ruleset.
void setParent(FileBackedMap< AobrdDriverItem > *aParent)
Set the parent map of this item.
uint16 getLoadTypeRuleset() const
Get item's load type ruleset.
std::string mCarrierName
The driver carrier name, UTF8 encoded.
void setValid(BOOL aValid=TRUE)
Set this item as valid.
void setTimeZone(const uint16 aTimeZone)
Set the time zone of this driver.
void writeToStream(std::ofstream &aStream) const
Write a AobrdShipment to an output stream.
CString getCarrierName() const
Get item's carrier name.
#define FMI_SUPPORT_A615
If true, app was built with support for A615 protocols.
uint16 getLongTermRuleset() const
Get item's long term ruleset.
void setLongTermRuleset(const uint16 aRuleset)
Set the long term ruleset of this driver.
CString getLastName() const
Get item's last name.
unsigned short int uint16
16-bit unsigned integer
BOOL mIsValid
True if this list item is mIsValid.
uint16 mLoadTypeRuleset
The driver load type ruleset.
void addShipment(AobrdShipment &shipment)
Add a shipment.
const std::vector< AobrdShipment > & getShipments() const
Get the list of shipments.
void writeToStream(std::ofstream &aStream) const
Write a AobrdDriverItem to an output stream.
unsigned char uint8
8-bit unsigned integer
std::string mDriverId
The driver ID, UTF8 encoded.
void setCarrierName(const std::string &aCarrierName)
Set the carrier name of this driver.
void setPassword(const std::string &aPassword)
Set the password of this driver.
FileBackedMap< AobrdDriverItem > * mParent
The map that this DriverItem is a part of.
void setLastName(const std::string &aLastName)
Set the last name of this driver.
void setId(const key_type &aId)
Set the ID (key) of this item.
void save()
Save this item.
unsigned long int uint32
32-bit unsigned integer
void save()
Save the map to disk.
std::string mCarrierID
The driver first name, UTF8 encoded.
void readFromStream(std::istream &aStream)
Read a AobrdShipment from an input stream.
std::vector< AobrdShipment > mShipments
The shipments.
uint16 mTimeZone
The driver time zone.
void replaceShipment(AobrdShipment &shipment, int index)
Update a shipment.
CString getCarrierID() const
Get item's carrier ID.
std::string mLastName
The driver last name, UTF8 encoded.