Alex Bikfalvi
SimStream Documentation
TopoBriteNode.cpp
00001 #include "Headers.h" 00002 #include "TopoBriteNode.h" 00003 00004 CTopoBriteNode::CTopoBriteNode( 00005 __uint32 id, 00006 __uint32 xpos, 00007 __uint32 ypos, 00008 __uint32 degree 00009 ) 00010 { 00011 this->id = id; 00012 this->xpos = xpos; 00013 this->ypos = ypos; 00014 this->degree = degree; 00015 00016 this->edges = new __uint32[this->degree]; 00017 assert(this->edges); 00018 00019 for(__uint32 index = 0; index < this->degree; index++) this->edges[index] = 0xFFFFFFFF; 00020 this->edgeSet = 0; 00021 } 00022 00023 CTopoBriteNode::~CTopoBriteNode() 00024 { 00025 delete[] this->edges; 00026 } 00027 00028 void CTopoBriteNode::SetEdge(__uint32 edge) 00029 { 00030 assert(this->edgeSet < this->degree); 00031 this->edges[this->edgeSet++] = edge; 00032 }
Last updated: February 8, 2011