Subversion Repositories Programming Utils

Rev

Rev 88 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 88 Rev 91
Line 1... Line 1...
1
#include <stdlib.h>
1
#include <stdlib.h>
2
#include <string.h>
2
#include <string.h>
3
3
4
#include "trainrecord.h"
4
#include "trainrecord.h"
5
5
6
TrainRecord::TrainRecord( int key, const char* reporting_mark, uint16_t road_number,
-
 
-
 
6
TrainRecord::TrainRecord( int key, const char* reporting_mark, uint32_t road_number,
7
                          const char* stock_type, uint16_t costi, const char* notesi ){
7
                          const char* stock_type, uint16_t costi, const char* notesi ){
8
    if( reporting_mark != NULL ){
8
    if( reporting_mark != NULL ){
9
        reporting.assign( reporting_mark );
9
        reporting.assign( reporting_mark );
10
    }
10
    }
11
    road = road_number;
11
    road = road_number;
Line 25... Line 25...
25
25
26
void TrainRecord::setReportingMark(std::string mark ){
26
void TrainRecord::setReportingMark(std::string mark ){
27
    reporting.assign( mark );
27
    reporting.assign( mark );
28
}
28
}
29
29
30
uint16_t TrainRecord::getRoadNumber(){
-
 
-
 
30
uint32_t TrainRecord::getRoadNumber(){
31
    return road;
31
    return road;
32
}
32
}
33
33
34
void TrainRecord::setRoadNumber( uint16_t roadIn ){
-
 
-
 
34
void TrainRecord::setRoadNumber( uint32_t roadIn ){
35
    road = roadIn;
35
    road = roadIn;
36
}
36
}
37
37
38
std::string TrainRecord::getStockType(){
38
std::string TrainRecord::getStockType(){
39
    return stock;
39
    return stock;