00001 /*------------------------------------------------------------------- 00002 * Name: legoLoop.H 00003 * 00004 * Designer: Willie Glover 00005 * 00006 * Created: 5/28/96 00007 * 00008 * Description: This file contains the LEGO header file which 00009 * defines the base block region derived class. 00010 * 00011 * Location: /ncsu/tinker/LEGO/src/derived/legoLOOP.H 00012 -------------------------------------------------------------------- 00013 * 5/31/96 WTG: Initial file creation. 00014 * 6/11/97 WAH: Added GetOpCount method. 00015 --------------------------------------------------------------------*/ 00016 00017 #ifndef LEGOLOOP_H 00018 #define LEGOLOOP_H 00019 00020 #include "region.H" 00021 00022 //--------------------------------------------------------------------------- 00023 00024 class legoLoop : public legoRegion 00025 { 00026 00027 public: 00028 00029 legoLoop () : legoRegion(RT_LOOP,0) {}; 00030 legoLoop (unsigned rId = 0): legoRegion(RT_LOOP,rId) {}; 00031 00032 ~legoLoop () 00033 { 00034 RegionKiller(); 00035 } 00036 int GetOpCount (void) 00037 { 00038 int opct = 0; 00039 00040 for (int i = 0; i < GetCount(); i++) 00041 opct += ((legoRegion *) GetItem(i))->GetOpCount(); 00042 return opct; 00043 } 00044 }; 00045 00046 #endif // LEGOLOOP_H
1.3.2