llchainio.cpp

Go to the documentation of this file.
00001 
00034 #include "linden_common.h"
00035 #include "llchainio.h"
00036 
00037 #include "lliopipe.h"
00038 #include "llioutil.h"
00039 
00040 
00044 // static
00045 bool LLDeferredChain::addToPump(
00046         LLPumpIO* pump,
00047         F32 in_seconds,
00048         const LLPumpIO::chain_t& deferred_chain,
00049         F32 chain_timeout)
00050 {
00051         if(!pump) return false;
00052         LLPumpIO::chain_t sleep_chain;
00053         sleep_chain.push_back(LLIOPipe::ptr_t(new LLIOSleep(in_seconds)));
00054         sleep_chain.push_back(
00055                 LLIOPipe::ptr_t(new LLIOAddChain(deferred_chain, chain_timeout)));
00056 
00057         // give it a litle bit of padding.
00058         pump->addChain(sleep_chain, in_seconds + 10.0f);
00059         return true;
00060 }
00061 
00065 LLChainIOFactory::LLChainIOFactory()
00066 {
00067 }
00068 
00069 // virtual
00070 LLChainIOFactory::~LLChainIOFactory()
00071 {
00072 }
00073 
00074 #if 0
00075 bool LLChainIOFactory::build(LLIOPipe* in, LLIOPipe* out) const
00076 {
00077         if(!in || !out)
00078         {
00079                 return false;
00080         }
00081         LLIOPipe* first = NULL;
00082         LLIOPipe* last = NULL;
00083         if(build_impl(first, last) && first && last)
00084         {
00085                 in->connect(first);
00086                 last->connect(out);
00087                 return true;
00088         }
00089         LLIOPipe::ptr_t foo(first);
00090         LLIOPipe::ptr_t bar(last);
00091         return false;
00092 }
00093 #endif

Generated on Thu Jul 1 06:08:21 2010 for Second Life Viewer by  doxygen 1.4.7