00001 // -*- Mode: C++; tab-width: 2; -*- 00002 // vi: set ts=2: 00003 // 00004 // $Id: pyIndexList.h,v 1.2 2005/12/23 17:01:57 amoll Exp $ 00005 // 00006 00007 #ifndef BALL_PYTHON_PYINDEXLIST_H 00008 #define BALL_PYTHON_PYINDEXLIST_H 00009 00010 #ifndef BALL_COMMON_H 00011 # include <BALL/common.h> 00012 #endif 00013 00014 #ifndef BALL_DATAYPE_STRING_H 00015 # include <BALL/DATATYPE/string.h> 00016 #endif 00017 00018 namespace BALL 00019 { 00025 class PyIndexList 00026 : public std::list<Index> 00027 { 00028 public: 00029 00030 BALL_CREATE(PyIndexList) 00031 00032 00035 00038 typedef Index ValueType; 00039 00042 typedef Index PointerType; 00043 00046 typedef std::list<Index>::iterator Iterator; 00047 00050 typedef std::list<Index>::const_iterator ConstIterator; 00051 00053 00056 00060 PyIndexList(); 00061 00063 PyIndexList(const PyIndexList& new_list); 00064 00069 PyIndexList(const std::vector<Index>& indices); 00070 00075 PyIndexList(const std::list<Index>& fragment); 00076 00081 PyIndexList(const std::vector<Position>& indices); 00082 00087 PyIndexList(const std::list<Position>& fragment); 00088 00091 virtual ~PyIndexList() throw(); 00093 00097 00099 PyIndexList& operator = (const std::list<Index>& idx_list); 00101 PyIndexList& operator = (const std::list<Position>& idx_list); 00103 PyIndexList& operator = (const std::vector<Index>& idx_list); 00105 PyIndexList& operator = (const std::vector<Position>& idx_list); 00107 }; 00108 00109 } // namespace BALL 00110 00111 #endif // BALL_PYTHON_PYINDEXLIST_H