Medial Code Documentation
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | Friends
dmlc::data::ParserImpl< IndexType, DType > Class Template Referenceabstract

base class for parser to parse data More...

#include <parser.h>

Inheritance diagram for dmlc::data::ParserImpl< IndexType, DType >:
dmlc::Parser< IndexType, DType > dmlc::DataIter< DType > dmlc::data::TextParserBase< IndexType, real_t > dmlc::data::ParquetParser< IndexType, DType > dmlc::data::TextParserBase< IndexType, DType > dmlc::data::CSVParser< IndexType, real_t > dmlc::data::LibFMParser< IndexType, real_t > dmlc::data::LibSVMParser< IndexType, real_t > dmlc::data::CSVParser< IndexType, DType > dmlc::data::LibFMParser< IndexType, DType > dmlc::data::LibSVMParser< IndexType, DType > parser_test::CSVParserTest< IndexType, DType > parser_test::LibFMParserTest< IndexType, DType > parser_test::LibSVMParserTest< IndexType, DType >

Public Member Functions

virtual bool Next (void)
 implement next
 
virtual const RowBlock< IndexType, DType > & Value (void) const
 get current data
 
virtual size_t BytesRead (void) const =0
 
- Public Member Functions inherited from dmlc::Parser< IndexType, DType >
Parser< uint32_t, real_t > * Create (const char *uri_, unsigned part_index, unsigned num_parts, const char *type)
 
Parser< uint64_t, real_t > * Create (const char *uri_, unsigned part_index, unsigned num_parts, const char *type)
 
Parser< uint32_t, int32_t > * Create (const char *uri_, unsigned part_index, unsigned num_parts, const char *type)
 
Parser< uint64_t, int32_t > * Create (const char *uri_, unsigned part_index, unsigned num_parts, const char *type)
 
Parser< uint32_t, int64_t > * Create (const char *uri_, unsigned part_index, unsigned num_parts, const char *type)
 
Parser< uint64_t, int64_t > * Create (const char *uri_, unsigned part_index, unsigned num_parts, const char *type)
 
- Public Member Functions inherited from dmlc::DataIter< DType >
virtual ~DataIter (void) DMLC_THROW_EXCEPTION
 destructor
 
virtual void BeforeFirst (void)=0
 set before first of the item
 

Protected Member Functions

virtual bool ParseNext (std::vector< RowBlockContainer< IndexType, DType > > *data)=0
 read in next several blocks of data
 

Protected Attributes

IndexType data_ptr_
 pointer to begin and end of data
 
IndexType data_end_
 
std::vector< RowBlockContainer< IndexType, DType > > data_
 internal data
 
RowBlock< IndexType, DType > block_
 internal row block
 

Friends

class ThreadedParser< IndexType, DType >
 

Additional Inherited Members

- Public Types inherited from dmlc::Parser< IndexType, DType >
typedef Parser< IndexType, DType > *(* Factory) (const std::string &path, const std::map< std::string, std::string > &args, unsigned part_index, unsigned num_parts)
 Factory type of the parser.
 
- Static Public Member Functions inherited from dmlc::Parser< IndexType, DType >
static Parser< IndexType, DType > * Create (const char *uri_, unsigned part_index, unsigned num_parts, const char *type)
 create a new instance of parser based on the "type"
 

Detailed Description

template<typename IndexType, typename DType = real_t>
class dmlc::data::ParserImpl< IndexType, DType >

base class for parser to parse data

Member Function Documentation

◆ BytesRead()

template<typename IndexType , typename DType = real_t>
virtual size_t dmlc::data::ParserImpl< IndexType, DType >::BytesRead ( void  ) const
pure virtual

◆ Next()

template<typename IndexType , typename DType = real_t>
virtual bool dmlc::data::ParserImpl< IndexType, DType >::Next ( void  )
inlinevirtual

implement next

Implements dmlc::DataIter< DType >.

◆ ParseNext()

template<typename IndexType , typename DType = real_t>
virtual bool dmlc::data::ParserImpl< IndexType, DType >::ParseNext ( std::vector< RowBlockContainer< IndexType, DType > > *  data)
protectedpure virtual

read in next several blocks of data

Parameters
datavector of data to be returned
Returns
true if the data is loaded, false if reach end

Implemented in dmlc::data::ParquetParser< IndexType, DType >, and dmlc::data::TextParserBase< IndexType, DType >.

◆ Value()

template<typename IndexType , typename DType = real_t>
virtual const RowBlock< IndexType, DType > & dmlc::data::ParserImpl< IndexType, DType >::Value ( void  ) const
inlinevirtual

get current data

Implements dmlc::DataIter< DType >.


The documentation for this class was generated from the following file: