The parameterized base class for module options. More...
#include <ogdf/basic/ModuleOption.h>
Public Member Functions | |
| ModuleOption () | |
| Initializes a module option; the initial module is just a 0-pointer. | |
| ~ModuleOption () | |
| M & | get () |
| Returns a reference to the stored module. | |
| void | set (M *pM) |
| Sets the module to pM. | |
| bool | valid () const |
| Returns true iff the option currently stores a module. | |
Private Attributes | |
| M * | m_pModule |
| Pointer to the module. | |
The parameterized base class for module options.
M is type (base class) of corresponding module. Notice that module instances passed to set() must be allocated with new and will be freed by ModuleOption.
Definition at line 65 of file ModuleOption.h.
|
inline |
Initializes a module option; the initial module is just a 0-pointer.
Definition at line 71 of file ModuleOption.h.
|
inline |
Definition at line 74 of file ModuleOption.h.
|
inline |
Returns a reference to the stored module.
It is required that the option currently stores a module, i.e., valid() is true.
Definition at line 93 of file ModuleOption.h.
|
inline |
Sets the module to pM.
This function will also free the module currently stored by the option.
Definition at line 80 of file ModuleOption.h.
|
inline |
Returns true iff the option currently stores a module.
Definition at line 86 of file ModuleOption.h.
|
private |
Pointer to the module.
Definition at line 67 of file ModuleOption.h.