00001
00002
00003 #ifndef SCTPIXELROD_RODPRIMLIST_H
00004 #define SCTPIXELROD_RODPRIMLIST_H
00005
00006 #include <list>
00007 #include <string>
00008 #include "RodPrimitive.h"
00009 #include "../CommonWithDsp/processor.h"
00010 #include "../CommonWithDsp/primParams.h"
00011
00012 namespace SctPixelRod {
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 class PrimListException {
00023 public:
00024 PrimListException( std::string descriptor, unsigned long data1, unsigned long data2);
00025 std::string getDescriptor() {return m_descriptor;};
00026 unsigned long getData1() {return m_data1;};
00027 unsigned long getData2() {return m_data2;};
00028
00029 private:
00030 std::string m_descriptor;
00031 unsigned long m_data1;
00032 unsigned long m_data2;
00033 };
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047 class RodPrimList : public list<RodPrimitive> {
00048 private:
00049
00050 unsigned long m_index;
00051
00052 unsigned long m_version;
00053
00054 unsigned long *m_buffer;
00055
00056 unsigned long m_bufferSize;
00057
00058 public:
00059
00060 RodPrimList(unsigned long theIndex) :
00061 list<RodPrimitive>(), m_index(theIndex),
00062 m_buffer(0), m_bufferSize(0) {m_version = PRIM_LIST_REVISION;};
00063
00064 RodPrimList() :
00065 list<RodPrimitive>(), m_index(0),
00066 m_buffer(0), m_bufferSize(0) {m_version = PRIM_LIST_REVISION;};
00067
00068 RodPrimList(const RodPrimList &rhs);
00069
00070 RodPrimList &operator=(const RodPrimList&);
00071
00072 ~RodPrimList();
00073
00074
00075 unsigned long checkSum();
00076
00077 unsigned long numWords();
00078
00079
00080 void bufferBuild() throw(PrimListException &);
00081
00082
00083 long getBufferLength() { return m_buffer[0]; };
00084
00085
00086 unsigned long *getBuffer() { return m_buffer; };
00087
00088
00089 void print();
00090
00091
00092 void clear();
00093
00094
00095 void setIndex(unsigned long i) { m_index=i; }
00096
00097 unsigned long getIndex() const { return m_index; } ;
00098
00099
00100 void setVersion(unsigned long version) { m_index=version; }
00101
00102 unsigned long getVersion() const { return m_version; } ;
00103 };
00104
00105 }
00106 #endif