00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00027
#ifndef SHSTREAM_HPP
00028
#define SHSTREAM_HPP
00029
00030
#include <list>
00031
#include "ShDllExport.hpp"
00032
#include "ShChannel.hpp"
00033
#include "ShChannelNode.hpp"
00034
00035
namespace SH {
00036
00042 class
00043
SH_DLLEXPORT ShStream {
00044
public:
00045 ShStream(
const ShChannelNodePtr& node);
00046
00047
template<
typename T>
00048 ShStream(
const ShChannel<T>& channel);
00049
00050
typedef std::list<ShChannelNodePtr> NodeList;
00051
00052 NodeList::const_iterator begin()
const;
00053 NodeList::const_iterator end()
const;
00054 NodeList::iterator begin();
00055 NodeList::iterator end();
00056
int size()
const;
00057
00058
template<
typename T>
00059
void append(
const ShChannel<T>& channel);
00060
template<
typename T>
00061
void prepend(
const ShChannel<T>& channel);
00062
00063
void append(
const ShChannelNodePtr& node);
00064
void prepend(
const ShChannelNodePtr& node);
00065
00066 ShStream& operator=(
const ShProgram& program);
00067
00068
private:
00069 std::list<ShChannelNodePtr> m_nodes;
00070 };
00071
00075
template<
typename T1,
typename T2>
00076 ShStream
combine(
const ShChannel<T1>& left,
const ShChannel<T2>& right);
00077
00082
template<
typename T2>
00083 ShStream
combine(
const ShStream& left,
const ShChannel<T2>& right);
00084
00089
template<
typename T1>
00090 ShStream
combine(
const ShChannel<T1>& left,
const ShStream& right);
00091
00092 SH_DLLEXPORT
00093 ShStream
combine(
const ShStream& left,
const ShStream& right);
00094
00097
template<
typename T1,
typename T2>
00098 ShStream
operator&(
const ShChannel<T1>& left,
const ShChannel<T2>& right);
00099
00102
template<
typename T2>
00103 ShStream
operator&(
const ShStream& left,
const ShChannel<T2>& right);
00104
00107
template<
typename T1>
00108 ShStream
operator&(
const ShChannel<T1>& left,
const ShStream& right);
00109
00112 SH_DLLEXPORT
00113 ShStream
operator&(
const ShStream& left,
const ShStream& right);
00114
00119 SH_DLLEXPORT
00120
ShProgram connect(
const ShStream& stream,
const ShProgram& program);
00121
00124 SH_DLLEXPORT
00125
ShProgram operator<<(
const ShProgram& program,
const ShStream& stream);
00126
00127
00128 }
00129
00130
#include "ShStreamImpl.hpp"
00131
00132
#endif