Public Member Functions | List of all members
nmx::View< CONTAINER > Class Template Reference

The View class Sicht auf Teilmenge eines Containers. More...

#include <xview.h>

Public Member Functions

 View (const CONTAINER &input)
 View Konstruktor. More...
 
 View (const View &v)
 View Kopierkonstruktor. More...
 
 View (View &&v)
 View Move-Konstruktor. More...
 
auto & operator= (const View &v)
 operator = Zuweisungsoperator More...
 
auto & operator= (View &&v)
 operator = More...
 
bool empty () const
 empty More...
 
bool is_valid () const
 is_valid More...
 
void add (size_t idx)
 add addiere Elemente More...
 
template<class T >
void add (const T &idxlst)
 add addiere Elemente über Index-Liste More...
 
void save (std::ofstream &ofs, Format fmt) const
 save Speichere Container auf den die View zeigt More...
 
template<class FN >
void save (std::ofstream &ofs, Format fmt, FN fn) const
 save Speichere Container auf den die View zeigt More...
 
auto column (size_t cidx) const
 column Kopie einer Spalte More...
 

Detailed Description

template<class CONTAINER>
class nmx::View< CONTAINER >

The View class Sicht auf Teilmenge eines Containers.

Parameters
CONTAINERTyp des Containers

Definition at line 13 of file xview.h.

Constructor & Destructor Documentation

◆ View() [1/3]

template<class CONTAINER >
nmx::View< CONTAINER >::View ( const CONTAINER &  input)
inline

View Konstruktor.

Parameters
inputContainer

Definition at line 27 of file xview.h.

◆ View() [2/3]

template<class CONTAINER >
nmx::View< CONTAINER >::View ( const View< CONTAINER > &  v)
inline

View Kopierkonstruktor.

Parameters
vView

Definition at line 34 of file xview.h.

◆ View() [3/3]

template<class CONTAINER >
nmx::View< CONTAINER >::View ( View< CONTAINER > &&  v)
inline

View Move-Konstruktor.

Parameters
vView

Definition at line 42 of file xview.h.

Member Function Documentation

◆ add() [1/2]

template<class CONTAINER >
void nmx::View< CONTAINER >::add ( size_t  idx)
inline

add addiere Elemente

Parameters
idxIndex

Definition at line 94 of file xview.h.

◆ add() [2/2]

template<class CONTAINER >
template<class T >
void nmx::View< CONTAINER >::add ( const T &  idxlst)
inline

add addiere Elemente über Index-Liste

Parameters
idxlstIndexliste

Definition at line 101 of file xview.h.

◆ column()

template<class CONTAINER >
auto nmx::View< CONTAINER >::column ( size_t  cidx) const
inline

column Kopie einer Spalte

Parameters
cidxSpaltenindex
Returns
Kopie Spalte (im Standardfall ein std::vector)

Definition at line 136 of file xview.h.

◆ empty()

template<class CONTAINER >
bool nmx::View< CONTAINER >::empty ( ) const
inline

empty

Returns
true wenn die View auf keine Daten zeigt

Definition at line 82 of file xview.h.

◆ is_valid()

template<class CONTAINER >
bool nmx::View< CONTAINER >::is_valid ( ) const
inline

is_valid

Returns
true wenn die View auf einen Container zeigt

Definition at line 88 of file xview.h.

◆ operator=() [1/2]

template<class CONTAINER >
auto& nmx::View< CONTAINER >::operator= ( const View< CONTAINER > &  v)
inline

operator = Zuweisungsoperator

Parameters
vView
Returns
Referenz auf aufrufendes Objekt

Definition at line 55 of file xview.h.

◆ operator=() [2/2]

template<class CONTAINER >
auto& nmx::View< CONTAINER >::operator= ( View< CONTAINER > &&  v)
inline

operator =

Parameters
vView
Returns
Referenz auf das aufrufende Objekt

Definition at line 68 of file xview.h.

◆ save() [1/2]

template<class CONTAINER >
void nmx::View< CONTAINER >::save ( std::ofstream &  ofs,
Format  fmt 
) const
inline

save Speichere Container auf den die View zeigt

Parameters
ofsAusgabestrom
fmtFormatierung

Definition at line 110 of file xview.h.

◆ save() [2/2]

template<class CONTAINER >
template<class FN >
void nmx::View< CONTAINER >::save ( std::ofstream &  ofs,
Format  fmt,
FN  fn 
) const
inline

save Speichere Container auf den die View zeigt

Parameters
ofsAusgabestrom
fmtFormatierung
fnFunktion zur Bearbeitung der Reihe

Definition at line 124 of file xview.h.


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