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 STILTerminations_H 00014 #define STILTerminations_H 00015 00016 #include "stilcom.h" // Common macros, typedefs 00017 #include "stilcomstr.h" 00018 #include "stilterminationitem.h" // TerminationItem object 00019 00020 #include <list> // STL Linked List Interface 00021 00022 //--------------------------------------------------------------------------- 00028 //--------------------------------------------------------------------------- 00029 class STILTerminations : public STILBlock { 00030 00031 public: 00032 // - Default Constructor for a STILTerminations object. 00033 STILTerminations(); 00034 00035 // - Constructor for a STILTerminations object which sets the Entity type 00036 STILTerminations(STILEntity::Type t); 00037 00038 // - Constructor a STILTerminations object from another STILTerminations 00039 STILTerminations(const STILTerminations & arg); 00040 00041 // - Destructor for a STILTerminations object. 00042 virtual ~STILTerminations(); 00043 00044 // - Assignment operator for a STILTerminations object. 00045 STILTerminations & operator=(const STILTerminations & arg); 00046 00047 // - Write the STILTerminations object to a FILE 00048 void write(FILE * pOutFile, LONG indentation=0) const; 00049 00050 // - add a Termination to the list of Terminations 00051 void addTerminationItem(const STILTerminationItem &); 00052 00053 // - clear and setup the new Terminations object 00054 void init(); 00055 00056 private: 00057 00058 // ***** Implementation NOTE: *** 00059 // After looking at this code quickly again just now, it looks like 00060 // the list below should instead be replaced by the base entity list, 00061 // and then adding each 00062 // termination item would be a call to an addEntity (simple entity) call. 00063 // Not sure why this is implemented as it's own list. It could be 00064 // that this code hasnt been touched since the very beginning. 00065 // In any case - see if this can be replaced with an addEntity() call, 00066 // and if so, fix it !!! 00067 00068 // list of STILTerminationItems for this Termination block 00069 std::list<STILTerminationItem> m_termItemList; 00070 00071 }; // end class STILTerminations 00072 00073 #endif