Thread View: gnu.g++.bug
1 messages
1 total messages
Started by Jeffrey A Waller
Mon, 09 Oct 1989 22:34
Stringnode.c
Author: Jeffrey A Waller
Date: Mon, 09 Oct 1989 22:34
Date: Mon, 09 Oct 1989 22:34
36 lines
1310 bytes
1310 bytes
#include "Stringnode.h"
node *Stringnode::Copy()
{ return(new Stringnode(*this));
}
unsigned long Stringnode::IdentifySelf()
{ return(Stringnode_id);
}
int Stringnode::DerivedFrom(unsigned long derivedid)
{ return(derivedid == Stringnode_id || node::DerivedFrom(derivedid));
}
Stringnode::Stringnode(char *copyfrom = 0): (),stringdata(copyfrom) {}
Stringnode::Stringnode(Stringnode &sn): (sn),stringdata(sn.stringdata) {}
Stringnode &Stringnode::operator=(Stringnode &sn)
{ if(this == &sn) return(*this);
node::operator=(sn);
stringdata = sn.stringdata;
return(*this);
}
int Stringnode::Same(node *comparenode)
{ if(!comparenode) return(FALSE);
if(Stringnode_id != comparenode->IdentifySelf()) return(FALSE);
return(stringdata == ((Stringnode*)comparenode)->stringdata);
}
void Stringnode::Print(ostream &output)
{ output << stringdata;
}
Stringnode::~Stringnode() {}
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads