Interface class for a configuration file. More...
#include <interface.h>
Public Member Functions | |
virtual | ~Interface () |
Destroy the interface. | |
virtual void | open (const MOCKPP_STL::string &name)=0 |
Opens the file. | |
virtual MOCKPP_STL::string | read ()=0 |
Reads one record from the file. | |
virtual void | write (const MOCKPP_STL::string &s)=0 |
Writes a record to the file. | |
virtual unsigned | calculate (unsigned input)=0 |
Does some calculating. | |
virtual void | close ()=0 |
Closes the file. |
Interface class for a configuration file.
Each record consists of one line of ascii characters. Each file contains exactly three lines. Processed lines are written back with "/processed" appended.
Definition at line 41 of file interface.h.
virtual Interface::~Interface | ( | ) | [inline, virtual] |
Destroy the interface.
Definition at line 47 of file interface.h.
virtual unsigned Interface::calculate | ( | unsigned | input | ) | [pure virtual] |
Does some calculating.
input | ingoing data |
Implemented in BasicMock, ChainMock, PoorMockSecondEdition, PoorMock, and VisitMock.
Referenced by Consumer::process().
virtual void Interface::close | ( | ) | [pure virtual] |
Closes the file.
Implemented in BasicMock, ChainMock, PoorMockSecondEdition, PoorMock, and VisitMock.
Referenced by Consumer::load(), and Consumer::save().
virtual void Interface::open | ( | const MOCKPP_STL::string & | name | ) | [pure virtual] |
Opens the file.
name | name of file to open |
Implemented in BasicMock, ChainMock, PoorMockSecondEdition, PoorMock, and VisitMock.
Referenced by Consumer::load(), and Consumer::save().
virtual MOCKPP_STL::string Interface::read | ( | ) | [pure virtual] |
Reads one record from the file.
Implemented in BasicMock, ChainMock, PoorMockSecondEdition, PoorMock, and VisitMock.
Referenced by Consumer::load().
virtual void Interface::write | ( | const MOCKPP_STL::string & | s | ) | [pure virtual] |
Writes a record to the file.
s | the record (one complete line) |
Implemented in BasicMock, ChainMock, PoorMockSecondEdition, PoorMock, and VisitMock.
Referenced by Consumer::save().