| Polaris: TopSortNode.cc Source File | ||
|
Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members
TopSortNode.ccGo 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 "Collection/List.h" 00009 #include "Collection/Iterator.h" 00010 #include "DirectedEdge.h" 00011 #include "StringElem.h" 00012 #include "TopSortNode.h" 00013 00014 TopSortNode::TopSortNode( StringElem & name ) { 00015 #ifdef CLASS_INSTANCE_REGISTRY 00016 register_instance(TOP_SORT_NODE, sizeof(TopSortNode), this); 00017 #endif 00018 00019 _key_name = name; 00020 _number_pointing_at_me = 0; 00021 _number_I_point_at = 0; 00022 }; 00023 00024 StringElem & 00025 TopSortNode::key() const { 00026 return (StringElem &) _key_name; 00027 } 00028 00029 void 00030 TopSortNode::inc_sources() { 00031 ++_number_pointing_at_me; 00032 }; 00033 00034 void 00035 TopSortNode::inc_targets() { 00036 ++_number_I_point_at; 00037 }; 00038 00039 void 00040 TopSortNode::add_to_target_list( StringElem & othername ) { 00041 _target_list.ins_last ( othername.clone() ); 00042 }; 00043 00044 void 00045 TopSortNode::add_to_source_list( StringElem & othername ) { 00046 _source_list.ins_last ( othername.clone() ); 00047 }; 00048 00049 int 00050 TopSortNode::number_sources() { 00051 return _number_pointing_at_me; 00052 }; 00053 00054 int 00055 TopSortNode::number_targets() { 00056 return _number_I_point_at; 00057 }; 00058 00059 List<StringElem> & 00060 TopSortNode::release_list() { 00061 return (List<StringElem> &) _release_list; 00062 }; 00063 00064 List<StringElem> & 00065 TopSortNode::source_list() { 00066 return (List<StringElem> &) _source_list; 00067 }; 00068 00069 List<StringElem> & 00070 TopSortNode::target_list() { 00071 return (List<StringElem> &) _target_list; 00072 }; 00073 00074 void 00075 TopSortNode::dec_sources() { 00076 --_number_pointing_at_me; 00077 }; 00078 00079 void 00080 TopSortNode::dec_targets() { 00081 --_number_I_point_at; 00082 }; 00083 00084 |
||
|