next up previous contents
Next: Links input Up: Street network data and Previous: Nodes input   Contents

Link class

The link class is analogous to the node class:


{}
typedef double Len ;
typedef double Spd ;
...
class Link {
private:
    Id id_;
public:
    void set_id( Id val ) { id_ = val ; }
    Id   id() { return id_ ; }
private:
    Node* fromNode_;
public:
    void  set_fromNode( Node* node ) { fromNode_ = node ; }
    Node* fromNode() { return fromNode_ ; }
private:
    Node* toNode_ ;
public:
    void  set_toNode( Node* node ) { toNode_ = node ; }
    Node* toNode() { return toNode_ ; }
private:
    Len len_ ;
public:
    void set_length( Len val ) { len_ = val ; }
    Len  length() { return len_ ; }
};



2004-02-02