multiMessageOutput.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 
00008 
00009 #ifndef multiMessageOutput_H_
00010 #define multiMessageOutput_H_
00011 
00012 #include "messageOutput.h"
00013 #include "smartPointer.h"
00014 #include "messageBuffer.h"
00015 
00016 #include <functional>
00017 #include <set>
00018 
00019 namespace MAKLogger
00020 {
00021 
00024    class DT_DLL_LGRCORE DtMultiMessageOutput : public DtMessageOutput
00025    {
00026    public:
00027       virtual void outputMessages(const DtMessageBuffer& buffer);
00028 
00029       virtual void filterMessages(const DtMessageBuffer& buffer);
00030 
00031       virtual void addOutput(   DtMessageOutput* output);
00032       virtual void removeOutput(DtMessageOutput* output);
00033       virtual void clearOutputs();
00034 
00035    protected:
00036 
00037       struct filterAndSend : public std::unary_function<DtMessageOutput*, void>
00038       {
00039          filterAndSend(const DtMessageBuffer& messages) : myMessages(messages) {}
00040          void operator() (DtMessageOutput* output);
00041          const DtMessageBuffer& myMessages;
00042       };
00043 
00044 
00045       std::set<DtMessageOutput*> myOutputs;
00046    };
00047 
00048 }
00049 
00050 #endif

Document ID: Generated on Tue Oct 11 19:41:03 EDT 2011 from SVN revision 107422
Copyright © 2005-2011 VT MÄK Inc. All Rights Reserved (www.mak.com)