OpenWalnut  1.5.0dev
Public Member Functions | Static Public Member Functions | Static Protected Attributes | Private Attributes | List of all members
WColoredVertices Class Reference

Represents a std::map where for each vertex ID a color is stored. More...

#include <WColoredVertices.h>

+ Inheritance diagram for WColoredVertices:
+ Collaboration diagram for WColoredVertices:

Public Member Functions

 WColoredVertices ()
 Default constructor. More...
 
 WColoredVertices (const std::map< size_t, WColor > &data)
 Initialize this with the given map. More...
 
virtual ~WColoredVertices ()
 Cleans up this instance. More...
 
virtual const std::string getName () const
 Gets the name of this prototype. More...
 
virtual const std::string getDescription () const
 Gets the description for this prototype. More...
 
const std::map< size_t, WColor > & getData () const
 Reference to the data. More...
 
void setData (const std::map< size_t, WColor > &data)
 Replace (copies) the internal data with the given one. More...
 
- Public Member Functions inherited from WTransferable
 WTransferable ()
 Default constructor. More...
 
virtual ~WTransferable ()
 Destructor. More...
 
- Public Member Functions inherited from WPrototyped
 WPrototyped ()
 Default constructor. More...
 
virtual ~WPrototyped ()
 Destructor. More...
 
template<typename T >
bool isA ()
 Checks whether the actual prototype has the specified runtime type. More...
 

Static Public Member Functions

static std::shared_ptr< WPrototypedgetPrototype ()
 Returns a prototype instantiated with the true type of the deriving class. More...
 

Static Protected Attributes

static std::shared_ptr< WPrototypedm_prototype = std::shared_ptr< WPrototyped >()
 The prototype as singleton. More...
 

Private Attributes

std::map< size_t, WColor > m_data
 stores the vertex ids and colors More...
 

Detailed Description

Represents a std::map where for each vertex ID a color is stored.

Definition at line 40 of file WColoredVertices.h.

Constructor & Destructor Documentation

◆ WColoredVertices() [1/2]

WColoredVertices::WColoredVertices ( )

Default constructor.

Definition at line 43 of file WColoredVertices.cpp.

Referenced by getPrototype().

+ Here is the caller graph for this function:

◆ WColoredVertices() [2/2]

WColoredVertices::WColoredVertices ( const std::map< size_t, WColor > &  data)
explicit

Initialize this with the given map.

Parameters
dataThe map

Definition at line 47 of file WColoredVertices.cpp.

◆ ~WColoredVertices()

WColoredVertices::~WColoredVertices ( )
virtual

Cleans up this instance.

Definition at line 52 of file WColoredVertices.cpp.

Member Function Documentation

◆ getData()

const std::map< size_t, WColor > & WColoredVertices::getData ( ) const
inline

Reference to the data.

Returns
Reference to the map of ids and colors.

Definition at line 112 of file WColoredVertices.h.

References m_data.

Referenced by wge::convertToOsgGeometry().

+ Here is the caller graph for this function:

◆ getDescription()

const std::string WColoredVertices::getDescription ( ) const
inlinevirtual

Gets the description for this prototype.

Returns
the description

Implements WPrototyped.

Definition at line 107 of file WColoredVertices.h.

◆ getName()

const std::string WColoredVertices::getName ( ) const
inlinevirtual

Gets the name of this prototype.

Returns
the name.

Implements WPrototyped.

Definition at line 102 of file WColoredVertices.h.

◆ getPrototype()

std::shared_ptr< WPrototyped > WColoredVertices::getPrototype ( )
static

Returns a prototype instantiated with the true type of the deriving class.

Returns
the prototype.

Definition at line 34 of file WColoredVertices.cpp.

References m_prototype, and WColoredVertices().

+ Here is the call graph for this function:

◆ setData()

void WColoredVertices::setData ( const std::map< size_t, WColor > &  data)
inline

Replace (copies) the internal data with the given one.

Parameters
dataThe ID-Color map

Definition at line 117 of file WColoredVertices.h.

References m_data.

Member Data Documentation

◆ m_data

std::map< size_t, WColor > WColoredVertices::m_data
private

stores the vertex ids and colors

Definition at line 99 of file WColoredVertices.h.

Referenced by getData(), and setData().

◆ m_prototype

std::shared_ptr< WPrototyped > WColoredVertices::m_prototype = std::shared_ptr< WPrototyped >()
staticprotected

The prototype as singleton.

Definition at line 96 of file WColoredVertices.h.

Referenced by getPrototype().


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