PHNodeIterator.h
//-----------------------------------------------------------------------------
// $Header: /afs/rhic/phenix/cvsroot/offline/framework/phool/PHNodeIterator.h,v 1.10 1999/09/01 17:12:42 messer Exp $
//
// The PHOOL's Software
// Copyright (C) PHENIX collaboration, 1999
//
// Declaration of class PHNodeIterator
//
// Purpose: iterator to navigate a node tree
//
// Author: Matthias Messer
//-----------------------------------------------------------------------------
#ifndef PHNODEITERATOR_H
#define PHNODEITERATOR_H
#include "phool.h"
#include "PHCompositeNode.h"
#include "PHPointerList.h"
#include "PHString.h"
class PHNodeOperation;
class PHNodeIterator {
public:
PHNodeIterator(PHCompositeNode*);
~PHNodeIterator();
private:
PHNodeIterator();
public:
void print();
PHPointerList<PHNode>& ls();
PHNode* findFirst(const PHString&, const PHString&);
PHBoolean cd(const PHString = "");
PHBoolean addNode(PHNode*);
void forEach(PHNodeOperation&);
void for_each(PHNodeOperation&);
protected:
PHCompositeNode *currentNode;
PHPointerList<PHNode> subNodeList;
};
#endif /* PHNODEITERATOR_H */