You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
# pragma once
# include "stdafx.h"
# include "NativeStream.h"
# include "StreamingTsvParser.h"
# include "TableDataImporter.h"
# include <map>
# include <memory>
# include <vector>
/**
* @brief 真流式 TSV 流: Write 时边解析边导入,只保留未完成行尾块
*/
class StreamingTsvStream : public INativeStream
{
public :
StreamingTsvStream ( CSigmaView * pView , int importType ) ;
void Write ( const void * data , size_t size ) override ;
void Complete ( ) override ;
private :
void OnParsedLine ( int lineIndex , const std : : vector < std : : string > & fields ) ;
std : : vector < CString > FieldsToCString ( const std : : vector < std : : string > & fields ) ;
StreamingTsvParser m_parser ;
CSigmaView * m_pView = nullptr ;
int m_importType = 0 ;
std : : map < CString , int > m_columnIndexMap ;
std : : unique_ptr < CurveStreamImporter > m_curveImporter ;
bool m_headersReady = false ;
} ;