NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
NumeRe::GenericFileView Class Reference

This class is a facet for an arbitrary GenericFile instance. It can be used to read the contents of the contained file more easily. More...

#include <file.hpp>

Collaboration diagram for NumeRe::GenericFileView:

Public Member Functions

 GenericFileView ()
 Default constructor. More...
 
 GenericFileView (GenericFile *_file)
 Constructor from an available GenericFile instance. More...
 
void attach (GenericFile *_file)
 Attaches a new GenericFile instance to this facet class. More...
 
GenericFilegetPtr ()
 Returns the internally stored GenericFile instance pointer. More...
 
long long int getCols () const
 Returns the number of columns in the internally stored GenericFile instance. More...
 
long long int getRows () const
 Returns the number of rows in the internally stored GenericFile instance. More...
 
mu::value_type getElement (long long int row, long long int col) const
 Returns the value stored at the passed positions. A default constructed mu::value_type object instance is returned, if the element does not exist. More...
 
std::string getStringElement (long long int row, long long int col) const
 Returns the value stored at the passed positions. An empty string is returned, if the element does not exist. More...
 
std::string getColumnHead (long long int col) const
 Returns the column heading stored for the passed column. Returns an empty string, if the column does not exist. More...
 

Private Attributes

GenericFilem_file
 

Detailed Description

This class is a facet for an arbitrary GenericFile instance. It can be used to read the contents of the contained file more easily.

Definition at line 1263 of file file.hpp.

Constructor & Destructor Documentation

◆ GenericFileView() [1/2]

NumeRe::GenericFileView::GenericFileView ( )
inline

Default constructor.

Definition at line 1272 of file file.hpp.

◆ GenericFileView() [2/2]

NumeRe::GenericFileView::GenericFileView ( GenericFile _file)
inline

Constructor from an available GenericFile instance.

Parameters
_fileGenericFile*

Definition at line 1281 of file file.hpp.

Member Function Documentation

◆ attach()

void NumeRe::GenericFileView::attach ( GenericFile _file)
inline

Attaches a new GenericFile instance to this facet class.

Parameters
_fileGenericFile*
Returns
void

Definition at line 1291 of file file.hpp.

References m_file.

◆ getCols()

long long int NumeRe::GenericFileView::getCols ( ) const
inline

Returns the number of columns in the internally stored GenericFile instance.

Returns
long long int

Definition at line 1315 of file file.hpp.

References NumeRe::GenericFile::getCols(), and m_file.

Referenced by NumeRe::SavitzkyGolayFilter::findColumn().

Here is the call graph for this function:

◆ getColumnHead()

std::string NumeRe::GenericFileView::getColumnHead ( long long int  col) const
inline

Returns the column heading stored for the passed column. Returns an empty string, if the column does not exist.

Parameters
collong long int
Returns
string

Definition at line 1404 of file file.hpp.

References NumeRe::GenericFile::getCols(), NumeRe::GenericFile::getData(), and m_file.

Referenced by NumeRe::SavitzkyGolayFilter::findColumn().

Here is the call graph for this function:

◆ getElement()

mu::value_type NumeRe::GenericFileView::getElement ( long long int  row,
long long int  col 
) const
inline

Returns the value stored at the passed positions. A default constructed mu::value_type object instance is returned, if the element does not exist.

Parameters
rowlong long int
collong long int
Returns
mu::value_type

Definition at line 1349 of file file.hpp.

References NumeRe::GenericFile::getCols(), NumeRe::GenericFile::getData(), NumeRe::GenericFile::getRows(), and m_file.

Referenced by NumeRe::SavitzkyGolayFilter::createKernel().

Here is the call graph for this function:

◆ getPtr()

GenericFile * NumeRe::GenericFileView::getPtr ( )
inline

Returns the internally stored GenericFile instance pointer.

Returns
GenericFile*

Definition at line 1303 of file file.hpp.

References m_file.

◆ getRows()

long long int NumeRe::GenericFileView::getRows ( ) const
inline

Returns the number of rows in the internally stored GenericFile instance.

Returns
long long int

Definition at line 1330 of file file.hpp.

References NumeRe::GenericFile::getRows(), and m_file.

Here is the call graph for this function:

◆ getStringElement()

std::string NumeRe::GenericFileView::getStringElement ( long long int  row,
long long int  col 
) const
inline

Returns the value stored at the passed positions. An empty string is returned, if the element does not exist.

Parameters
rowlong long int
collong long int
Returns
std::string

Definition at line 1377 of file file.hpp.

References NumeRe::GenericFile::getCols(), NumeRe::GenericFile::getData(), NumeRe::GenericFile::getRows(), and m_file.

Here is the call graph for this function:

Member Data Documentation

◆ m_file

GenericFile* NumeRe::GenericFileView::m_file
private

Definition at line 1266 of file file.hpp.

Referenced by attach(), getCols(), getColumnHead(), getElement(), getPtr(), getRows(), and getStringElement().


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