You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWATI/Include/iPlot/iPlotBase/ZxRenderItemIterator.h

50 lines
991 B
C++

#pragma once
#include <QStack>
#include "iPlotBase_global.h"
class ZxRenderItem;
/// 图件树的迭代器
class I_PLOTBASE_EXPORT ZxRenderItemIterator
{
public:
ZxRenderItemIterator(ZxRenderItem* pRootItem);
ZxRenderItemIterator(const ZxRenderItemIterator& c);
const ZxRenderItemIterator& operator=(const ZxRenderItemIterator& c);
public:
// 先根遍历
class I_PLOTBASE_EXPORT const_iterator
{
QStack<ZxRenderItem*> stack;
const_iterator(ZxRenderItem* p);
public:
const_iterator(const const_iterator& c);
ZxRenderItem* operator*();
bool operator!=( const const_iterator& ) const;
bool operator==( const const_iterator& ) const;
const_iterator& operator++();
const const_iterator& operator=(const const_iterator& c);
friend class ZxRenderItemIterator;
};
const_iterator begin() const;
const_iterator end() const;
private:
ZxRenderItem* m_pRootItem;
};