paths.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef EQSERVER_PATHS_H
00019 #define EQSERVER_PATHS_H
00020
00021 #include "types.h"
00022
00023 namespace eq
00024 {
00025 namespace server
00026 {
00027
00028
00029
00030 struct NodePath
00031 {
00032 NodePath( const uint32_t index = 0 ) : nodeIndex( index ) {}
00033 uint32_t nodeIndex;
00034 };
00035
00036 struct PipePath : public NodePath
00037 {
00038 PipePath( const uint32_t index = 0 ) : pipeIndex( index ) {}
00039 PipePath( const NodePath& p ) : NodePath( p ), pipeIndex( 0 ) {}
00040 uint32_t pipeIndex;
00041 };
00042
00043 struct WindowPath : public PipePath
00044 {
00045 WindowPath( const uint32_t index = 0 ) : windowIndex( index ) {}
00046 WindowPath( const PipePath& p ) : PipePath( p ), windowIndex( 0 ) {}
00047 uint32_t windowIndex;
00048 };
00049
00050 struct ChannelPath : public WindowPath
00051 {
00052 ChannelPath( const uint32_t index = 0 ) : channelIndex( index ) {}
00053 ChannelPath( const WindowPath& p ) : WindowPath( p ), channelIndex( 0 ) {}
00054 uint32_t channelIndex;
00055 };
00056
00057
00058 struct CanvasPath
00059 {
00060 CanvasPath( const uint32_t index = 0 ) : canvasIndex( index ) {}
00061 uint32_t canvasIndex;
00062 };
00063
00064 struct SegmentPath : public CanvasPath
00065 {
00066 SegmentPath( const uint32_t index = 0 ) : segmentIndex( index ) {}
00067 SegmentPath( const CanvasPath& p ) : CanvasPath( p ), segmentIndex( 0 ) {}
00068 uint32_t segmentIndex;
00069 };
00070
00071 struct ObserverPath
00072 {
00073 ObserverPath( const uint32_t index = 0 ) : observerIndex( index ) {}
00074 uint32_t observerIndex;
00075 };
00076
00077 struct LayoutPath
00078 {
00079 LayoutPath( const uint32_t index = 0 ) : layoutIndex( index ) {}
00080 uint32_t layoutIndex;
00081 };
00082
00083 struct ViewPath : public LayoutPath
00084 {
00085 ViewPath( const uint32_t index = 0 ) : viewIndex( index ) {}
00086 ViewPath( const LayoutPath& p ) : LayoutPath( p ), viewIndex( 0 ) {}
00087 uint32_t viewIndex;
00088 };
00089
00090
00091 inline std::ostream& operator << ( std::ostream& os, const NodePath& path )
00092 {
00093 os << "node " << path.nodeIndex;
00094 return os;
00095 }
00096 inline std::ostream& operator << ( std::ostream& os, const PipePath& path )
00097 {
00098 os << static_cast< const NodePath& >( path ) << " pipe " << path.pipeIndex;
00099 return os;
00100 }
00101 inline std::ostream& operator << ( std::ostream& os, const WindowPath& path )
00102 {
00103 os << static_cast< const PipePath& >( path ) << " window "
00104 << path.windowIndex;
00105 return os;
00106 }
00107 inline std::ostream& operator << ( std::ostream& os, const ChannelPath& path )
00108 {
00109 os << static_cast< const WindowPath& >( path ) << " channel "
00110 << path.channelIndex;
00111 return os;
00112 }
00113
00114 inline std::ostream& operator << ( std::ostream& os, const ObserverPath& path )
00115 {
00116 os << "observer " << path.observerIndex;
00117 return os;
00118 }
00119
00120 inline std::ostream& operator << ( std::ostream& os, const LayoutPath& path )
00121 {
00122 os << "layout " << path.layoutIndex;
00123 return os;
00124 }
00125 inline std::ostream& operator << ( std::ostream& os, const ViewPath& path )
00126 {
00127 os << static_cast< const LayoutPath& >( path ) << " view "
00128 << path.viewIndex;
00129 return os;
00130 }
00131
00132 inline std::ostream& operator << ( std::ostream& os, const CanvasPath& path )
00133 {
00134 os << "canvas " << path.canvasIndex;
00135 return os;
00136 }
00137 inline std::ostream& operator << ( std::ostream& os, const SegmentPath& path )
00138 {
00139 os << static_cast< const CanvasPath& >( path ) << " segment "
00140 << path.segmentIndex;
00141 return os;
00142 }
00143
00144 }
00145 }
00146 #endif // EQSERVER_PATHS_H