Base class for a test implementation of the BSLS_PROTOCOL protocol.
Synopsis
Declared in <bsls_protocoltest.h>
template<class BSLS_PROTOCOL>
class ProtocolTestImp
: public BSLS_PROTOCOL
Description
This mechanism class template is a base class for a test implementation of a protocol class defined by the BSLS_PROTOCOL template parameter. Its purpose is to reduce the boilerplate test code required to verify that derived virtual methods are called. It provides markDone member functions one of which should be called from each method of the protocol class test implementation to indicate that the virtual method is correctly overridden. It also overloads operator‐> to serve as a proxy to BSLS_PROTOCOL and detect when BSLS_PROTOCOL methods are called.
Base Classes
Name |
Description |
|
Type Aliases
Name |
Description |
Protocol type under test by this implementation. |
Member Functions
Name |
Description |
|
Create an object of the |
|
Destroy this object and check the status of the test execution (success or failure). On test failure, report it to |
Return a proxy object convertible to any value or pointer type. |
|
Return a proxy object convertible to any reference type. |
|
Return the specified |
|
Mark this object as entered for the purpose of calling a protocol method. |
|
Dereference this object as if it were a pointer to |
|
Dereference this object as if it were a |
|
Connect this protocol test object with the specified |
Created with MrDocs