OpenWalnut  1.4.0
Public Member Functions | Static Public Member Functions | Static Protected Attributes | Private Attributes
WColoredVertices Class Reference

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

#include <WColoredVertices.h>

+ Inheritance diagram for WColoredVertices:

List of all members.

Public Member Functions

 WColoredVertices ()
 Default constructor.
 WColoredVertices (const std::map< size_t, WColor > &data)
 Initialize this with the given map.
virtual ~WColoredVertices ()
 Cleans up this instance.
virtual const std::string getName () const
 Gets the name of this prototype.
virtual const std::string getDescription () const
 Gets the description for this prototype.
const std::map< size_t, WColor > & getData () const
 Reference to the data.
void setData (const std::map< size_t, WColor > &data)
 Replace (copies) the internal data with the given one.

Static Public Member Functions

static boost::shared_ptr
< WPrototyped
getPrototype ()
 Returns a prototype instantiated with the true type of the deriving class.

Static Protected Attributes

static boost::shared_ptr
< WPrototyped
m_prototype = boost::shared_ptr< WPrototyped >()
 The prototype as singleton.

Private Attributes

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

Detailed Description

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

Definition at line 39 of file WColoredVertices.h.


Constructor & Destructor Documentation

Default constructor.

Definition at line 43 of file WColoredVertices.cpp.

Referenced by getPrototype().

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.

Cleans up this instance.

Definition at line 52 of file WColoredVertices.cpp.


Member Function Documentation

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 111 of file WColoredVertices.h.

References m_data.

Referenced by wge::convertToOsgGeometry().

const std::string WColoredVertices::getDescription ( ) const [inline, virtual]

Gets the description for this prototype.

Returns:
the description

Implements WPrototyped.

Definition at line 106 of file WColoredVertices.h.

const std::string WColoredVertices::getName ( ) const [inline, virtual]

Gets the name of this prototype.

Returns:
the name.

Implements WPrototyped.

Definition at line 101 of file WColoredVertices.h.

boost::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().

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 116 of file WColoredVertices.h.

References m_data.


Member Data Documentation

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

stores the vertex ids and colors

Definition at line 98 of file WColoredVertices.h.

Referenced by getData(), and setData().

boost::shared_ptr< WPrototyped > WColoredVertices::m_prototype = boost::shared_ptr< WPrototyped >() [static, protected]

The prototype as singleton.

Definition at line 95 of file WColoredVertices.h.

Referenced by getPrototype().


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