00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _stream2_h
00018 #define _stream2_h
00019
00020 #include <stdio.h>
00021
00022 #include <spl/types.h>
00023 #include <spl/Debug.h>
00024 #include <spl/threading/Event.h>
00025 #include <spl/threading/Mutex.h>
00026 #include <spl/io/IStream.h>
00027 #include <spl/Memory.h>
00028 #include <spl/RefCountPtrCast.h>
00029 #include <spl/String.h>
00030 #include <spl/collection/Vector.h>
00031 #include <spl/WeakReference.h>
00032
00047 class IStreamState : public spl::IStream
00048 {
00049 protected:
00050 spl::IStream *m_parent;
00051 IStreamState **m_holder;
00052
00053 void ChangeState(IStreamState *newState);
00054 public:
00055 IStreamState( spl::IStream *parent, IStreamState **parentStateVar );
00056 virtual ~IStreamState();
00057
00058 virtual void OnLeave(IStreamState *newState) = 0;
00059 virtual void OnEnter(IStreamState *oldState) = 0;
00060 };
00061
00062 REGISTER_TYPEOF(124, IStreamState);
00063
00067 #endif