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 STILVectorEventList_H 00014 #define STILVectorEventList_H 00015 00016 #include "stilcom.h" 00017 #include "stilvectorevent.h" 00018 00019 #include <list> 00020 #include <vector> 00021 00022 //--------------------------------------------------------------------------- 00028 //--------------------------------------------------------------------------- 00029 class STILVectorEventList { 00030 00031 public: 00032 // - Default Constructor to create and initialize a STILVectorEventList object 00033 STILVectorEventList(); 00034 00035 // - Copy Constructor 00036 STILVectorEventList(const STILVectorEventList &); 00037 00038 // - Destructor which frees storage associated with the STILVectorEventList 00039 virtual ~STILVectorEventList(); 00040 00041 // - The assignment operator 00042 STILVectorEventList& operator=(const STILVectorEventList &); 00043 00044 // - Return values off of the list by subscripting 00045 const STILVectorEvent & operator[](const LONG&) const; 00046 const STILVectorEvent & getVectorEvent(const LONG) const; 00047 00048 // - Initialize this object 00049 void init(); 00050 00051 // - Get the number of items on the list 00052 LONG getCount() const; 00053 00054 // - Get/Set HasScanEvents attribute 00055 void setHasScanEvents(bool hse); 00056 bool getHasScanEvents() const; 00057 00058 // - Add a vector event to the list 00059 void addVectorEvent(const STILVectorEvent&); 00060 00061 // - Print the list of vectors 00062 void print() const; 00063 00064 protected: 00065 bool m_hasScanEvents; 00066 std::vector<const STILVectorEvent*> m_VEList; 00067 }; 00068 00069 //-------------------------------------------------------------------------- 00077 //-------------------------------------------------------------------------- 00078 inline LONG STILVectorEventList::getCount() const { return m_VEList.size(); } 00079 00080 //-------------------------------------------------------------------------- 00088 //-------------------------------------------------------------------------- 00089 inline bool STILVectorEventList::getHasScanEvents() const { return m_hasScanEvents; } 00090 00091 //-------------------------------------------------------------------------- 00099 //-------------------------------------------------------------------------- 00100 inline void STILVectorEventList::setHasScanEvents(bool hse) { m_hasScanEvents = hse; } 00101 00102 #endif