Lunchbox  1.8.0
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 <lunchbox/types.h>
24 #include <iostream>
25 
26 namespace lunchbox
27 {
30  {
34  };
35 
36  inline std::ostream& operator << ( std::ostream& os,
37  const VisitorResult& result )
38  {
39  switch( result )
40  {
41  case TRAVERSE_CONTINUE:
42  os << "continue";
43  break;
44  case TRAVERSE_TERMINATE:
45  os << "terminate";
46  break;
47  case TRAVERSE_PRUNE:
48  os << "prune";
49  break;
50  default:
51  os << "ERROR";
52  break;
53  }
54  return os;
55  }
56 }
57 #endif // LUNCHBOX_VISITORRESULT_H