Lunchbox  1.16.0
Multi-threaded C++ toolbox library for all application developers creating high-performance multi-threaded programs.
visitorResult.h
1 
2 /* Copyright (c) 2009-2013, Stefan Eilemann <eile@equalizergraphics.com>
3  *
4  * This file is part of Lunchbox <https://github.com/Eyescale/Lunchbox>
5  *
6  * This library is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License version 2.1 as published
8  * by the Free Software Foundation.
9  *
10  * This library is distributed in the hope that it will be useful, but WITHOUT
11  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12  * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13  * details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this library; if not, write to the Free Software Foundation, Inc.,
17  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18  */
19 
20 #ifndef LUNCHBOX_VISITORRESULT_H
21 #define LUNCHBOX_VISITORRESULT_H
22 
23 #include <iostream>
24 #include <lunchbox/types.h>
25 
26 namespace lunchbox
27 {
30 {
34 };
35 
36 inline std::ostream& operator<<(std::ostream& os, const VisitorResult& result)
37 {
38  switch (result)
39  {
40  case TRAVERSE_CONTINUE:
41  return os << "continue";
42  case TRAVERSE_TERMINATE:
43  return os << "terminate";
44  case TRAVERSE_PRUNE:
45  return os << "prune";
46  default:
47  return os << "ERROR";
48  }
49 }
50 }
51 #endif // LUNCHBOX_VISITORRESULT_H
Basic type definitions not provided by the operating system.
continue the traversal
Definition: visitorResult.h:31
VisitorResult
The result code from any visit operation.
Definition: visitorResult.h:29
abort the traversal
Definition: visitorResult.h:32
Abstraction layer and common utilities for multi-threaded programming.
Definition: algorithm.h:29
std::ostream & operator<<(std::ostream &os, const Array< T > &array)
Pretty-print all members of the array.
Definition: array.h:59
do not traverse current entity downwards
Definition: visitorResult.h:33