Polaris: DirectedEdge.cc Source File

DirectedEdge.cc

Go to the documentation of this file.
00001 ///
00002 /// \file TopSorter.cc
00003 ///
00004 #ifdef POLARIS_GNU_PRAGMAS
00005 #pragma implementation
00006 #endif
00007 ///
00008 #include "DirectedEdge.h"
00009 #include "String.h"
00010 
00011 
00012 DirectedEdge & 
00013 DirectedEdge::operator = (const DirectedEdge & de)
00014 {
00015     _source = de.source();
00016     _target   = de.target();
00017     return *this;
00018 }
00019 
00020 DirectedEdge::DirectedEdge( const StringElem & source, const StringElem & target ) {
00021     #ifdef CLASS_INSTANCE_REGISTRY
00022     register_instance(DIRECTED_EDGE, sizeof(DirectedEdge), this);
00023     #endif
00024 
00025     _source = source;
00026     _target   = target;
00027 }
00028 
00029 DirectedEdge::DirectedEdge( const char * source, const StringElem & target ) {
00030     #ifdef CLASS_INSTANCE_REGISTRY
00031     register_instance(DIRECTED_EDGE, sizeof(DirectedEdge), this);
00032     #endif
00033 
00034     _source = source;
00035     _target   = target;
00036 }
00037 
00038 DirectedEdge::DirectedEdge( const StringElem & source, const char * target ) {
00039     #ifdef CLASS_INSTANCE_REGISTRY
00040     register_instance(DIRECTED_EDGE, sizeof(DirectedEdge), this);
00041     #endif
00042 
00043     _source = source;
00044     _target   = target;
00045 }
00046 
00047 DirectedEdge::DirectedEdge( const char * source, const char * target ) {
00048     #ifdef CLASS_INSTANCE_REGISTRY
00049     register_instance(DIRECTED_EDGE, sizeof(DirectedEdge), this);
00050     #endif
00051 
00052     _source = source;
00053     _target   = target;
00054 }
00055 
00056 DirectedEdge::DirectedEdge(const DirectedEdge & other) {
00057     #ifdef CLASS_INSTANCE_REGISTRY
00058     register_instance(DIRECTED_EDGE, sizeof(DirectedEdge), this);
00059     #endif
00060 
00061     *this = other;
00062 }
00063 
00064 StringElem & 
00065 DirectedEdge::source() const {
00066     return (StringElem &) _source;
00067 }
00068 
00069 StringElem & 
00070 DirectedEdge::target() const {
00071     return (StringElem &) _target;
00072 }
00073 
00074 
 © 1995-2005 University of Illinois, Urbana-Champaign. All rights reserved.  Fri Mar 25 23:05:44 2005