OpenWalnut  1.2.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Protected Attributes | Private Attributes
WGrid Class Reference

Base class to all grid types, e.g. More...

#include <WGrid.h>

+ Inheritance diagram for WGrid:

List of all members.

Public Member Functions

 WGrid (size_t size)
 Constructs a new WGrid instance.
virtual ~WGrid ()
 Since WGrid is a base class and thus should be polymorphic we add virtual destructor.
size_t size () const
 The number of positions in this grid.
virtual WBoundingBox getBoundingBox () const =0
 Axis aligned Bounding Box that encloses this grid.
boost::shared_ptr< WPropertiesgetInformationProperties () const
 Returns a pointer to the information properties object of the grid.

Protected Attributes

boost::shared_ptr< WPropertiesm_infoProperties
 The property object for the grid containing only props whose purpose is "PV_PURPOSE_INFORMNATION".

Private Attributes

size_t m_size
 Stores the number of positions.

Detailed Description

Base class to all grid types, e.g.

a regular grid.

Definition at line 40 of file WGrid.h.


Constructor & Destructor Documentation

WGrid::WGrid ( size_t  size)
explicit

Constructs a new WGrid instance.

Parameters:
sizenumber of positions in grid

Definition at line 30 of file WGrid.cpp.

References m_infoProperties, and m_size.

WGrid::~WGrid ( )
virtual

Since WGrid is a base class and thus should be polymorphic we add virtual destructor.

Definition at line 38 of file WGrid.cpp.


Member Function Documentation

virtual WBoundingBox WGrid::getBoundingBox ( ) const
pure virtual

Axis aligned Bounding Box that encloses this grid.

Returns:
Axis aligned Bounding Box that encloses this grid.

Implemented in WGridRegular3D, and Dummy.

boost::shared_ptr< WProperties > WGrid::getInformationProperties ( ) const

Returns a pointer to the information properties object of the grid.

The grid intends these properties to not be modified.

Returns:
the properties.

Definition at line 47 of file WGrid.cpp.

References m_infoProperties.

size_t WGrid::size ( ) const

The number of positions in this grid.

Returns:
The number of positions in this grid.

Reimplemented in Dummy.

Definition at line 42 of file WGrid.cpp.

References m_size.

Referenced by WGridRegular3DTest::testOrientation(), and WGridRegular3DTest::testSize().


Member Data Documentation

boost::shared_ptr< WProperties > WGrid::m_infoProperties
protected

The property object for the grid containing only props whose purpose is "PV_PURPOSE_INFORMNATION".

It is useful to define some property to only be of informational nature. The GUI does not modify them.

Definition at line 81 of file WGrid.h.

Referenced by getInformationProperties(), WGridRegular3D::initInformationProperties(), and WGrid().

size_t WGrid::m_size
private

Stores the number of positions.

Definition at line 87 of file WGrid.h.

Referenced by size(), and WGrid().


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