OpenWalnut  1.5.0dev
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
WObjectNDIP< T > Class Template Reference

This is a base class for everything which has a Name,Description,Icon and Properties (=NDIP). More...

#include <WObjectNDIP.h>

+ Inheritance diagram for WObjectNDIP< T >:
+ Collaboration diagram for WObjectNDIP< T >:

Public Types

typedef std::shared_ptr< WObjectNDIPSPtr
 Shared ptr to an instance. More...
 
typedef std::shared_ptr< const WObjectNDIPConstSPtr
 Shared ptr to a const instance. More...
 

Public Member Functions

virtual ~WObjectNDIP ()
 Destructor. More...
 
virtual std::string getName () const
 The name of the object. More...
 
virtual std::string getDescription () const
 The description of this object. More...
 
virtual const char ** getIcon () const
 The icon of this object. More...
 
virtual WProperties::SPtr getProperties ()
 Return the property group of this object. More...
 

Protected Member Functions

 WObjectNDIP (std::string name, std::string description, const char **icon=NULL)
 Construct a NDIP'ed object. More...
 

Protected Attributes

WProperties::SPtr m_properties
 the properties of the object. More...
 

Private Attributes

std::string m_name
 the name More...
 
std::string m_description
 the description More...
 
const char ** m_icon
 the icon More...
 

Detailed Description

template<typename T>
class WObjectNDIP< T >

This is a base class for everything which has a Name,Description,Icon and Properties (=NDIP).

Just derive from this class and you get the NDIP stuff for free. Managed for you.

Note
This is a useful base class for strategies in WModule and with WStrategyHelper.

Definition at line 41 of file WObjectNDIP.h.

Member Typedef Documentation

◆ ConstSPtr

template<typename T >
typedef std::shared_ptr< const WObjectNDIP > WObjectNDIP< T >::ConstSPtr

Shared ptr to a const instance.

Definition at line 52 of file WObjectNDIP.h.

◆ SPtr

template<typename T >
typedef std::shared_ptr< WObjectNDIP > WObjectNDIP< T >::SPtr

Shared ptr to an instance.

Definition at line 47 of file WObjectNDIP.h.

Constructor & Destructor Documentation

◆ ~WObjectNDIP()

template<typename T >
WObjectNDIP< T >::~WObjectNDIP
virtual

Destructor.

Implement if you have non trivial cleanup stuff.

Definition at line 118 of file WObjectNDIP.h.

◆ WObjectNDIP()

template<typename T >
WObjectNDIP< T >::WObjectNDIP ( std::string  name,
std::string  description,
const char **  icon = NULL 
)
protected

Construct a NDIP'ed object.

Parameters
namethe name
descriptionthe description
iconan icon in XPM format. Can be NULL if no icon is required.

Definition at line 108 of file WObjectNDIP.h.

Member Function Documentation

◆ getDescription()

template<typename T >
std::string WObjectNDIP< T >::getDescription
virtual

The description of this object.

Returns
description text.

Definition at line 130 of file WObjectNDIP.h.

◆ getIcon()

template<typename T >
const char ** WObjectNDIP< T >::getIcon
virtual

The icon of this object.

Returns
the icon in XPM format. Can be NULL.

Definition at line 136 of file WObjectNDIP.h.

◆ getName()

template<typename T >
std::string WObjectNDIP< T >::getName
virtual

The name of the object.

Returns
the name

Definition at line 124 of file WObjectNDIP.h.

◆ getProperties()

template<typename T >
WProperties::SPtr WObjectNDIP< T >::getProperties
virtual

Return the property group of this object.

Note
the method is non-const to allow returning the properties as non-const
Returns
the properties.

Definition at line 142 of file WObjectNDIP.h.

Member Data Documentation

◆ m_description

template<typename T >
std::string WObjectNDIP< T >::m_description
private

the description

Definition at line 103 of file WObjectNDIP.h.

◆ m_icon

template<typename T >
const char** WObjectNDIP< T >::m_icon
private

the icon

Definition at line 104 of file WObjectNDIP.h.

◆ m_name

template<typename T >
std::string WObjectNDIP< T >::m_name
private

the name

Definition at line 102 of file WObjectNDIP.h.

◆ m_properties

template<typename T >
WProperties::SPtr WObjectNDIP< T >::m_properties
protected

the properties of the object.

Definition at line 99 of file WObjectNDIP.h.


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