PluginFilterProcess Class Reference

#include <xpoilflt.h>

Inheritance diagram for PluginFilterProcess:

CamProcess List of all members.

Public Member Functions

 PluginFilterProcess (PluginNativeFilter *pFilter, CCLexFile *pInFile=NULL, CCLexFile *pOutFile=NULL)
virtual ~PluginFilterProcess ()
virtual void ProcessStdErr ()
BOOL ReportError ()
void ReportWarning ()

Protected Attributes

PluginNativeFilterm_pFilter
wxArrayString m_Errors
wxArrayString m_Warnings

Detailed Description

Definition at line 111 of file xpoilflt.h.


Constructor & Destructor Documentation

PluginFilterProcess::PluginFilterProcess PluginNativeFilter pFilter,
CCLexFile pInFile = NULL,
CCLexFile pOutFile = NULL
 

Definition at line 1600 of file xpoilflt.cpp.

01600                                                                                                              :
01601     CamProcess(pInFile, pOutFile)
01602 {
01603     TRACEUSER("Gerry", _T("PluginFilterProcess::PluginFilterProcess"));
01604     m_pFilter = pFilter;
01605 }

PluginFilterProcess::~PluginFilterProcess  )  [virtual]
 

Definition at line 1608 of file xpoilflt.cpp.

01609 {
01610     TRACEUSER("Gerry", _T("PluginFilterProcess::~PluginFilterProcess"));
01611 }


Member Function Documentation

void PluginFilterProcess::ProcessStdErr  )  [virtual]
 

Reimplemented from CamProcess.

Definition at line 1614 of file xpoilflt.cpp.

01615 {
01616 //  TRACEUSER("Gerry", _T("PluginFilterProcess::ProcessStdErr"));
01617 
01618     if (IsErrorAvailable())
01619     {
01620         wxTextInputStream tis(*GetErrorStream());
01621 
01622         // This assumes that the output is always line buffered
01623 //      while (!GetErrorStream()->Eof())
01624         while (IsErrorAvailable())
01625         {
01626             wxString line;
01627             line << tis.ReadLine();
01628 //          TRACEUSER("Gerry", _T("(stderr):%s"), line.c_str());
01629 
01630             if (!line.IsEmpty())
01631             {
01632                 // If line begins "MESSAGE:" then it is a debug message and can be discarded
01633                 wxString rest;
01634                 if (line.StartsWith(_T("MESSAGE:"), &rest))
01635                 {
01636 //                  TRACEUSER("Gerry", _T("XPFDebug:%s"), rest.c_str());
01637                 }
01638                 else if (line.StartsWith(_T("PROGRESS:"), &rest))
01639                 {
01640 //                  TRACEUSER("Gerry", _T("XPFProgress:%s"), rest.c_str());
01641                     if (m_pFilter)
01642                     {
01643                         unsigned long /*TYPENOTE: Correct*/ Val = wxStrtoul(rest.c_str(), NULL, 10);
01644                         if (Val > 0)
01645                         {
01646 //                          TRACEUSER("Gerry", _T("Setting progress to %d"), Val);
01647                             m_pFilter->SetProgressBarCount((UINT32)Val);
01648                         }
01649                     }
01650                 }
01651                 else if (line.StartsWith(_T("WARNING:"), &rest))
01652                 {
01653 //                  TRACEUSER("Gerry", _T("XPFWarning:%s"), rest.c_str());
01654                     m_Warnings.Add(rest);
01655                 }
01656                 else if (line.StartsWith(_T("ERROR:"), &rest))
01657                 {
01658 //                  TRACEUSER("Gerry", _T("XPFError:%s"), rest.c_str());
01659                     m_Errors.Add(rest);
01660                 }
01661                 else
01662                 {
01663 //                  TRACEUSER("Gerry", _T("Skipping stderr:%s"), line.c_str());
01664 //                  m_Errors.Add(line);
01665                 }
01666             }
01667         }
01668     }
01669 }

BOOL PluginFilterProcess::ReportError  ) 
 

Definition at line 1672 of file xpoilflt.cpp.

01673 {
01674     TRACEUSER("Gerry", _T("PluginFilterProcess::ReportError"));
01675 
01676     // Get the first entry from m_ErrorList and pass it to Error::SetError
01677     if (m_Errors.GetCount() > 0)
01678     {
01679         Error::SetError(0, m_Errors[0].c_str(), 0);
01680     }
01681     else
01682     {
01683         ERROR1(FALSE, _R(IDS_XPF_NO_ERROR_SET));
01684     }
01685 
01686     return(FALSE);
01687 }

void PluginFilterProcess::ReportWarning  ) 
 

Definition at line 1690 of file xpoilflt.cpp.

01691 {
01692     TRACEUSER("Gerry", _T("PluginFilterProcess::ReportWarning"));
01693 
01694     // Show the user the contents of m_WarningList
01695     for (size_t i = 0; i < m_Warnings.GetCount(); i++)
01696     {
01697         TRACEUSER("Gerry", _T("WARNING:%s"), m_Warnings[i].c_str());
01698     }
01699 }


Member Data Documentation

wxArrayString PluginFilterProcess::m_Errors [protected]
 

Definition at line 125 of file xpoilflt.h.

PluginNativeFilter* PluginFilterProcess::m_pFilter [protected]
 

Definition at line 124 of file xpoilflt.h.

wxArrayString PluginFilterProcess::m_Warnings [protected]
 

Definition at line 126 of file xpoilflt.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:59:45 2007 for Camelot by  doxygen 1.4.4