remove deprecated std::pointer_to_unary_function

This commit is contained in:
Günter Obiltschnig
2020-01-04 11:28:24 +01:00
parent 4ec5d35060
commit 50e9d35c3c
3 changed files with 9 additions and 9 deletions

View File

@@ -32,20 +32,20 @@ class Foundation_API TraverseBase
{
public:
typedef std::stack<DirectoryIterator> Stack;
typedef std::pointer_to_unary_function<const Stack&, UInt16> DepthFunPtr;
typedef std::function<UInt16(const Stack&)> DepthFun;
enum
{
D_INFINITE = 0 /// Special value for infinite traverse depth.
};
TraverseBase(DepthFunPtr depthDeterminer, UInt16 maxDepth = D_INFINITE);
TraverseBase(DepthFun depthDeterminer, UInt16 maxDepth = D_INFINITE);
protected:
bool isFiniteDepth();
bool isDirectory(Poco::File& file);
DepthFunPtr _depthDeterminer;
DepthFun _depthDeterminer;
UInt16 _maxDepth;
DirectoryIterator _itEnd;
@@ -59,7 +59,7 @@ private:
class Foundation_API ChildrenFirstTraverse: public TraverseBase
{
public:
ChildrenFirstTraverse(DepthFunPtr depthDeterminer, UInt16 maxDepth = D_INFINITE);
ChildrenFirstTraverse(DepthFun depthDeterminer, UInt16 maxDepth = D_INFINITE);
const std::string next(Stack* itStack, bool* isFinished);
@@ -73,7 +73,7 @@ private:
class Foundation_API SiblingsFirstTraverse: public TraverseBase
{
public:
SiblingsFirstTraverse(DepthFunPtr depthDeterminer, UInt16 maxDepth = D_INFINITE);
SiblingsFirstTraverse(DepthFun depthDeterminer, UInt16 maxDepth = D_INFINITE);
const std::string next(Stack* itStack, bool* isFinished);