Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

TxqLog.h

Go to the documentation of this file.
00001 //-----------------------------------------------------------------------
00002 //
00003 // File:    TxqLog.h
00004 //
00005 // Purpose: Class for connecting multiple ostreams through a single ostream
00006 //           and connect to the model output windows.
00007 //
00008 // Version: $Id: TxqLog.h,v 1.9 2002/03/13 20:41:23 kgl Exp $
00009 //
00010 // Copyright (c) 1999 by Tech-X Corporation.  All rights reserved.
00011 //
00012 //-----------------------------------------------------------------------
00013 
00014 
00015 #ifndef TXQ_LOG_H
00016 #define TXQ_LOG_H
00017 
00018 
00019 // Qt includes
00020 // NO_DEBUG is needed for correct qstring implementation
00021 #define NO_DEBUG
00022 #include <qstring.h>
00023 
00024 // Txq includes
00025 #include <TxThroughStream.h>
00026 #include <txc_vector.h>
00027 
00028 // class declarations
00029 class TxqMasterIoFrame;
00030 
00031 
00046 class TxqLog : public TxThroughStream {
00047 
00048 public:
00049   
00054     TxqLog();
00055 
00061     TxqLog(ostream &os, txfilter f = TX_ALL);
00062 
00066     virtual ~TxqLog();
00067 
00072   TXSTD::vector<ostream*> getStreams();
00073 
00084     void attachModel(TxqMasterIoFrame *mdl, txfilter f = TX_ALL);
00085    
00092     void detachModel(TxqMasterIoFrame *mdl);
00093  
00094 
00101     void setModelFilter(txfilter f);
00102 
00103 
00104 protected:
00105 
00109     int sync ();
00110 
00119     int output (char *text, int length);
00120 
00124     TXSTD::map<TxqMasterIoFrame*, txfilter> mdlStateMap;
00125 
00129    TxqMasterIoFrame *model;
00130 
00134     txfilter mdlState;
00135 
00136 private:
00137 
00142     QString strBuffer;
00143 
00144 };
00145 
00146 // extern TxqLog txcout;
00147 // extern TxqLog txcerr;
00148 // extern TxqLog txcnull;
00149 
00150 #endif
Copyright Tech-X Corporation, all rights reserved.