🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #484

Stringnode.c

#484
From: Jeffrey A Waller
Date: Mon, 09 Oct 1989 22:34
36 lines
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() {}
Technical Details
Message-ID: <8910092234.AA14182@cssune.tamu.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!tut.cis.ohio-state.edu!CSSUN.TAMU.EDU!jeffw

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!ucsd!tut.cis.ohio-state.edu!CSSUN.TAMU.EDU!jeffw
From: jeffw@CSSUN.TAMU.EDU (Jeffrey A Waller)
Newsgroups: gnu.g++.bug
Subject: Stringnode.c
Message-ID: <8910092234.AA14182@cssune.tamu.edu>
Date: 9 Oct 89 22:34:42 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 36