#pragma once #include "DrawModel\TypeSet.h" #include "TInterval.h" #include "DrawModel\ObjectSet.h" #include "RowCol.h" namespace NSeis { class CSeisIndexRandomLineSet; //任意地震测线索引,为了自定义测线(如过井测线),保存线道号序列, //显示剖面时需要根据该线道序列读取剖面数据 class AFX_EXT_CLASS CSeisIndexRandomLine { public: CSeisIndexRandomLine(void); ~CSeisIndexRandomLine(void); bool isEmpty() const { return nodes_.isEmpty(); } int size() { return nodes_.size(); } int addNode(const CRowCol& rc); void insertNode(int idx,const CRowCol& rc); void setNodePosition(int idx,const CRowCol& rc); void removeNode(int idx); void removeNode(const CRowCol& rc); //void limitTo(const CubeSampling&); // nrNodes should be 2 int nodeIndex(const CRowCol& rc) const; int nrNodes() const; const CRowCol& nodePosition(int idx) const; void allNodePositions(TTypeSet& rcs) const; void setZRange( const TInterval& rg ) { zrange_ = rg; } TInterval zRange() const { return zrange_; } protected: TTypeSet nodes_; //线道号序列 TInterval zrange_; //时间范围 CSeisIndexRandomLineSet* m_pLinesSet; friend class CSeisIndexRandomLineSet; }; class AFX_EXT_CLASS CSeisIndexRandomLineSet : public TObjectSet { public: CSeisIndexRandomLineSet(); void AddLine(CSeisIndexRandomLine* srl) { srl->m_pLinesSet=this; *this += srl; } void RemoveLine(int nIndex) { delete remove(nIndex); } }; }//namespace using namespace NSeis;