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 STILEventList_H 00014 #define STILEventList_H 00015 00016 00017 #include "stilcom.h" // Common library 00018 #include "stilevent.h" 00019 #include <vector> 00020 00021 00022 //--------------------------------------------------------------------------- 00028 //--------------------------------------------------------------------------- 00029 class STILEventList { 00030 00031 // - Public members 00032 public: 00033 // - Default constructor 00034 STILEventList(); 00035 00036 // - Copy Constructor 00037 STILEventList(const STILEventList &); 00038 00039 // - Destructor 00040 ~STILEventList(); 00041 00042 // - Assignment operator 00043 STILEventList & operator=(const STILEventList &); 00044 00045 // - Initialize/reset this object 00046 void init(); 00047 00048 // - Get the number of events in the list 00049 LONG getCount() const ; 00050 00051 // - Reference a specific event in the list 00052 const STILEvent& operator[](const LONG&) const; 00053 const STILEvent& getEvent(const LONG) const; 00054 00055 // - Add an event to the list 00056 void addEvent(const STILEvent&); 00057 00058 // - Private members 00059 private: 00060 00061 std::vector<STILEvent> m_eventList; // list of events (drive, compare, expect,& unresolved events) 00062 00063 }; 00064 00066 //-------------------------------------------------------------------------- 00074 //-------------------------------------------------------------------------- 00075 inline void STILEventList::init() { m_eventList.clear(); } 00076 00077 //-------------------------------------------------------------------------- 00085 //-------------------------------------------------------------------------- 00086 inline LONG STILEventList::getCount() const { return m_eventList.size(); } 00087 00088 #endif