lgrPacketPrinter.h
Go to the documentation of this file.
00001 /******************************************************************************
00002 ** Copyright (c) 1992-2010 VT MAK
00003 ** All rights reserved.
00004 ******************************************************************************/
00005 
00008 #ifndef lgrPacketPrinter_H_
00009 #define lgrPacketPrinter_H_
00010 
00011 #include "lgrCore.h"
00012 #include "virtualConstructor.h"
00013 #include "messageOutput.h"
00014 
00015 class DtOutputStream;
00016 
00017 namespace MAKLogger
00018 {
00019    class DtPacket;
00020    class DtMessageIOInfo;
00021    class DtMessageInput;
00022 
00025    class DT_DLL_LGRCORE DtLgrPacketPrinter
00026    {
00027    public:
00028 
00029       //Empty Constructor
00030       DtLgrPacketPrinter();
00031 
00032       //Destructor.
00033       virtual ~DtLgrPacketPrinter();
00034 
00036       virtual void beginPrinting(const DtMessageIOInfo* info,
00037          const DtMessageInput* fileInput, const DtString& destination);
00038 
00040       virtual void printPacket( const DtPacket& packet ) = 0;
00041 
00043       virtual void endPrinting();
00044 
00045    private:
00047       DtLgrPacketPrinter(const DtLgrPacketPrinter&);
00049       DtLgrPacketPrinter& operator=(const DtLgrPacketPrinter&);
00050    };
00051 
00054    class DT_DLL_LGRCORE DtLgrPacketPrinterOutput : public DtMessageOutput
00055    {
00056    public:
00061       DtLgrPacketPrinterOutput(DtLgrPacketPrinter* printer,
00062          const DtString& destination, const DtMessageIOInfo* info);
00063 
00065       virtual ~DtLgrPacketPrinterOutput();
00066 
00067    private:
00069       DtLgrPacketPrinterOutput(const DtLgrPacketPrinterOutput&);
00070       DtLgrPacketPrinterOutput& operator=(const DtLgrPacketPrinterOutput&);
00072    public:
00073 
00076       virtual void setPrinter(DtLgrPacketPrinter* printer );
00077 
00080       virtual void setDestination(const DtString& destination);
00081 
00083       virtual const DtString& destination() const;
00084 
00086       virtual DtLgrPacketPrinter* currentPrinter();
00087 
00090       virtual void activate(const DtMessageInput* fileInput);
00091 
00093       virtual bool isActivated() const;
00094 
00096       virtual void deactivate();
00097 
00100       virtual bool outputPacket(const DtPacket& packet);
00101 
00103       virtual void filterMessage(DtPacket* packet);
00104 
00105       virtual const DtMessageIOInfo* info() const;
00106 
00108       virtual void flush();
00109 
00111       virtual void setOutputScaling(double scaling, bool enableStatic);
00112 
00113    protected:
00114 
00115       DtLgrPacketPrinter* myPrinter;
00116       const DtMessageIOInfo* myInfo;
00117       bool myActivateFlag;
00118       DtString myDestination;
00119 
00120    };
00121 }
00122 
00123 #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)