00001 /******************************************************************************* 00002 * Copyright (c) 2006 International Business Machines Corporation 00003 * All rights reserved. This program and the accompanying materials 00004 * are made available under the terms of the Common Public License v1.0 00005 * which accompanies this distribution, and is available at 00006 * http://www.opensource.org/licenses/cpl1.0.php 00007 * 00008 * Contributors: 00009 * Douglas Sprague, Joel Wheeler - initial API and implementation 00010 * 00011 *****************************************************************************/ 00012 00013 #ifndef STILLoop_H 00014 #define STILLoop_H 00015 00016 00017 #include "stilblock.h" // STIL Block Interface (base class) 00018 #include "stilpatternblock.h" // STIL PatternBlock Interface 00019 00020 //--------------------------------------------------------------------------- 00027 //--------------------------------------------------------------------------- 00028 class STILLoop : public STILPatternBlock { 00029 00030 // - Public members 00031 public: 00032 00033 // - Default Constructor 00034 STILLoop(); 00035 00036 // - Construct given some entity type 00037 STILLoop(STILEntity::Type t); 00038 00039 // - Copy Constructor 00040 STILLoop(const STILLoop &); 00041 00042 // - Destructor 00043 virtual ~STILLoop(); 00044 00045 // - Assignment operator 00046 STILLoop & operator=(const STILLoop &); 00047 00048 // - Initializer 00049 void init(); 00050 00051 // - Write contents to a file 00052 virtual void write(FILE * pOutFile, LONG indentation=0) const; 00053 00054 00055 // - Set the number of times to loop 00056 void setCount (unsigned int times); 00057 00058 // - Get the number of times to loop 00059 unsigned int getCount (); 00060 00061 // Private section 00062 private: 00063 00064 unsigned int m_count; 00065 00066 }; // end STILLoop class 00067 00068 //Inline functions 00069 //-------------------------------------------------------------------------- 00077 //-------------------------------------------------------------------------- 00078 inline void STILLoop::setCount (unsigned int times) { 00079 m_count = times; 00080 } 00081 00082 //-------------------------------------------------------------------------- 00090 //-------------------------------------------------------------------------- 00091 inline unsigned int STILLoop::getCount () { return m_count; } 00092 00093 #endif