Rev 88 |
Blame |
Compare with Previous |
Last modification |
View Log
| RSS feed
#include <stdlib.h>
#include <string.h>
#include "trainrecord.h"
TrainRecord::TrainRecord( int key, const char* reporting_mark, uint32_t road_number,
const char* stock_type, uint16_t costi, const char* notesi ){
if( reporting_mark != NULL ){
reporting.assign( reporting_mark );
}
road = road_number;
if( stock_type != NULL ){
stock.assign( stock_type );
}
cost = costi;
if( notesi != NULL ){
notes.assign( notesi );
}
this->key = key;
}
std::string TrainRecord::getReportingMark(){
return reporting;
}
void TrainRecord::setReportingMark(std::string mark ){
reporting.assign( mark );
}
uint32_t TrainRecord::getRoadNumber(){
return road;
}
void TrainRecord::setRoadNumber( uint32_t roadIn ){
road = roadIn;
}
std::string TrainRecord::getStockType(){
return stock;
}
void TrainRecord::setStockType( std::string stck ){
stock.assign( stck );
}
uint16_t TrainRecord::getCost(){
return cost;
}
void TrainRecord::setCost( uint16_t costIn ){
cost = costIn;
}
std::string TrainRecord::getNotes(){
return notes;
}
void TrainRecord::setNotes( std::string notesIn ){
notes.assign( notesIn );
}
int TrainRecord::getKey(){
return key;
}