Apollo  6.0
Open source self driving car software
Public Member Functions | Protected Attributes | List of all members
apollo::cyber::record::RecordBase Class Referenceabstract

Base class for record reader and writer. More...

#include <record_base.h>

Inheritance diagram for apollo::cyber::record::RecordBase:
Inheritance graph
Collaboration diagram for apollo::cyber::record::RecordBase:
Collaboration graph

Public Member Functions

virtual ~RecordBase ()=default
 Destructor. More...
 
virtual uint64_t GetMessageNumber (const std::string &channel_name) const =0
 Get message number by channel name. More...
 
virtual const std::string & GetMessageType (const std::string &channel_name) const =0
 Get message type by channel name. More...
 
virtual const std::string & GetProtoDesc (const std::string &channel_name) const =0
 Get proto descriptor string by channel name. More...
 
virtual std::set< std::string > GetChannelList () const =0
 Get channel list. More...
 
const proto::Header & GetHeader () const
 Get record header. More...
 
const std::string GetFile () const
 Get record file path. More...
 

Protected Attributes

std::string file_
 
proto::Header header_
 
bool is_opened_ = false
 

Detailed Description

Base class for record reader and writer.

Constructor & Destructor Documentation

◆ ~RecordBase()

virtual apollo::cyber::record::RecordBase::~RecordBase ( )
virtualdefault

Destructor.

Member Function Documentation

◆ GetChannelList()

virtual std::set<std::string> apollo::cyber::record::RecordBase::GetChannelList ( ) const
pure virtual

Get channel list.

Returns
List container with all channel name string.

Implemented in apollo::cyber::record::RecordWriter, and apollo::cyber::record::RecordReader.

◆ GetFile()

const std::string apollo::cyber::record::RecordBase::GetFile ( ) const
inline

Get record file path.

Returns
Record file path.

◆ GetHeader()

const proto::Header& apollo::cyber::record::RecordBase::GetHeader ( ) const
inline

Get record header.

Returns
Record header.

◆ GetMessageNumber()

virtual uint64_t apollo::cyber::record::RecordBase::GetMessageNumber ( const std::string &  channel_name) const
pure virtual

Get message number by channel name.

Parameters
channel_name
Returns
Message number.

Implemented in apollo::cyber::record::RecordWriter, and apollo::cyber::record::RecordReader.

◆ GetMessageType()

virtual const std::string& apollo::cyber::record::RecordBase::GetMessageType ( const std::string &  channel_name) const
pure virtual

Get message type by channel name.

Parameters
channel_name
Returns
Message type.

Implemented in apollo::cyber::record::RecordWriter, and apollo::cyber::record::RecordReader.

◆ GetProtoDesc()

virtual const std::string& apollo::cyber::record::RecordBase::GetProtoDesc ( const std::string &  channel_name) const
pure virtual

Get proto descriptor string by channel name.

Parameters
channel_name
Returns
Proto descriptor string by channel name.

Implemented in apollo::cyber::record::RecordWriter, and apollo::cyber::record::RecordReader.

Member Data Documentation

◆ file_

std::string apollo::cyber::record::RecordBase::file_
protected

◆ header_

proto::Header apollo::cyber::record::RecordBase::header_
protected

◆ is_opened_

bool apollo::cyber::record::RecordBase::is_opened_ = false
protected

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