TwiceAsNice  2019-02-18
Public Member Functions | Private Member Functions | Private Attributes | List of all members
basda::gentec::SerialLineFake Class Reference

This class fakes a SerialLine. More...

#include <SerialLineFake.hpp>

Inheritance diagram for basda::gentec::SerialLineFake:
Inheritance graph
Collaboration diagram for basda::gentec::SerialLineFake:
Collaboration graph

Public Member Functions

 SerialLineFake ()
 
virtual unsigned write (const std::string &message)
 
void mimicSuccessfullMessageTransmission ()
 
void setResult_write (unsigned result)
 
std::string getLatestArgument_write ()
 
unsigned getInvocationCount_write ()
 
virtual std::string readLine ()
 
unsigned getInvocationCount_readLine ()
 
void pushResult_readLine (const std::string &line)
 
void throwExceptionWheneverReadingLine ()
 
void throwExceptionWheneverWriting ()
 
 SerialLineFake ()
 
virtual unsigned write (const std::string &message)
 
void mimicSuccessfullMessageTransmission ()
 
void setResult_write (unsigned result)
 
std::string getLatestArgument_write ()
 
unsigned getInvocationCount_write ()
 
virtual std::string readLine ()
 
unsigned getInvocationCount_readLine ()
 
void pushResult_readLine (const std::string &line)
 
void throwExceptionWheneverReadingLine ()
 
void throwExceptionWheneverWriting ()
 
- Public Member Functions inherited from basda::gentec::SerialLine
virtual ~SerialLine ()
 
virtual ~SerialLine ()
 

Private Member Functions

void throwExceptionIfRequested ()
 
void throwExceptionIfRequested ()
 

Private Attributes

unsigned invocationCount_write_
 
unsigned invocationCount_readLine_
 
unsigned result_write_
 
bool messageTransmissionSuccessfull_
 
std::queue< std::string > lines_
 
std::string latestArgument_write_
 
bool throwExceptionRequested_readLine_
 
bool throwExceptionRequested_write_
 

Detailed Description

This class fakes a SerialLine.

Constructor & Destructor Documentation

◆ SerialLineFake() [1/2]

basda::gentec::SerialLineFake::SerialLineFake ( )
inline

◆ SerialLineFake() [2/2]

basda::gentec::SerialLineFake::SerialLineFake ( )
inline

Member Function Documentation

◆ getInvocationCount_readLine() [1/2]

unsigned basda::gentec::SerialLineFake::getInvocationCount_readLine ( )
inline

◆ getInvocationCount_readLine() [2/2]

unsigned basda::gentec::SerialLineFake::getInvocationCount_readLine ( )
inline

◆ getInvocationCount_write() [1/2]

unsigned basda::gentec::SerialLineFake::getInvocationCount_write ( )
inline

◆ getInvocationCount_write() [2/2]

unsigned basda::gentec::SerialLineFake::getInvocationCount_write ( )
inline

◆ getLatestArgument_write() [1/2]

std::string basda::gentec::SerialLineFake::getLatestArgument_write ( )
inline

◆ getLatestArgument_write() [2/2]

std::string basda::gentec::SerialLineFake::getLatestArgument_write ( )
inline

◆ mimicSuccessfullMessageTransmission() [1/2]

void basda::gentec::SerialLineFake::mimicSuccessfullMessageTransmission ( )
inline

◆ mimicSuccessfullMessageTransmission() [2/2]

void basda::gentec::SerialLineFake::mimicSuccessfullMessageTransmission ( )
inline

◆ pushResult_readLine() [1/2]

void basda::gentec::SerialLineFake::pushResult_readLine ( const std::string &  line)
inline

◆ pushResult_readLine() [2/2]

void basda::gentec::SerialLineFake::pushResult_readLine ( const std::string &  line)
inline

◆ readLine() [1/2]

virtual std::string basda::gentec::SerialLineFake::readLine ( )
inlinevirtual
Note
overridden

Implements basda::gentec::SerialLine.

◆ readLine() [2/2]

virtual std::string basda::gentec::SerialLineFake::readLine ( )
inlinevirtual
Note
overridden

Implements basda::gentec::SerialLine.

◆ setResult_write() [1/2]

void basda::gentec::SerialLineFake::setResult_write ( unsigned  result)
inline

◆ setResult_write() [2/2]

void basda::gentec::SerialLineFake::setResult_write ( unsigned  result)
inline

◆ throwExceptionIfRequested() [1/2]

void basda::gentec::SerialLineFake::throwExceptionIfRequested ( )
inlineprivate

◆ throwExceptionIfRequested() [2/2]

void basda::gentec::SerialLineFake::throwExceptionIfRequested ( )
inlineprivate

◆ throwExceptionWheneverReadingLine() [1/2]

void basda::gentec::SerialLineFake::throwExceptionWheneverReadingLine ( )
inline

◆ throwExceptionWheneverReadingLine() [2/2]

void basda::gentec::SerialLineFake::throwExceptionWheneverReadingLine ( )
inline

◆ throwExceptionWheneverWriting() [1/2]

void basda::gentec::SerialLineFake::throwExceptionWheneverWriting ( )
inline

◆ throwExceptionWheneverWriting() [2/2]

void basda::gentec::SerialLineFake::throwExceptionWheneverWriting ( )
inline

◆ write() [1/2]

virtual unsigned basda::gentec::SerialLineFake::write ( const std::string &  message)
inlinevirtual
Note
overridden

Implements basda::gentec::SerialLine.

◆ write() [2/2]

virtual unsigned basda::gentec::SerialLineFake::write ( const std::string &  message)
inlinevirtual
Note
overridden

Implements basda::gentec::SerialLine.

Member Data Documentation

◆ invocationCount_readLine_

unsigned basda::gentec::SerialLineFake::invocationCount_readLine_
private

◆ invocationCount_write_

unsigned basda::gentec::SerialLineFake::invocationCount_write_
private

◆ latestArgument_write_

std::string basda::gentec::SerialLineFake::latestArgument_write_
private

◆ lines_

std::queue< std::string > basda::gentec::SerialLineFake::lines_
private

◆ messageTransmissionSuccessfull_

bool basda::gentec::SerialLineFake::messageTransmissionSuccessfull_
private

◆ result_write_

unsigned basda::gentec::SerialLineFake::result_write_
private

◆ throwExceptionRequested_readLine_

bool basda::gentec::SerialLineFake::throwExceptionRequested_readLine_
private

◆ throwExceptionRequested_write_

bool basda::gentec::SerialLineFake::throwExceptionRequested_write_
private

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