- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
- // RecordProcess.cpp: implementation of the RecordProcess class.
- //
- //////////////////////////////////////////////////////////////////////
- #include "stdafx.h"
- #include "RecordProcess.h"
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- RecordProcess::RecordProcess()
- {
- }
- RecordProcess::~RecordProcess()
- {
- }
- void RecordProcess::AddProcessFunction(ItermProcess * Function)
- {
- if(FindFunction(Function->GetType()) == m_FunctionSet.end())
- {
- m_FunctionSet.push_back(Function);
- }
- }
- ItermProcessSet::iterator RecordProcess::FindFunction(const string &Type)
- {
- ItermProcessSet::iterator Pointer;
- /* for(Pointer = m_FunctionSet.begin();Pointer!=m_FunctionSet.end();Pointer++)
- {
- if((* Pointer)->GetType() == Type)
- {
- return Pointer;
- }
- }
- */
- Pointer = find_if(m_FunctionSet.begin(),m_FunctionSet.end(),ItermProcessTypeCheck(Type));
- return Pointer;
- }
- void RecordProcess::RemoveProcess(const string &Type)
- {
- ItermProcessSet::iterator Position = FindFunction(Type);
- if(Position != m_FunctionSet.end())
- {
- m_FunctionSet.erase(Position);
- }
- }
- void RecordProcess::Reset()
- {
- ItermProcessSet::iterator Pointer;
- for(Pointer = m_FunctionSet.begin();Pointer!=m_FunctionSet.end();Pointer++)
- {
- (*Pointer)->Reset();
- }
- }
- void RecordProcess::AnalyseRecordStream(istream &RecordStream)
- {
- while(!RecordStream.eof())
- {
- AnalyseARecord(RecordStream);
- }
- }
- void RecordProcess::AnalyseARecord(istream &RecordStream)
- {
- string Title;
- GetALineFromStream(Title,RecordStream);
- ItermProcessSet::iterator Pointer;
- for(Pointer = m_FunctionSet.begin();Pointer!=m_FunctionSet.end();Pointer++)
- {
- if((* Pointer)->ProcessIterm(Title,RecordStream))
- {
- break;
- }
- }
- }