ug4
ug::GridLayoutMap Class Reference

lets you access layouts by type and key More...

#include <parallel_grid_layout.h>

Classes

struct  Types
 defines the types that are used by a LayoutMap for a given TType. More...
 

Public Types

typedef int Key
 

Public Member Functions

void clear ()
 
template<class TType >
void erase_layout (const Key &key)
 erases the specified layout if it exists More...
 
template<class TType >
Types< TType >::Map::iterator erase_layout (typename Types< TType >::Map::iterator iter)
 erases the specified layout More...
 
template<class TType >
Types< TType >::Layout & get_layout (const Key &key)
 creates the required layout if it doesn't exist already. More...
 
template<class TType >
const Types< TType >::Layout & get_layout (const Key &key) const
 
template<class TType >
bool has_layout (const Key &key) const
 checks whether the layout associated with the given key exists for the given type. More...
 
void remove_empty_interfaces ()
 removes empty interfaces. More...
 
template<class TType >
Types< TType >::Map::iterator layouts_begin ()
 begin-iterator to the layout-map for the given type. More...
 
template<class TType >
Types< TType >::Map::const_iterator layouts_begin () const
 begin-iterator to the layout-map for the given type. More...
 
template<class TType >
Types< TType >::Map::iterator layouts_end ()
 end-iterator to the layout-map for the given type. More...
 
template<class TType >
Types< TType >::Map::const_iterator layouts_end () const
 end-iterator to the layout-map for the given type. More...
 

Private Member Functions

template<class TType >
Types< TType >::Map & get_layout_map ()
 
template<class TType >
const Types< TType >::Map & get_layout_map () const
 
Types< Edge >::Map & get_layout_map (Edge *)
 
const Types< Edge >::Map & get_layout_map (Edge *) const
 
Types< Face >::Map & get_layout_map (Face *)
 
const Types< Face >::Map & get_layout_map (Face *) const
 
Types< Vertex >::Map & get_layout_map (Vertex *)
 the argument is only a dummy to allow to choose the right method at compile time More...
 
const Types< Vertex >::Map & get_layout_map (Vertex *) const
 
Types< Volume >::Map & get_layout_map (Volume *)
 
const Types< Volume >::Map & get_layout_map (Volume *) const
 

Private Attributes

Types< Edge >::Map m_edgeLayoutMap
 
Types< Face >::Map m_faceLayoutMap
 
Types< Vertex >::Map m_vertexLayoutMap
 
Types< Volume >::Map m_volumeLayoutMap
 

Detailed Description

lets you access layouts by type and key

The GridLayoutMap helps you to organize your layouts (e.g. master- and slave-layouts).

You may query layouts for Vertex, Edge, Face and Volume.

You may use a LayoutMap as follows:

GridLayoutMap layoutMap;
assert(!layoutMap.has_layout<Vertex>(0));
VertexLayout& layout = layoutMap.get_layout<Vertex>(0);
assert(layoutMap.has_layout<Vertex>(0));
pcl::MultiLevelLayout< pcl::OrderedInterface< Vertex, std::list > > VertexLayout
Definition: parallel_grid_layout.h:116

To get associated types you may use the GridLayoutMap::Types array:

GridLayoutMap::Types<Vertex>::Layout l = layoutMap.get_layout<Vertex>(0);
pcl::MultiLevelLayout< Interface > Layout
Definition: parallel_grid_layout.h:161

The Types struct is very useful when it comes to using a LayoutMap in template code, too.

Member Typedef Documentation

◆ Key

Member Function Documentation

◆ clear()

◆ erase_layout() [1/2]

template<class TType >
void ug::GridLayoutMap::erase_layout ( const Key key)

erases the specified layout if it exists

◆ erase_layout() [2/2]

template<class TType >
GridLayoutMap::Types< TType >::Map::iterator ug::GridLayoutMap::erase_layout ( typename Types< TType >::Map::iterator  iter)

erases the specified layout

returns an iterator to the next layout.

◆ get_layout() [1/2]

◆ get_layout() [2/2]

template<class TType >
const GridLayoutMap::Types< TType >::Layout & ug::GridLayoutMap::get_layout ( const Key key) const

References UG_THROW.

