OpenWalnut  1.5.0dev
Public Member Functions | Private Attributes | List of all members
WPrototypeRequirement Class Reference

This requirement ensures that the specified prototype exists in the factory. More...

#include <WPrototypeRequirement.h>

+ Inheritance diagram for WPrototypeRequirement:
+ Collaboration diagram for WPrototypeRequirement:

Public Member Functions

 WPrototypeRequirement (std::string prototype)
 Create instance. More...
 
virtual ~WPrototypeRequirement ()
 Destructor. More...
 
virtual bool isComplied () const
 Checks if the requirement is fulfilled on the system. More...
 
virtual std::string getDescription () const
 Return a nice description of the requirement. More...
 
- Public Member Functions inherited from WRequirement
 WRequirement ()
 Default constructor. More...
 
virtual ~WRequirement ()
 Destructor. More...
 

Private Attributes

std::string m_prototype
 The required prototype. More...
 

Detailed Description

This requirement ensures that the specified prototype exists in the factory.

These requirements are especially useful for container modules. It also checks the requirements of the specified prototype.

Definition at line 36 of file WPrototypeRequirement.h.

Constructor & Destructor Documentation

◆ WPrototypeRequirement()

WPrototypeRequirement::WPrototypeRequirement ( std::string  prototype)
explicit

Create instance.

If your module uses this requirement, it needs the specified module.

Parameters
prototypethe module needed.

Definition at line 31 of file WPrototypeRequirement.cpp.

◆ ~WPrototypeRequirement()

WPrototypeRequirement::~WPrototypeRequirement ( )
virtual

Destructor.

Definition at line 38 of file WPrototypeRequirement.cpp.

Member Function Documentation

◆ getDescription()

std::string WPrototypeRequirement::getDescription ( ) const
virtual

Return a nice description of the requirement.

Returns
the description.

Implements WRequirement.

Definition at line 54 of file WPrototypeRequirement.cpp.

References m_prototype.

◆ isComplied()

bool WPrototypeRequirement::isComplied ( ) const
virtual

Checks if the requirement is fulfilled on the system.

Implement this for your specific case.

Returns
true if the specific requirement is fulfilled.

Implements WRequirement.

Definition at line 43 of file WPrototypeRequirement.cpp.

References WModuleFactory::getModuleFactory(), and m_prototype.

+ Here is the call graph for this function:

Member Data Documentation

◆ m_prototype

std::string WPrototypeRequirement::m_prototype
private

The required prototype.

Definition at line 70 of file WPrototypeRequirement.h.

Referenced by getDescription(), and isComplied().


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