Open
Graph Drawing
Framework

 v.2010.10
 

Public Member Functions | Private Attributes

ogdf::ModuleOption< M > Class Template Reference

The parameterized base class for module options. More...

#include <ogdf/basic/ModuleOption.h>

List of all members.

Public Member Functions

 ModuleOption ()
 Initializes a module option; the initial module is just a 0-pointer.
 ~ModuleOption ()
void set (M *pM)
 Sets the module to pM.
bool valid () const
 Returns true iff the option currently stores a module.
M & get ()
 Returns a reference to the stored module.

Private Attributes

M * m_pModule
 Pointer to the module.

Detailed Description

template<class M>
class ogdf::ModuleOption< M >

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 74 of file ModuleOption.h.


Constructor & Destructor Documentation

template<class M>
ogdf::ModuleOption< M >::ModuleOption (  )  [inline]

Initializes a module option; the initial module is just a 0-pointer.

Definition at line 80 of file ModuleOption.h.

template<class M>
ogdf::ModuleOption< M >::~ModuleOption (  )  [inline]

Definition at line 83 of file ModuleOption.h.


Member Function Documentation

template<class M>
M& ogdf::ModuleOption< M >::get (  )  [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 102 of file ModuleOption.h.

template<class M>
void ogdf::ModuleOption< M >::set ( M *  pM  )  [inline]

Sets the module to pM.

This function will also free the module currently stored by the option.

Definition at line 89 of file ModuleOption.h.

template<class M>
bool ogdf::ModuleOption< M >::valid (  )  const [inline]

Returns true iff the option currently stores a module.

Definition at line 95 of file ModuleOption.h.


Member Data Documentation

template<class M>
M* ogdf::ModuleOption< M >::m_pModule [private]

Pointer to the module.

Definition at line 76 of file ModuleOption.h.


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