◆ get_layout_map() [1/10]

template<class TType >
GridLayoutMap::Types< TType >::Map & ug::GridLayoutMap::get_layout_map
inlineprivate

Referenced by get_layout_map().

◆ get_layout_map() [2/10]

template<class TType >
const GridLayoutMap::Types< TType >::Map & ug::GridLayoutMap::get_layout_map
inlineprivate

References get_layout_map().

◆ get_layout_map() [3/10]

GridLayoutMap::Types< Edge >::Map & ug::GridLayoutMap::get_layout_map ( Edge )
inlineprivate

References m_edgeLayoutMap.

◆ get_layout_map() [4/10]

const GridLayoutMap::Types< Edge >::Map & ug::GridLayoutMap::get_layout_map ( Edge ) const
inlineprivate

References m_edgeLayoutMap.

◆ get_layout_map() [5/10]

GridLayoutMap::Types< Face >::Map & ug::GridLayoutMap::get_layout_map ( Face )
inlineprivate

References m_faceLayoutMap.

◆ get_layout_map() [6/10]

const GridLayoutMap::Types< Face >::Map & ug::GridLayoutMap::get_layout_map ( Face ) const
inlineprivate

References m_faceLayoutMap.

◆ get_layout_map() [7/10]

GridLayoutMap::Types< Vertex >::Map & ug::GridLayoutMap::get_layout_map ( Vertex )
inlineprivate

the argument is only a dummy to allow to choose the right method at compile time

References m_vertexLayoutMap.

◆ get_layout_map() [8/10]

const GridLayoutMap::Types< Vertex >::Map & ug::GridLayoutMap::get_layout_map ( Vertex ) const
inlineprivate

References m_vertexLayoutMap.

◆ get_layout_map() [9/10]

GridLayoutMap::Types< Volume >::Map & ug::GridLayoutMap::get_layout_map ( Volume )
inlineprivate

References m_volumeLayoutMap.

◆ get_layout_map() [10/10]

const GridLayoutMap::Types< Volume >::Map & ug::GridLayoutMap::get_layout_map ( Volume ) const
inlineprivate

References m_volumeLayoutMap.

◆ has_layout()

◆ layouts_begin() [1/2]

template<class TType >
GridLayoutMap::Types< TType >::Map::iterator ug::GridLayoutMap::layouts_begin

begin-iterator to the layout-map for the given type.

iter.first will return the key, iter.second the layout (of type LayoutMap::Types<TType>::Layout).

◆ layouts_begin() [2/2]

template<class TType >
GridLayoutMap::Types< TType >::Map::const_iterator ug::GridLayoutMap::layouts_begin

begin-iterator to the layout-map for the given type.

iter.first will return the key, iter.second the layout (of type LayoutMap::Types<TType>::Layout).

◆ layouts_end() [1/2]

template<class TType >
GridLayoutMap::Types< TType >::Map::iterator ug::GridLayoutMap::layouts_end

end-iterator to the layout-map for the given type.

iter.first will return the key, iter.second the layout (of type LayoutMap::Types<TType>::Layout).

◆ layouts_end() [2/2]

template<class TType >
GridLayoutMap::Types< TType >::Map::const_iterator ug::GridLayoutMap::layouts_end

end-iterator to the layout-map for the given type.

iter.first will return the key, iter.second the layout (of type LayoutMap::Types<TType>::Layout).

◆ remove_empty_interfaces()

void ug::GridLayoutMap::remove_empty_interfaces ( )

removes empty interfaces.

References m_edgeLayoutMap, m_faceLayoutMap, m_vertexLayoutMap, and m_volumeLayoutMap.

Referenced by ug::DistributeGrid().

Member Data Documentation

◆ m_edgeLayoutMap

Types<Edge>::Map ug::GridLayoutMap::m_edgeLayoutMap
private

◆ m_faceLayoutMap

Types<Face>::Map ug::GridLayoutMap::m_faceLayoutMap
private

◆ m_vertexLayoutMap

Types<Vertex>::Map ug::GridLayoutMap::m_vertexLayoutMap
private

◆ m_volumeLayoutMap

Types<Volume>::Map ug::GridLayoutMap::m_volumeLayoutMap
private

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