Reference documentation for deal.II version 8.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Public Member Functions | Private Attributes | List of all members
NamedSelection Class Reference

#include <named_data.h>

Public Member Functions

void add (const std::string &name)
 
template<typename DATA >
void initialize (const NamedData< DATA > &data)
 
unsigned int size () const
 
unsigned int operator() (unsigned int i) const
 

Private Attributes

std::vector< std::string > names
 
std::vector< unsigned intindices
 

Detailed Description

Select data from NamedData corresponding to the attached name.

Given a list of names to search for (provided by add()), objects of this class provide an index list of the selected data.

Author
Guido Kanschat, 2009

Definition at line 185 of file named_data.h.

Member Function Documentation

void NamedSelection::add ( const std::string &  name)
inline

Add a new name to be searched for in NamedData.

Note
Names will be added to the end of the current list.

Definition at line 409 of file named_data.h.

template<typename DATA >
void NamedSelection::initialize ( const NamedData< DATA > &  data)
inline

Create the index vector pointing into the NamedData object.

Definition at line 417 of file named_data.h.

unsigned int NamedSelection::size ( ) const
inline

The number of names in this object. This function may be used whether initialize() was called before or not.

Definition at line 427 of file named_data.h.

unsigned int NamedSelection::operator() ( unsigned int  i) const
inline

Return the corresponding index in the NamedData object supplied to the last initialize(). It is an error if initialize() has not been called before.

Indices are in the same order as the calls to add().

Definition at line 435 of file named_data.h.

Member Data Documentation

std::vector<std::string> NamedSelection::names
private

The selected names.

Definition at line 230 of file named_data.h.

std::vector<unsigned int> NamedSelection::indices
private

The index map generated by initialize() and accessed by operator().

Definition at line 236 of file named_data.h.


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