Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/Parser/ParseNode.cc

    r843054c2 r59db689  
    1010// Created On       : Sat May 16 13:26:29 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue May 19 16:48:30 2015
    13 // Update Count     : 3
     12// Last Modified On : Sat Jun  6 20:17:58 2015
     13// Update Count     : 23
    1414//
    1515
     
    2020int ParseNode::indent_by = 4;
    2121
    22 ParseNode::ParseNode( void ) : next( 0 ) {};
    23 ParseNode::ParseNode( string _name ) : name( _name ), next( 0 ) {}
     22ParseNode::ParseNode() : name( 0 ), next( 0 ) {};
     23ParseNode::ParseNode( const string *name_ ) : name( name_ ), next( 0 ) {}
    2424
    25 ParseNode *ParseNode::set_name( string _name ) {
    26         name = _name;
    27         return this;
    28 }
    29 
    30 ParseNode *ParseNode::set_name( string *_name ) {
    31         name = *_name; // deep copy
    32         delete _name;
    33 
    34         return this;
    35 }
    36 
    37 ParseNode::~ParseNode( void ) {
     25ParseNode::~ParseNode() {
    3826        delete next;
    3927};
    4028
    41 string ParseNode::get_name( void ) {
    42         return name;
    43 }
    44 
    45 ParseNode *ParseNode::get_link( void ) const {
     29ParseNode *ParseNode::get_link() const {
    4630        return next;
    4731}
    4832
    49 ParseNode *ParseNode::get_last(void) {
     33ParseNode *ParseNode::get_last() {
    5034        ParseNode *current = this;
    5135
     
    5640}
    5741
    58 ParseNode *ParseNode::set_link(ParseNode *_next) {
     42ParseNode *ParseNode::set_link( ParseNode *next_ ) {
    5943        ParseNode *follow;
    6044
    61         if ( _next == 0 ) return this;
     45        if ( next_ == 0 ) return this;
    6246
    6347        for ( follow = this; follow->next != 0; follow = follow->next );
    64         follow->next = _next;
     48        follow->next = next_;
    6549
    6650        return this;
    6751}
    6852
    69 const string ParseNode::get_name(void) const {
    70         return name;
    71 }
    72 
    73 void ParseNode::print(std::ostream &os, int indent) const {}
     53void ParseNode::print( std::ostream &os, int indent ) const {}
    7454
    7555
     
    7858
    7959        if ( next ) {
    80         next->printList( os, indent );
    81         }
     60                next->printList( os, indent );
     61        } // if
    8262}
    8363
Note: See TracChangeset for help on using the changeset viewer.